[gnome-disk-utility/new-ui] Fix VPD name for logical partitions



commit 1105ecc7fd830b58a576470ec1af2596d42b75fc
Author: David Zeuthen <davidz redhat com>
Date:   Sat Oct 3 13:23:45 2009 -0400

    Fix VPD name for logical partitions
    
    Before this fix the VPD name would be something like "Partition 7 of
    Partition 2 of Some Drive Name". Now it's "Partition 7 of Some Drive
    Name" as expected.

 src/gdu/gdu-volume.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gdu/gdu-volume.c b/src/gdu/gdu-volume.c
index 2db8ac8..ad61150 100644
--- a/src/gdu/gdu-volume.c
+++ b/src/gdu/gdu-volume.c
@@ -413,7 +413,11 @@ get_names_and_desc (GduPresentable  *presentable,
 
                 drive_vpd_name = NULL;
                 if (volume->priv->enclosing_presentable != NULL) {
-                        drive_vpd_name = gdu_presentable_get_vpd_name (volume->priv->enclosing_presentable);
+                        if (GDU_IS_VOLUME (volume->priv->enclosing_presentable)) {
+                                drive_vpd_name = gdu_presentable_get_vpd_name (GDU_VOLUME (volume->priv->enclosing_presentable)->priv->enclosing_presentable);
+                        } else {
+                                drive_vpd_name = gdu_presentable_get_vpd_name (volume->priv->enclosing_presentable);
+                        }
                 }
 
                 if (gdu_device_is_partition (volume->priv->device)) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]