diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-12-22 16:25:50 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-12-22 16:25:50 +0000 |
| commit | 10eee285f7682f9330e17198c966a66665e119d6 (patch) | |
| tree | 12ff436fda22d2c0efef46bc2c11a23259c056c1 /sys/fs/devfs | |
| parent | 9168f082588b1fcbc8d398fb7c78d7d2b9b8405c (diff) | |
Notes
Diffstat (limited to 'sys/fs/devfs')
| -rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 2ffaa1389d9fe..b75caa6af0a79 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1435,3 +1435,16 @@ static struct vop_vector devfs_specops = { .vop_symlink = VOP_PANIC, .vop_write = VOP_PANIC, }; + +/* + * Our calling convention to the device drivers used to be that we passed + * vnode.h IO_* flags to read()/write(), but we're moving to fcntl.h O_ + * flags instead since that's what open(), close() and ioctl() takes and + * we don't really want vnode.h in device drivers. + * We solved the source compatibility by redefining some vnode flags to + * be the same as the fcntl ones and by sending down the bitwise OR of + * the respective fcntl/vnode flags. These CTASSERTS make sure nobody + * pulls the rug out under this. + */ +CTASSERT(O_NONBLOCK == IO_NDELAY); +CTASSERT(O_FSYNC == IO_SYNC); |
