summaryrefslogtreecommitdiffstats
path: root/sbin/disklabel
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-01-26 11:16:25 +0000
committerphk <phk@FreeBSD.org>2003-01-26 11:16:25 +0000
commit5ee78ecce558e96816547fd37c9337cfb98fe8c2 (patch)
tree30708d8d5f92cafe091d17e24d63e7f4d16def2f /sbin/disklabel
parenteed7833b832e31b5ac8388117d26c2f7556b57fd (diff)
downloadFreeBSD-src-5ee78ecce558e96816547fd37c9337cfb98fe8c2.zip
FreeBSD-src-5ee78ecce558e96816547fd37c9337cfb98fe8c2.tar.gz
Don't fiddle write-protect status of disklabel, it's a discontinued feature.
Diffstat (limited to 'sbin/disklabel')
-rw-r--r--sbin/disklabel/disklabel.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index bcb721c..59d1ba0 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -445,12 +445,6 @@ writelabel(int f, const char *boot, struct disklabel *lp)
cksum ^= *sp1++;
sl->sl_cksum = cksum;
#endif
- /*
- * write enable label sector before write (if necessary),
- * disable after writing.
- */
- flag = 1;
- (void)ioctl(f, DIOCWLABEL, &flag);
if (write(f, boot, lp->d_bbsize) != (int)lp->d_bbsize) {
warn("write");
return (1);
@@ -464,8 +458,6 @@ writelabel(int f, const char *boot, struct disklabel *lp)
return(1);
}
#endif
- flag = 0;
- (void) ioctl(f, DIOCWLABEL, &flag);
} else if (ioctl(f, DIOCWDINFO, lp) < 0) {
l_perror("ioctl DIOCWDINFO");
return (1);
OpenPOWER on IntegriCloud