Revert "Adjust log level not to recognized an error always" 23/109523/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 10 Jan 2017 08:54:39 +0000 (17:54 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 10 Jan 2017 08:54:43 +0000 (17:54 +0900)
This reverts commit a942140b767fa71813b51872fc01056b0b058e4e.

Change-Id: I15976fdf1e2eda9e8094753dbe15097096752803

plugin/app2sd/server/app2sd_internals.c
plugin/app2sd/server/app2sd_internals_registry.c
plugin/app2sd/server/app2sd_internals_utils.c

index 66a75e9..6863358 100644 (file)
@@ -500,7 +500,7 @@ int _app2sd_dmcrypt_close_device(const char *pkgid, uid_t uid)
 
        t_dev_node = _app2sd_find_associated_dmcrypt_device_node(pkgid, uid);
        if (!t_dev_node) {
-               _W("no associated device node(%s_%d) found", pkgid, uid);
+               _E("no associated device node(%s_%d) found", pkgid, uid);
                return APP2EXT_ERROR_DMCRYPT_DEVICE_UNAVAILABLE;
        }
 
@@ -832,7 +832,7 @@ int _app2sd_unmount_app_content(const char *application_path)
                application_path);
        if ((ret = umount(application_dir_mmc_path)) < 0) {
                strerror_r(errno, err_buf, sizeof(err_buf));
-               _D("unable to umount the dir, ret(%d) error(%d, %s)",
+               _E("unable to umount the dir, ret(%d) error(%d, %s)",
                        ret, errno, err_buf);
        }
 
@@ -1762,23 +1762,23 @@ int _app2sd_force_clean(const char *pkgid, const char *application_path,
        /* unmount the loopback encrypted pseudo device from the application installation path */
        ret = _app2sd_unmount_app_content(application_path);
        if (ret)
-               _W("unable to unmount the app content (%d)", ret);
+               _E("unable to unmount the app content (%d)", ret);
 
        /* detach the loopback encryption setup for the application */
 #ifdef TIZEN_FEATURE_APP2SD_DMCRYPT_ENCRYPTION
        ret = _app2sd_dmcrypt_close_device(pkgid, uid);
        if (ret)
-               _W("close dmcrypt device error (%d)", ret);
+               _E("close dmcrypt device error (%d)", ret);
 #else
        ret = _app2sd_remove_all_loopback_encryption_setups(loopback_device);
        if (ret)
-               _W("unable to detach the loopback encryption setup for the application");
+               _E("unable to detach the loopback encryption setup for the application");
 #endif
 
        /* delete the loopback device from the SD card */
        ret = _app2sd_delete_loopback_device(loopback_device);
        if (ret)
-               _W("unable to detach the loopback encryption setup for the application");
+               _E("unable to detach the loopback encryption setup for the application");
 
        /* delete symlink */
        _app2sd_delete_symlink(application_path);
@@ -1786,11 +1786,11 @@ int _app2sd_force_clean(const char *pkgid, const char *application_path,
        /* remove passwrd from DB */
        ret = _app2sd_initialize_db();
        if (ret)
-               _W("app2sd db initialize failed");
+               _E("app2sd db initialize failed");
 
        ret = _app2sd_remove_info_from_db(pkgid, uid);
        if (ret)
-               _W("cannot remove info from db");
+               _E("cannot remove info from db");
 
 
        return ret;
index dc8e8e0..52d4536 100644 (file)
@@ -382,7 +382,7 @@ char *_app2sd_get_password_from_db(const char *pkgid, uid_t uid)
                goto FINISH_OFF;
        }
        if (strlen(passwd) == 0) {
-               _W("data is empty");
+               _E("data is empty");
                goto FINISH_OFF;
        }
        if (SQLITE_OK != sqlite3_finalize(stmt)) {
@@ -436,7 +436,7 @@ char *_app2sd_get_filename_from_db(const char *pkgid, uid_t uid)
                goto FINISH_OFF;
        }
        if (strlen(filename) == 0) {
-               _W("data is empty");
+               _E("data is empty");
                goto FINISH_OFF;
        }
        if (SQLITE_OK != sqlite3_finalize(stmt)) {
index 51bd6ef..0f05306 100644 (file)
@@ -146,6 +146,8 @@ void _app2sd_delete_symlink(const char *dirname)
        struct dirent *er = NULL;
        char abs_filename[FILENAME_MAX] = { 0, };
 
+       _D("start clean_symlink [%s]", dirname);
+
        dp = opendir(dirname);
        if (dp != NULL) {
                while (readdir_r(dp, &ep, &er) == 0 && er != NULL) {
@@ -178,7 +180,11 @@ void _app2sd_delete_symlink(const char *dirname)
                ret = remove(abs_filename);
                if (ret == -1)
                        return;
+       } else {
+               _E("couldn't open the directory[%s]", dirname);
        }
+
+       _D("finish clean_symlink");
 }
 
 int _app2sd_copy_dir(const char *src, const char *dest)