diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-06 07:57:29 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-06 07:57:29 +0000 |
commit | 02945fefb7e9e503eacef2e49301261234634185 (patch) | |
tree | 763606890c6bdf5f55356e94fbe0c903df7a6cf4 /sys/geom/geom_dev.c | |
parent | c253d72f0a3db50f79808fffdbc424b1a5199d2c (diff) | |
download | src-02945fefb7e9e503eacef2e49301261234634185.tar.gz src-02945fefb7e9e503eacef2e49301261234634185.zip |
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.
Notes
Notes:
svn path=/head/; revision=103004
Diffstat (limited to 'sys/geom/geom_dev.c')
-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 0051eb528d12..1aaac8c08c1b 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(); |