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.
This commit is contained in:
Poul-Henning Kamp 2002-09-06 07:57:29 +00:00
parent c253d72f0a
commit 02945fefb7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103004

View File

@ -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();