[PATCH] read drive serial number

Kay Sievers kay.sievers at vrfy.org
Mon Aug 2 06:11:34 PDT 2004


On Mon, 2004-08-02 at 14:19 +0200, David Zeuthen wrote: 
> 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.

Yes, sounds reasonable. We may change 'no_partitons' to 'has_partitons' and
add this to the main device from the subdevice discovery call?

> 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].

Yes, sounds good. But the hfs_probe() returns the first valid partition
on the main device now. We just need to add a flag to struct volume_id',
that indicates that a partiton table was found. I will do this anyway.

Kay

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list