diff options
author | David Zeuthen <davidz@redhat.com> | 2006-09-10 11:08:41 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2006-09-10 11:08:41 -0400 |
commit | 989e1bcc472cd7c130ae828e7d5d2ca81ee300db (patch) | |
tree | b6114edebdfb011c1ede6e0c14f95429785f1ecf /hald/linux/blockdev.c | |
parent | 853115cf6749087546671c92fc64d51ec01e68ac (diff) |
add new partition probing code and adapt hal code to use it
Added a new static library in partutil/ that serves two purposes
1. Probe for partition tables and the entries in them. This is
done without any new dependencies and is in general efficient.
Right now we understand Master Boot Record (and Extended MBR),
GUID Partitioning Tables and Apple Partition Map. The interface
is generic enough to add support for other disk labels too
should the need arise.
2. Create partition tables, add partition table entries, alter
partition table entries, delete partition table entries. This
is done using libparted to ensure maximal robustness and
correctness.
Beware that libparted is kinda silly in a few ways, it probes all
drives (even when asked to only look at one drive - the audicity!),
and we have to poke at the internals to get/set vital raw
properties. As such, we only officially support libparted 1.7.1 at
this point. If you use anything else but that, you are on your own.
We should start a dialouge with the libparted guys to make them
export official API suitable for our needs.
configure now takes a new --enable-parted and by default (for
the upcoming 0.5.8 release), this is set to "no". As such, the
upcoming 0.5.8 release will not depend on libparted.
Also we now use this infrastructure in probe-volume and probe-storage
to export the following new properties
storage.partitioning_scheme (string)
on storage devices and
volume.partition.scheme (string)
volume.partition.type (string)
volume.partition.label (string)
volume.partition.uuid (string)
volume.partition.flags (strlist)
on volumes. These new properties are also now exported through
libhal-storage.
Also moves some more code over to using LibHalChangeSet for nicer
and much more efficient handling.
Diffstat (limited to 'hald/linux/blockdev.c')
-rw-r--r-- | hald/linux/blockdev.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c index 8fbe0845..3061424b 100644 --- a/hald/linux/blockdev.c +++ b/hald/linux/blockdev.c @@ -780,7 +780,6 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f hal_device_property_set_string (d, "storage.physical_device", parent->udi); hal_device_property_set_bool (d, "storage.removable", TRUE); hal_device_property_set_bool (d, "storage.removable.media_available", FALSE); - hal_device_property_set_uint64 (d, "storage.removable.media_size", 0); hal_device_property_set_bool (d, "storage.hotpluggable", FALSE); hal_device_property_set_bool (d, "storage.requires_eject", FALSE); hal_device_property_set_uint64 (d, "storage.size", 0); @@ -924,7 +923,6 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f } hal_device_property_set_bool (d, "storage.removable.media_available", FALSE); - hal_device_property_set_uint64 (d, "storage.removable.media_size", 0); hal_device_property_set_bool (d, "storage.removable", is_removable); /* set storage.size only if we have fixed media */ if (!is_removable) { |