summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2011-05-05 19:51:48 +0000
committerkrw <krw@openbsd.org>2011-05-05 19:51:48 +0000
commiteb27cc7b29cde8b828084c183e52cd94ef898394 (patch)
treedac628cd5282393dfaeb9f01dbccfd5c76cbac56
parentGo back to only attempting one IDENTIFY command against directly (diff)
downloadwireguard-openbsd-eb27cc7b29cde8b828084c183e52cd94ef898394.tar.xz
wireguard-openbsd-eb27cc7b29cde8b828084c183e52cd94ef898394.zip
Oops. Put back OPENDEV_PART so 'eject cd0' works again. Pointed out
by miod@.
-rw-r--r--bin/mt/mt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/mt/mt.c b/bin/mt/mt.c
index e3733073202..9d3dd66c90b 100644
--- a/bin/mt/mt.c
+++ b/bin/mt/mt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mt.c,v 1.34 2011/04/24 01:13:55 krw Exp $ */
+/* $OpenBSD: mt.c,v 1.35 2011/05/05 19:51:48 krw Exp $ */
/* $NetBSD: mt.c,v 1.14.2.1 1996/05/27 15:12:11 mrg Exp $ */
/*
@@ -211,7 +211,8 @@ main(int argc, char *argv[])
}
flags = comp->c_ronly ? O_RDONLY : O_WRONLY | O_CREAT;
- if ((mtfd = _rmtopendev(tape, flags, 0, &realtape)) < 0) {
+ /* NOTE: OPENDEV_PART required since cd(4) devices go through here. */
+ if ((mtfd = _rmtopendev(tape, flags, OPENDEV_PART, &realtape)) < 0) {
if (errno != 0)
warn("%s", host ? tape : realtape);
exit(2);