summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrucec <brucec@FreeBSD.org>2010-06-23 14:28:08 +0000
committerbrucec <brucec@FreeBSD.org>2010-06-23 14:28:08 +0000
commit9dd957535b6e318b7f8a9d0b9f226a7eac01da6c (patch)
treeb54ee625a8b1ff7fe51c623c4ba003194346e018 /usr.sbin
parent181e38ac992eec26ae4c3979a2201eaa74d27bd5 (diff)
downloadFreeBSD-src-9dd957535b6e318b7f8a9d0b9f226a7eac01da6c.zip
FreeBSD-src-9dd957535b6e318b7f8a9d0b9f226a7eac01da6c.tar.gz
If a device can't be opened, don't keep going but display the error
returned from open() and quit. PR: bin/81035 Submitted by: Peter Schuller <peter.schuller at infidyne.com> Approved by: rrs (mentor)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c
index cd3bfe2..fe2c755 100644
--- a/usr.sbin/boot0cfg/boot0cfg.c
+++ b/usr.sbin/boot0cfg/boot0cfg.c
@@ -356,6 +356,8 @@ write_mbr(const char *fname, int flags, u_int8_t *mbr, int mbr_size)
if (n != mbr_size)
errx(1, "%s: short write", fname);
return;
+ } else {
+ err(1, "write_mbr: %s", fname);
}
/*
OpenPOWER on IntegriCloud