Disable storaged api 61/324761/1 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20250526.105154
authorJihoon Jung <jh8801.jung@samsung.com>
Mon, 26 May 2025 03:46:32 +0000 (12:46 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Mon, 26 May 2025 03:48:21 +0000 (12:48 +0900)
Change-Id: If6038111bfaa3c1663e29a44a53aeac4b15febe7
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/mtp_util.c

index e45f820bdea2d3b71e5ae4d4177393900853964c..8bdf13b485ec6a635f6fd43901b8e437f6cc0743 100644 (file)
@@ -341,37 +341,16 @@ void _util_set_local_lock_status(const phone_status_t val)
        return;
 }
 
-static bool _util_device_external_supported_cb(int storage_id, storage_type_e type,
-       storage_state_e state, const char *path, void *user_data)
-{
-       char *storage_path = (char *)user_data;
-
-       //DBG("storage id: %d, path: %s", storage_id, path);
-
-       if (type == STORAGE_TYPE_EXTERNAL && path != NULL) {
-               strncpy(storage_path, path, MTP_MAX_PATHNAME_SIZE);
-               storage_path[MTP_MAX_PATHNAME_SIZE] = 0;
-               //DBG("external storage path : %s", storage_path);
-       }
-
-       return TRUE;
-}
 /* LCOV_EXCL_STOP */
 
+/* LCOV_EXCL_START */
 void _util_get_external_path(char *external_path)
 {
-       int error = STORAGE_ERROR_NONE;
-
-       error = storage_foreach_device_supported(_util_device_external_supported_cb, external_path);
-
-       if (error != STORAGE_ERROR_NONE) {
-/* LCOV_EXCL_START */
-               ERR("get external storage path Fail");
-               if (external_path != NULL) {
-                       strncpy(external_path, MTP_EXTERNAL_PATH_CHAR, MTP_MAX_PATHNAME_SIZE);
-                       external_path[sizeof(MTP_EXTERNAL_PATH_CHAR) - 1] = 0;
-               }
-       }
+    if (external_path != NULL) {
+        strncpy(external_path, MTP_EXTERNAL_PATH_CHAR, MTP_MAX_PATHNAME_SIZE);
+        external_path[sizeof(MTP_EXTERNAL_PATH_CHAR) - 1] = 0;
+        DBG("%s", external_path);
+    }
 }
 
 int _util_wait_for_user()