[PATCH] read drive serial number
David Zeuthen
david at fubar.dk
Mon Aug 2 05:19:53 PDT 2004
On Mon, 2004-08-02 at 14:11 +0200, Kay Sievers wrote:
> > It might be easier to put in some partition table detect code ourselves
> > in HAL - would be more portable as well.
>
> Yes, I can do this. But the kernel scans the main device for any known
> partition table and creates subdevices if it finds volumes described by
> any patition table.
> Isn't it enough to watch if the kernel has creates sub devices for the
> main device. If we get a hda1 or a sda1, we can be sure, that there is a
> valid partition table on the disk.
>
Might be, but it involves some timeout when looking for subdevices,
right? And I'd rather not have this.
Perhaps, maybe what we should do is to just try to identify a filesystem
on the top-level block device, e.g. /dev/sda, right away when handling
it? And if we find one we set block.no_partitions to TRUE and things
should ''just work'' [1].
Cheers,
David
[1] : pending a cleanup of block_class_device.c but that is on my hit
list today or tomorrow; some of it is just gross (it's mostly my
code :-)
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list