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.
This commit is contained in:
parent
1fc1a1ef2a
commit
0cdbe32937
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue