summaryrefslogtreecommitdiff
path: root/usr.sbin/bad144/bad144.c
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2005-02-17 13:50:42 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2005-02-17 13:50:42 +0000
commitbc1fbcf54e901c7d6d96a124c016bae30b0c0adb (patch)
tree5ef2913fe9f770bbbba290bd991907065855442f /usr.sbin/bad144/bad144.c
parent190e9b387d69798952649218e8e9a69a8464dc1c (diff)
Fix scoping error on DIOCSBAD ioctl failure condition.
miod@, otto@, henning@ ok
Diffstat (limited to 'usr.sbin/bad144/bad144.c')
-rw-r--r--usr.sbin/bad144/bad144.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c
index 5310240d2cf..0daa705c2db 100644
--- a/usr.sbin/bad144/bad144.c
+++ b/usr.sbin/bad144/bad144.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bad144.c,v 1.17 2003/06/26 22:11:01 deraadt Exp $ */
+/* $OpenBSD: bad144.c,v 1.18 2005/02/17 13:50:41 aaron Exp $ */
/*
* Copyright (c) 1980, 1986, 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,7 +36,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)bad144.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: bad144.c,v 1.17 2003/06/26 22:11:01 deraadt Exp $";
+static char *rcsid = "$Id: bad144.c,v 1.18 2005/02/17 13:50:41 aaron Exp $";
#endif /* not lint */
/*
@@ -281,9 +281,10 @@ main(int argc, char *argv[])
break;
}
#ifdef DIOCSBAD
- if (nflag == 0 && ioctl(f, DIOCSBAD, (caddr_t)&curbad) < 0)
+ if (nflag == 0 && ioctl(f, DIOCSBAD, (caddr_t)&curbad) < 0) {
warn("can't sync bad-sector file");
warnx("reboot for changes to take effect");
+ }
#endif
if ((dp->d_flags & D_BADSECT) == 0 && nflag == 0) {
dp->d_flags |= D_BADSECT;