Date: Sat, 14 May 2005 21:52:23 +0200 (CEST) From: Peter Schuller <peter.schuller@infidyne.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/81035: [patch] boot0cfg emits bogus error Message-ID: <200505141952.j4EJqNfq015243@starfury.scode.org> Resent-Message-ID: <200505142000.j4EK0MeC070906@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 81035
>Category: bin
>Synopsis: [patch] boot0cfg emits bogus error
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat May 14 20:00:22 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: User &
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD starfury.scode.org 5.3-RELEASE FreeBSD 5.3-RELEASE #1: Sun Nov 28 02:57:30 CET 2004 toor@.bredbandsbolaget.se:/usr/obj/usr/src/sys/STARFURY i386
(problem+patch also applies to 5.4)
>Description:
boot0cfg emits bogus error messages. Example: With /dev/da1 being busy because
GEOM is using it, "boot0cfg -B -o packet /dev/da1" reported "No such file or directory"
even though /dev/da1 clearly existed. In reality open() returned EACCESS, but
boot0cfg went ahead with other stuff and printed the error-message for *THAT*.
>How-To-Repeat:
>Fix:
Report the error immediately:
--- boot0cfg.patch begins here ---
--- usr.sbin/boot0cfg/boot0cfg.c.orig Fri Oct 15 17:59:26 2004
+++ usr.sbin/boot0cfg/boot0cfg.c Sat May 14 21:47:40 2005
@@ -264,6 +264,8 @@
if (n != mbr_size)
errx(1, "%s: short write", fname);
return;
+ } else {
+ err(1, "write_mbr: %s", fname);
}
if (flags != 0)
err(1, "%s", fname);
@@ -282,8 +284,8 @@
free(s);
return;
}
-#endif
err(1, "write_mbr: %s", fname);
+#endif
}
/*
--- boot0cfg.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505141952.j4EJqNfq015243>
