1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Don't fiddle write-protect status of disklabel, it's a discontinued feature.

This commit is contained in:
Poul-Henning Kamp 2003-01-26 11:16:25 +00:00
parent cd967e322a
commit 89fd458f17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109874
2 changed files with 0 additions and 16 deletions

View File

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

View File

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