From 7efefebdb9d8103be31564377bf8dacebd3e979d Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 24 Apr 2011 01:13:56 +0000 Subject: 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@ --- bin/chio/chio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/chio') 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) -- cgit v1.2.3