diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-04-23 17:01:05 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-04-23 17:01:05 +0000 |
commit | 922cbab34192fa606c192b7914dbc5192bf15954 (patch) | |
tree | d447e0f0c4615b2983d1eb15cfbbd44104b79dbc /sys/dev/vnd.c | |
parent | 4dd7822ec3f2d538c4ddc4c10ac82969174a9bc1 (diff) |
The previous code only prevented the vnd from being opened for write in
both simple and non-simple mode. Restore this behaviour by removing the
openmask check.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 917913d1b42..0e3db970b49 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.111 2011/04/23 14:57:01 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.112 2011/04/23 17:01:04 jsing Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -226,13 +226,6 @@ vndopen(dev_t dev, int flags, int mode, struct proc *p) part = DISKPART(dev); pmask = 1 << part; - /* Allow access to the raw device even if we are open. */ - if (sc->sc_dk.dk_openmask && !(part == RAW_PART) && - !(mode == S_IFCHR)) { - error = EBUSY; - goto bad; - } - /* Check that the partition exists. */ if (part != RAW_PART && ((sc->sc_flags & VNF_HAVELABEL) == 0 || |