summaryrefslogtreecommitdiff
path: root/src/bin/e_fm
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-08 10:32:56 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-08 10:46:25 -0500
commitb9a9bd1da9f6949b1c1562dd46760db793a57506 (patch)
tree531a2efa5a8c6ff1c77d4eb0d1c5169ed97ea667 /src/bin/e_fm
parentd86b2447996802810f1f8442b43e98ef5cbf0d85 (diff)
refactor E_Storage finding for efm/eeze volumes in backend
CID 1382951
Diffstat (limited to 'src/bin/e_fm')
-rw-r--r--src/bin/e_fm/e_fm_main_eeze.c23
1 files 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,
404 v->partition_label = eeze_disk_udev_get_property(v->disk, "ID_FS_LABEL"); 404 v->partition_label = eeze_disk_udev_get_property(v->disk, "ID_FS_LABEL");
405 } 405 }
406 406
407 /* if we have dev/sda ANd dev/sda1 - ia a parent vol - del the parent vol 407 if (v->parent)
408 * since we actually have real child partition volumes to mount */
409 if ((v->partition != 0) && (v->parent))
410 { 408 {
411 E_Volume *v2 = _e_fm_main_eeze_volume_find_fast(v->parent); 409 E_Storage *s;
412 410
413 if ((v2) && (v2->partition == 0)) 411 if (v->partition)
414 _e_fm_main_eeze_volume_del(v2->udi); 412 {
415 } 413 /* prevent having storage and volume from same device */
414 E_Volume *v2 = _e_fm_main_eeze_volume_find_fast(v->parent);
415
416 if ((v2) && (v2->partition == 0))
417 _e_fm_main_eeze_volume_del(v2->udi);
418 }
416 419
417 {
418 E_Storage *s;
419 s = e_storage_find(v->parent); 420 s = e_storage_find(v->parent);
420 INF("++VOL:\n syspath: %s\n uuid: %s\n fstype: %s\n size: %llu\n label: %s\n" 421 INF("++VOL:\n syspath: %s\n uuid: %s\n fstype: %s\n size: %llu\n label: %s\n"
421 " partition: %d\n partition_number: %d\n partition_label: %s\n mounted: %d\n mount_point: %s", 422 " 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,
423 v->partition ? v->partition_label : "(not a partition)", v->mounted, v->mount_point); 424 v->partition ? v->partition_label : "(not a partition)", v->mounted, v->mount_point);
424 if (s) 425 if (s)
425 v->storage = s; 426 v->storage = s;
426 else if (v->parent) 427 else
427 s = v->storage = _e_fm_main_eeze_storage_add(v->parent); 428 s = v->storage = _e_fm_main_eeze_storage_add(v->parent);
428 429
429 if (s) 430 if (s)