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/kern/tty_pty.c | |
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/kern/tty_pty.c')
-rw-r--r-- | sys/kern/tty_pty.c | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 83f2b9c..1561eb1 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -77,38 +77,30 @@ static d_poll_t ptcpoll; #define CDEV_MAJOR_S 5 static struct cdevsw pts_cdevsw = { - /* open */ ptsopen, - /* close */ ptsclose, - /* read */ ptsread, - /* write */ ptswrite, - /* ioctl */ ptyioctl, - /* poll */ ttypoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "pts", - /* maj */ CDEV_MAJOR_S, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ D_TTY | D_KQFILTER, - /* kqfilter */ ttykqfilter, + .d_open = ptsopen, + .d_close = ptsclose, + .d_read = ptsread, + .d_write = ptswrite, + .d_ioctl = ptyioctl, + .d_poll = ttypoll, + .d_name = "pts", + .d_maj = CDEV_MAJOR_S, + .d_flags = D_TTY | D_KQFILTER, + .d_kqfilter = ttykqfilter, }; #define CDEV_MAJOR_C 6 static struct cdevsw ptc_cdevsw = { - /* open */ ptcopen, - /* close */ ptcclose, - /* read */ ptcread, - /* write */ ptcwrite, - /* ioctl */ ptyioctl, - /* poll */ ptcpoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "ptc", - /* maj */ CDEV_MAJOR_C, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ D_TTY | D_KQFILTER, - /* kqfilter */ ttykqfilter, + .d_open = ptcopen, + .d_close = ptcclose, + .d_read = ptcread, + .d_write = ptcwrite, + .d_ioctl = ptyioctl, + .d_poll = ptcpoll, + .d_name = "ptc", + .d_maj = CDEV_MAJOR_C, + .d_flags = D_TTY | D_KQFILTER, + .d_kqfilter = ttykqfilter, }; #define BUFSIZ 100 /* Chunk size iomoved to/from user */ |