diff options
author | phk <phk@FreeBSD.org> | 2003-09-27 12:01:01 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-09-27 12:01:01 +0000 |
commit | 7099deadda891e55e6cf9b433659c61126568e93 (patch) | |
tree | b97e31a4fdc3440a666206b469045b517017d25e /sys/dev/null | |
parent | c21d189c3f13ce3c60be9f7e4b2d8fc554970d12 (diff) | |
download | FreeBSD-src-7099deadda891e55e6cf9b433659c61126568e93.zip FreeBSD-src-7099deadda891e55e6cf9b433659c61126568e93.tar.gz |
The present defaults for the open and close for device drivers which
provide no methods does not make any sense, and is not used by any
driver.
It is a pretty hard to come up with even a theoretical concept of
a device driver which would always fail open and close with ENODEV.
Change the defaults to be nullopen() and nullclose() which simply
does nothing.
Remove explicit initializations to these from the drivers which
already used them.
Diffstat (limited to 'sys/dev/null')
-rw-r--r-- | sys/dev/null/null.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 6afa67e..4044bc7 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -53,8 +53,6 @@ static d_read_t null_read; #define ZERO_MINOR 12 static struct cdevsw null_cdevsw = { - .d_open = nullopen, - .d_close = nullclose, .d_read = null_read, .d_write = null_write, .d_ioctl = null_ioctl, @@ -64,8 +62,6 @@ static struct cdevsw null_cdevsw = { }; static struct cdevsw zero_cdevsw = { - .d_open = nullopen, - .d_close = nullclose, .d_read = zero_read, .d_write = null_write, .d_name = "zero", |