Subject: bin/9164: maybe mbrlabel should make the label sticky
To: None <gnats-bugs@gnats.netbsd.org>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: netbsd-bugs
Date: 01/11/2000 00:15:38
>Number: 9164
>Category: bin
>Synopsis: maybe mbrlabel should make the label sticky
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Jan 11 00:15:00 2000
>Last-Modified:
>Originator: Leo Weppelman
>Organization:
>Release: NetBSD-current (after 1999/12/23)
>Environment:
System: NetBSD x1c19e02 1.4K NetBSD 1.4K (LEO-1) #3: Wed Dec 15 16:40:23 CET 1999 root@x1c19e02:/extra/usr/src-23-08-99/sys/arch/i386/compile/LEO-1 i386
>Description:
Now that the DIOCKLABEL ioctl is there, I think it is a good idea to expand
mbrlabel to make the label it imposes on the disk sticky. This avoids some
trickery for (most?) uses of mbrlabel...
>How-To-Repeat:
>Fix:
Changing mbrlabel.c:setlabel() to:
void
setlabel(sd)
int sd;
{
int keep = 1;
if (ioctl(sd, DIOCKLABEL, &keep) < 0) {
perror("keep label");
exit(1);
}
.....
}
>Audit-Trail:
>Unformatted: