From a942140b767fa71813b51872fc01056b0b058e4e Mon Sep 17 00:00:00 2001 From: jongmyeongko Date: Wed, 4 Jan 2017 20:04:08 +0900 Subject: [PATCH] Adjust log level not to recognized an error always Submit together: https://review.tizen.org/gerrit/#/c/104823/ Change-Id: Ifdd8d5ee8688b865c5c999edba590c2332271524 Signed-off-by: jongmyeongko --- plugin/app2sd/server/app2sd_internals.c | 16 ++++++++-------- plugin/app2sd/server/app2sd_internals_registry.c | 4 ++-- plugin/app2sd/server/app2sd_internals_utils.c | 6 ------ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/plugin/app2sd/server/app2sd_internals.c b/plugin/app2sd/server/app2sd_internals.c index 6863358..66a75e9 100644 --- a/plugin/app2sd/server/app2sd_internals.c +++ b/plugin/app2sd/server/app2sd_internals.c @@ -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) { - _E("no associated device node(%s_%d) found", pkgid, uid); + _W("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)); - _E("unable to umount the dir, ret(%d) error(%d, %s)", + _D("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) - _E("unable to unmount the app content (%d)", ret); + _W("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) - _E("close dmcrypt device error (%d)", ret); + _W("close dmcrypt device error (%d)", ret); #else ret = _app2sd_remove_all_loopback_encryption_setups(loopback_device); if (ret) - _E("unable to detach the loopback encryption setup for the application"); + _W("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) - _E("unable to detach the loopback encryption setup for the application"); + _W("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) - _E("app2sd db initialize failed"); + _W("app2sd db initialize failed"); ret = _app2sd_remove_info_from_db(pkgid, uid); if (ret) - _E("cannot remove info from db"); + _W("cannot remove info from db"); return ret; diff --git a/plugin/app2sd/server/app2sd_internals_registry.c b/plugin/app2sd/server/app2sd_internals_registry.c index 52d4536..dc8e8e0 100644 --- a/plugin/app2sd/server/app2sd_internals_registry.c +++ b/plugin/app2sd/server/app2sd_internals_registry.c @@ -382,7 +382,7 @@ char *_app2sd_get_password_from_db(const char *pkgid, uid_t uid) goto FINISH_OFF; } if (strlen(passwd) == 0) { - _E("data is empty"); + _W("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) { - _E("data is empty"); + _W("data is empty"); goto FINISH_OFF; } if (SQLITE_OK != sqlite3_finalize(stmt)) { diff --git a/plugin/app2sd/server/app2sd_internals_utils.c b/plugin/app2sd/server/app2sd_internals_utils.c index 0f05306..51bd6ef 100644 --- a/plugin/app2sd/server/app2sd_internals_utils.c +++ b/plugin/app2sd/server/app2sd_internals_utils.c @@ -146,8 +146,6 @@ 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) { @@ -180,11 +178,7 @@ 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) -- 2.7.4