Re: proposed change to style(9): require yoda style if statements

2010-05-13 Thread Alexander Churanov
2010/5/11 Eitan Adler : > My proposal is simple: > require that any if statement that compares a constant to a mutable variable > be written as > if (constant == variable) > instead of > if (variable == constant) Use "const" qualification. It's portable and does not require rewriting conditionals

Need advice about selsocket analogue for a set of sockets

2010-05-13 Thread Dmitry Krivenok
Hi Hackers, I know that FreeBSD-8 kernel provides selsocket function declared as follows: int selsocket(struct socket *so, int events, struct timeval *tvp, struct thread *td); It's very useful if you have just one socket and don't care about which events fired. In my case, however, I have an arr

/dev/null & zero inside chroot for make release

2010-05-13 Thread Julian H. Stacey
Hi Hackers, Problem with /dev/null & /dev/zero inside a chroot: I wanted to build a release from inside a chroot ( So /var/db/pkg matches what's required by make release, without changing packages on outside the chroot, + Also to experiment with http://lists.freebsd

Re: /dev/null & zero inside chroot for make release

2010-05-13 Thread Jilles Tjoelker
On Thu, May 13, 2010 at 07:44:58PM +0200, Julian H. Stacey wrote: > Problem with /dev/null & /dev/zero inside a chroot: > I wanted to build a release from inside a chroot > What sort of null & zero should be in chroot ? > man mknod ... deprecated ... > Should I be running a devfs (I'm not currentl

Re: /dev/null & zero inside chroot for make release

2010-05-13 Thread Garrett Cooper
On May 13, 2010, at 2:06 PM, Jilles Tjoelker wrote: > On Thu, May 13, 2010 at 07:44:58PM +0200, Julian H. Stacey wrote: >> Problem with /dev/null & /dev/zero inside a chroot: >> I wanted to build a release from inside a chroot > >> What sort of null & zero should be in chroot ? >> man mknod ... d

Custom USB layout & sysinstall (Starting FIXIT)

2010-05-13 Thread rank1seeker
So, I downloaded USB stick .img Instead of just writing it with dd, I've mounted and dumped it, as I wanted custom USB stick, layout. To cut it short. Bootable img file appears as ad0s2a instead of ad0a. Once I boot from BIOS->USB stick->slice 2, I enter sysinstall successfully. Now I wana enter

Re: Custom USB layout & sysinstall (Starting FIXIT)

2010-05-13 Thread Julian H. Stacey
Hi, rank1see...@gmail.com wrote: > So, I downloaded USB stick .img > Instead of just writing it with dd, I've mounted and dumped it, as I wanted > custom USB stick, layout. > > To cut it short. > Bootable img file appears as ad0s2a instead of ad0a. > Once I boot from BIOS->USB stick->slice 2, I

Re: proposed change to style(9): require yoda style if statements

2010-05-13 Thread Garance A Drosehn
At 10:36 PM +0300 5/11/10, Eitan Adler wrote: My proposal is simple: require that any if statement that compares a constant to a mutable variable be written as if (constant == variable) instead of if (variable == constant) this prevents an extremely common programming error if (variable = consta

Re: proposed change to style(9): require yoda style if statements

2010-05-13 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2010/05/13 14:26, Garance A Drosehn wrote: > At 10:36 PM +0300 5/11/10, Eitan Adler wrote: >> My proposal is simple: >> require that any if statement that compares a constant to a mutable >> variable >> be written as >> if (constant == variable) >>