diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-04-24 01:13:56 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-04-24 01:13:56 +0000 |
commit | 7efefebdb9d8103be31564377bf8dacebd3e979d (patch) | |
tree | 2b71a1355dce1b82fc89430f2fce916f8a16db39 /bin/chio | |
parent | 98e27640fe464f692761edadb6e0485d8e6b7f07 (diff) |
No point in attempting to open the 'c' partition on devices that have
no 'c' partition. So don't call opendev(3) with OPENDEV_PART.
ok deraadt@
Diffstat (limited to 'bin/chio')
-rw-r--r-- | bin/chio/chio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/chio/chio.c b/bin/chio/chio.c index 6e28985f511..b3d72fb8dd6 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chio.c,v 1.22 2007/11/27 16:22:12 martynas Exp $ */ +/* $OpenBSD: chio.c,v 1.23 2011/04/24 01:13:55 krw Exp $ */ /* $NetBSD: chio.c,v 1.1.1.1 1996/04/03 00:34:38 thorpej Exp $ */ /* @@ -670,7 +670,7 @@ check_source_drive(int unit) * Try to make it accessible by doing an mt offline. */ tapedev = parse_tapedev(_PATH_CH_CONF, changer_name, unit); - mtfd = opendev(tapedev, O_RDONLY, OPENDEV_PART, NULL); + mtfd = opendev(tapedev, O_RDONLY, 0, NULL); if (mtfd == -1) err(1, "%s drive %d (%s): open", changer_name, unit, tapedev); if (ioctl(mtfd, MTIOCTOP, &mtoffl) == -1) |