Apply line coverage comments
[platform/core/system/libstorage.git] / src / storage-inhouse.c
index 6dfd4f1..636a9c1 100755 (executable)
@@ -60,8 +60,10 @@ API int storage_get_compat_internal_path(const char* origin, int len, char* comp
 
        // this API works on place where compat path is bind-mounted
        if (!is_compat_bind_mount()) {
+               //LCOV_EXCL_START System Error
                _E("No compat bind mount");
                return -1;
+               //LCOV_EXCL_STOP
        }
 
        str = tzplatform_getenv(TZ_USER_CONTENT);
@@ -73,8 +75,10 @@ API int storage_get_compat_internal_path(const char* origin, int len, char* comp
 
        r = snprintf(compat, len, "%s%s", COMPAT_DIR, origin + str_len);
        if (r < 0) {
+               //LCOV_EXCL_START System Error
                _E("Failed to create new path");
                return -1;
+               //LCOV_EXCL_STOP
        }
 
        return 0;
@@ -111,8 +115,10 @@ API int storage_get_origin_internal_path(const char* compat, int len, char* orig
 
        // this API works on place where compat path is bind-mounted
        if (!is_compat_bind_mount()) {
+               //LCOV_EXCL_START System Error
                _E("no compat bind mount");
                return -1;
+               //LCOV_EXCL_STOP
        }
 
        compat_len = strlen(COMPAT_DIR);
@@ -123,8 +129,10 @@ API int storage_get_origin_internal_path(const char* compat, int len, char* orig
 
        r = snprintf(origin, len, "%s%s", tzplatform_getenv(TZ_USER_CONTENT), compat + compat_len);
        if (r < 0) {
+               //LCOV_EXCL_START System Error
                _E("failed to create new path");
                return -1;
+               //LCOV_EXCL_STOP
        }
 
        return 0;
@@ -144,8 +152,10 @@ API int storage_get_primary_sdcard(int *storage_id, char **path)
                        "GetMmcPrimary",
                        NULL);
        if (!result) {
+               //LCOV_EXCL_START System Error
                _E("Failed to get primary sdcard partition"); //LCOV_EXCL_LINE
                return STORAGE_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+               //LCOV_EXCL_STOP
        }
 
        g_variant_get(result, "(issssssisibii)",
@@ -163,7 +173,7 @@ API int storage_get_primary_sdcard(int *storage_id, char **path)
 
        *path = strdup(info.mount_point);
        if (*path == NULL)
-               return STORAGE_ERROR_OUT_OF_MEMORY;
+               return STORAGE_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE System Error
 
        *storage_id = info.storage_id;
 
@@ -200,10 +210,10 @@ API int storage_get_type_dev(int storage_id, storage_type_e *type, storage_dev_e
 
        ext_dev = calloc(1, sizeof(storage_ext_device));
        if (!ext_dev) {
-//LCOV_EXCL_START System Error
+               //LCOV_EXCL_START System Error
                _E("calloc failed");
                return STORAGE_ERROR_OUT_OF_MEMORY;
-//LCOV_EXCL_STOP
+               //LCOV_EXCL_STOP
        }
 
        ret = storage_ext_get_device_info(storage_id, ext_dev);