From bc1fbcf54e901c7d6d96a124c016bae30b0c0adb Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Thu, 17 Feb 2005 13:50:42 +0000 Subject: Fix scoping error on DIOCSBAD ioctl failure condition. miod@, otto@, henning@ ok --- usr.sbin/bad144/bad144.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin/bad144/bad144.c') 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; -- cgit v1.2.3