Avoid crash on storaged UI 94/158194/1 accepted/tizen/unified/20171030.161702 submit/tizen/20171030.093838
authorHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 30 Oct 2017 09:07:14 +0000 (18:07 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 30 Oct 2017 09:07:14 +0000 (18:07 +0900)
Change-Id: Ib198495d8e69238fb526f772a9aea835634490c3
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
apps/extended-sd/src/es-internal-storage-page.c
src/block/block.c

index 9047ce7..65ab94c 100644 (file)
@@ -67,6 +67,7 @@ mapper_device_cb(int id, storage_dev_e dev, storage_state_e state,
        if (state == STORAGE_STATE_REMOVED) {
                DMSG("Storage is removed");
                ui_app_exit();
+               return;
        } else if (state == STORAGE_STATE_UNMOUNTABLE)
                return;
 
index 89b553a..1bfcc19 100644 (file)
@@ -3058,12 +3058,15 @@ static DBusMessage *request_format_block_type(dbus_method_reply_handle_h reply_h
                                goto out;
                        }
 
-                       for (wait = 0; wait < 5; wait++) {
+                       for (wait = 0; wait < 10; wait++) {
                                if (!access(EXTENDEDSD_NODE_PATH, F_OK))
                                        sleep(1);
                                else
                                        break;
                        }
+
+                       if (wait == 10)
+                               _E("Timeout for checking access(EXTENDEDSD_NODE_PATH, F_OK)");
                }
 
                ret = update_block_data(bdev->data,