Subject: changing readdisklabel()/writeddisklabel() to pass disk name?
To: None <firstname.lastname@example.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 11/08/1998 14:54:04
As most of you know, we're in the midst of transitioning NetBSD from
using an MBR partition-ID of 165 (on MBR-aware systems: notabbly i386,
but also arm32, and some other ports with support for reading MBRs on
removable media) to the new ID, 169.
There's been some recent complaints about the messages produced when
NetBSD kernels see an ID-165 partition. The kernel currenty says
printf("WARNING: old BSD partition ID!\n");
which is too cryptic for many users; yet for knowledgeable users, it
doesn't say which disk (of potentially many) the kernel is warning
There've been several suggestions on how to get a device name into the
warning message. One common theme is to extend the RB_ASKNAME
machinery. But that has several shortcomings: it doesnt extend well
for pseudo-devices (without some significant care when constructing
the list of possible boot/root devices) and it will likely conflict
with more dynamic registration of device drivers.
The option I favour is to add a new parameter to readdisklabel() and
writedisklabel(), so the device-driver can pass in the device name.
If we do that, the label-handling code should probably take
responsiblity for printing any warning or error messages, rather than
returning them as a string and letting the driver print it.
That'd also help clean up error messages when there are several
possible label types to fall back to in addition to a straight BSD
label (MBRs, vendor-specific labels, cross-endian BSD labels?? etc).
Since other people are actively working on more support for better
cross-platform filesystems and moving media between platforms,
higher-quality label messages seem timely.
Comments welcome, as usual....