diff options
author | phk <phk@FreeBSD.org> | 2003-03-03 12:15:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-03 12:15:54 +0000 |
commit | 0ae911eb0e57eebb61c50c02ddf69aa67ed19599 (patch) | |
tree | 4e91d5779ffebe1d75e975aa4450f35f965430eb /sys/dev/null | |
parent | e58d97a666e757e8429a219da05f88a51554c32c (diff) | |
download | FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.zip FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.tar.gz |
Gigacommit to improve device-driver source compatibility between
branches:
Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.
This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.
Approved by: re(scottl)
Diffstat (limited to 'sys/dev/null')
-rw-r--r-- | sys/dev/null/null.c | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index c96faf0..75f9a90 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -51,37 +51,23 @@ static d_read_t null_read; #define ZERO_MINOR 12 static struct cdevsw null_cdevsw = { - /* open */ nullopen, - /* close */ nullclose, - /* read */ null_read, - /* write */ null_write, - /* ioctl */ null_ioctl, - /* poll */ nopoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "null", - /* maj */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ 0, - /* kqfilter */ NULL + .d_open = nullopen, + .d_close = nullclose, + .d_read = null_read, + .d_write = null_write, + .d_ioctl = null_ioctl, + .d_name = "null", + .d_maj = CDEV_MAJOR, }; static struct cdevsw zero_cdevsw = { - /* open */ nullopen, - /* close */ nullclose, - /* read */ zero_read, - /* write */ null_write, - /* ioctl */ noioctl, - /* poll */ nopoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "zero", - /* maj */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ D_MMAP_ANON, - /* kqfilter */ NULL + .d_open = nullopen, + .d_close = nullclose, + .d_read = zero_read, + .d_write = null_write, + .d_name = "zero", + .d_maj = CDEV_MAJOR, + .d_flags = D_MMAP_ANON, }; static void *zbuf; |