discomfitor pushed a commit to branch enlightenment-0.22.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=31e555965881ebec0eac7771942f7eca5a40f710

commit 31e555965881ebec0eac7771942f7eca5a40f710
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Jan 8 10:32:56 2018 -0500

    refactor E_Storage finding for efm/eeze volumes in backend
    
    CID 1382951
---
 src/bin/e_fm/e_fm_main_eeze.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c
index 4e3edf740..0383e8860 100644
--- a/src/bin/e_fm/e_fm_main_eeze.c
+++ b/src/bin/e_fm/e_fm_main_eeze.c
@@ -404,18 +404,19 @@ _e_fm_main_eeze_volume_add(const char *syspath,
         v->partition_label = eeze_disk_udev_get_property(v->disk, 
"ID_FS_LABEL");
      }
 
-   /* if we have dev/sda ANd dev/sda1 - ia a parent vol - del the parent vol
-    * since we actually have real child partition volumes to mount */
-   if ((v->partition != 0) && (v->parent))
+   if (v->parent)
      {
-        E_Volume *v2 = _e_fm_main_eeze_volume_find_fast(v->parent);
-        
-        if ((v2) && (v2->partition == 0))
-          _e_fm_main_eeze_volume_del(v2->udi);
-     }
+        E_Storage *s;
+
+        if (v->partition)
+          {
+             /* prevent having storage and volume from same device */
+             E_Volume *v2 = _e_fm_main_eeze_volume_find_fast(v->parent);
+
+             if ((v2) && (v2->partition == 0))
+               _e_fm_main_eeze_volume_del(v2->udi);
+          }
    
-   {
-      E_Storage *s;
       s = e_storage_find(v->parent);
       INF("++VOL:\n  syspath: %s\n  uuid: %s\n  fstype: %s\n  size: %llu\n 
label: %s\n"
           "  partition: %d\n  partition_number: %d\n partition_label: %s\n  
mounted: %d\n  mount_point: %s",
@@ -423,7 +424,7 @@ _e_fm_main_eeze_volume_add(const char *syspath,
           v->partition ? v->partition_label : "(not a partition)", v->mounted, 
v->mount_point);
       if (s)
         v->storage = s;
-      else if (v->parent)
+      else
         s = v->storage = _e_fm_main_eeze_storage_add(v->parent);
 
       if (s)

-- 


Reply via email to