diff options
author | phk <phk@FreeBSD.org> | 2002-09-06 07:57:29 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-06 07:57:29 +0000 |
commit | 8e45a811c4d5141cf350629ad188a6a894c23ac9 (patch) | |
tree | 763606890c6bdf5f55356e94fbe0c903df7a6cf4 /sys/geom | |
parent | 907be9c6f2f035ab524f8fe3f942556236d335e1 (diff) | |
download | FreeBSD-src-8e45a811c4d5141cf350629ad188a6a894c23ac9.zip FreeBSD-src-8e45a811c4d5141cf350629ad188a6a894c23ac9.tar.gz |
Don't respect the O_EXCL flag, we don't get it back on close so we cannot
correctly track it.
Spotted by: peter
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_dev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 0051eb5..1aaac8c 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -178,7 +178,11 @@ g_dev_open(dev_t dev, int flags, int fmt, struct thread *td) g_silence(); r = flags & FREAD ? 1 : 0; w = flags & FWRITE ? 1 : 0; +#ifdef notyet e = flags & O_EXCL ? 1 : 0; +#else + e = 0; +#endif error = g_access_rel(cp, r, w, e); g_topology_unlock(); PICKUP_GIANT(); @@ -204,7 +208,11 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td) g_silence(); r = flags & FREAD ? -1 : 0; w = flags & FWRITE ? -1 : 0; +#ifdef notyet e = flags & O_EXCL ? -1 : 0; +#else + e = 0; +#endif error = g_access_rel(cp, r, w, e); g_topology_unlock(); PICKUP_GIANT(); |