reset unmount vconfkey when unmount routine failed tizen_2.2 2.2.1_release submit/tizen_2.2/20131107.062735
authorjy910.yun <jy910.yun@samsung.com>
Thu, 24 Oct 2013 01:59:59 +0000 (10:59 +0900)
committerjy910.yun <jy910.yun@samsung.com>
Thu, 24 Oct 2013 02:00:59 +0000 (11:00 +0900)
and chaned the log define

Signed-off-by: jy910.yun <jy910.yun@samsung.com>
ss_mmc_handler.c

index a910a0b..c837abd 100644 (file)
@@ -581,28 +581,28 @@ static int mmc_unmount(int option, const char *mount_point)
        if (!r)
                return r;
        if (option == UNMOUNT_NORMAL) {
-               PRT_INFO("Failed to unmount with normal option : %s", strerror(-r));
+               PRT_TRACE_EM("Failed to unmount with normal option : %s", strerror(-r));
                return r;
        }
 
-       PRT_INFO("Execute force unmount!");
+       PRT_TRACE_EM("Execute force unmount!");
        /* at first, it will be send SIGTERM
           if app still access the SD-card, it will kill with SIGKILL */
        for (retry = UNMOUNT_RETRY; retry > 0; --retry) {
                switch (retry) {
                case UNMOUNT_RETRY:
                        /* At first, notify to other app who already access sdcard */
-                       PRT_INFO("Notify to other app who already access sdcard");
+                       PRT_TRACE_EM("Notify to other app who already access sdcard");
                        vconf_set_int(VCONFKEY_SYSMAN_MMC_STATUS, VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED);
                        break;
                case UNMOUNT_RETRY-1:
                        /* Second, kill app with SIGTERM */
-                       PRT_INFO("Kill app with SIGTERM");
+                       PRT_TRACE_EM("Kill app with SIGTERM");
                        kill_app_accessing_mmc(false);
                        break;
                case UNMOUNT_RETRY-2:
                        /* Last time, kill app with SIGKILL */
-                       PRT_INFO("Kill app with SIGKILL");
+                       PRT_TRACE_EM("Kill app with SIGKILL");
                        kill_app_accessing_mmc(true);
                        break;
                default:
@@ -615,7 +615,7 @@ static int mmc_unmount(int option, const char *mount_point)
                /* try to unmount app2ext */
                r = app2ext_unmount();
                if (r < 0)
-                       PRT_INFO("Faild to unmount app2ext : %s", strerror(-r));
+                       PRT_TRACE_ERR("Faild to unmount app2ext : %s", strerror(-r));
 
                r = mmc_check_and_unmount(mount_point);
                if (!r)
@@ -649,6 +649,7 @@ int ss_mmc_unmounted(int argc, char **argv)
 
 error:
        PRT_TRACE_ERR("Failed to unmount mmc card : %s\n", strerror(-r));
+       vconf_set_int(VCONFKEY_SYSMAN_MMC_STATUS, VCONFKEY_SYSMAN_MMC_MOUNTED);
        vconf_set_int(VCONFKEY_SYSMAN_MMC_UNMOUNT, VCONFKEY_SYSMAN_MMC_UNMOUNT_FAILED);
        vconf_set_int(VCONFKEY_SYSMAN_MMC_ERR_STATUS, -r);
        return r;