summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-05 21:57:05 +0000
committerphk <phk@FreeBSD.org>2002-10-05 21:57:05 +0000
commitd50e0d73925ffda0c718864acf3257ea0a98a9ed (patch)
treeafcd87d7469ba5bba58702479be69d88f7c03b55
parent45eae5f187bca0b6e41ebd2d462e4bc3b0450b27 (diff)
downloadFreeBSD-src-d50e0d73925ffda0c718864acf3257ea0a98a9ed.zip
FreeBSD-src-d50e0d73925ffda0c718864acf3257ea0a98a9ed.tar.gz
Don't be noisy if DIOCWLABEL fails, it's probably because we're writing
the first label to the raw disk. Sponsored by: DARPA & NAI Labs.
-rw-r--r--sbin/bsdlabel/bsdlabel.c3
-rw-r--r--sbin/disklabel/disklabel.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 81efae5..dd3e241 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -468,8 +468,7 @@ writelabel(int f, const char *boot, struct disklabel *lp)
* disable after writing.
*/
flag = 1;
- if (ioctl(f, DIOCWLABEL, &flag) < 0)
- warn("ioctl DIOCWLABEL");
+ (void)ioctl(f, DIOCWLABEL, &flag);
if (write(f, boot, lp->d_bbsize) != (int)lp->d_bbsize) {
warn("write");
return (1);
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 81efae5..dd3e241 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -468,8 +468,7 @@ writelabel(int f, const char *boot, struct disklabel *lp)
* disable after writing.
*/
flag = 1;
- if (ioctl(f, DIOCWLABEL, &flag) < 0)
- warn("ioctl DIOCWLABEL");
+ (void)ioctl(f, DIOCWLABEL, &flag);
if (write(f, boot, lp->d_bbsize) != (int)lp->d_bbsize) {
warn("write");
return (1);
OpenPOWER on IntegriCloud