About Partition Information

Kay Sievers kay.sievers at vrfy.org
Fri Jan 28 12:29:22 PST 2005


On Fri, 2005-01-28 at 17:51 -0200, Gustavo Barbieri wrote:
> Hello,
> 
> I'm coding some classes to easy the use of HAL on my application, I
> call the project PyHAL (http://ltc08.ic.unicamp.br/svn/pyhal/trunk/),
> but I lack some information:
> 
> 1) Partition start: this information is available in
> /sys/block/hd?/hd??/start, but not in HAL, why not? Would you add it?
> 
> 2) Extended partition size: sysfs and hal both report 2 blocks each
> (1024), the space taken by the extended partition (that used to hold
> the new partition table), but I need to know the space this partition
> takes on the disc (as reported by fdisk/sfdisk).   Does anyone know
> how to get this information? Would you add it to hal?
> 
> 3) Partitions inside an extended partition: there is no way to know
> the extended partition that is parent of another. Again, there is any
> way to get this information (with or without hal)?
> 
> I offer myself to code those things, but I need some clues on how to
> get data for items 2 and 3.

Why do you think we should do this in HAL? HAL's goal is more a system
device inventory, which creates unique identifiers for the systems
devices, than what it's name claims. :)
For device discovery/removal and for interesting values that can
distinguish one device from another or values that may indicate an
interesting  device state change, HAL provides an elegant way for
applications to get informed about this. It's actual strength is the
unification and interpretation of the various system events and the
classification of system devices.

Partition offsets and partition layouts sounds like very special
internals of one of the hard disk layout which are specialized
applications/tools for. You may look at libparted and friends to read
such values.

Thanks,
Kay

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



More information about the Hal mailing list