NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: misc/43348: driver(9) man page has strange examples



The following reply was made to PR misc/43348; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: misc-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost, fujiyosi.ncl%gmail.com@localhost
Subject: re: misc/43348: driver(9) man page has strange examples
Date: Tue, 25 May 2010 03:15:04 +1000

 >  >     const struct cdevsw foo_cdevsw {
 >  >              int (*d_open)(dev_t, int, int, struct lwp *);
 >  >              int (*d_close)(dev_t, int, int, struct lwp *);
 >  >              ...
 >  >     };
 >  > 
 >  > They should be like
 >  > 
 >  >     const struct cdevsw foo_cdevsw {
 >  >             fooopen, fooclose, .....
 >  >     };
 
 actually, i'd much rather the example read something like:
 
        const struct cdevsw foo_cdevsw {
                .d_open = fooopen,
                .d_close = fooclose,
                ....
        };
 
 and promote the use of named initialisers.
 
 
 .mrg.
 


Home | Main Index | Thread Index | Old Index