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:
Poul-Henning Kamp 2002-10-05 21:57:05 +00:00
parent 1fc1a1ef2a
commit 0cdbe32937
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104543
2 changed files with 2 additions and 4 deletions

View File

@ -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);

View File

@ -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);