[gnome-disk-utility/udisks2-port] Properly handle extended partitions
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Properly handle extended partitions
- Date: Thu, 10 Mar 2011 18:53:32 +0000 (UTC)
commit 415a0062189d6ab5162da2cd13f5957ab7867935
Author: David Zeuthen <davidz redhat com>
Date: Thu Mar 10 13:53:19 2011 -0500
Properly handle extended partitions
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduvolumegrid.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/palimpsest/gduvolumegrid.c b/src/palimpsest/gduvolumegrid.c
index e6a2954..9d77528 100644
--- a/src/palimpsest/gduvolumegrid.c
+++ b/src/palimpsest/gduvolumegrid.c
@@ -1713,14 +1713,23 @@ grid_element_set_details (GduVolumeGrid *grid,
gchar *size_str;
const gchar *usage;
const gchar *type;
+ gint partition_type;
size_str = udisks_util_get_size_for_display (element->size, FALSE, FALSE);
block = UDISKS_PEEK_BLOCK_DEVICE (element->object_proxy);
usage = udisks_block_device_get_id_usage (block);
type = udisks_block_device_get_id_type (block);
+ partition_type = strtol (udisks_block_device_get_part_entry_type (block), NULL, 0);
- if (g_strcmp0 (usage, "filesystem") == 0)
+ if (udisks_block_device_get_part_entry (block) &&
+ g_strcmp0 (udisks_block_device_get_part_entry_scheme (block), "mbr") == 0 &&
+ (partition_type == 0x05 || partition_type == 0x0f || partition_type == 0x85))
+ {
+ s = g_strdup_printf ("%s %s", size_str,
+ C_("volume-grid", "Extended Partition"));
+ }
+ else if (g_strcmp0 (usage, "filesystem") == 0)
{
const gchar *label;
label = udisks_block_device_get_id_label (block);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]