Modify return value for invalid storage id
[platform/core/system/libstorage.git] / src / storage-inhouse.c
index 37fa5a0..6dfd4f1 100755 (executable)
@@ -177,7 +177,7 @@ API int storage_get_type_dev(int storage_id, storage_type_e *type, storage_dev_e
 
        if (storage_id < 0) {
                _E("Invalid parameger");
-               return STORAGE_ERROR_NOT_SUPPORTED;
+               return STORAGE_ERROR_NO_DEVICE;
        }
 
        if (!type) {
@@ -209,7 +209,7 @@ API int storage_get_type_dev(int storage_id, storage_type_e *type, storage_dev_e
        ret = storage_ext_get_device_info(storage_id, ext_dev);
        if (ret < 0) {
                _E("Cannot get the storage with id (%d, ret:%d)", storage_id, ret); //LCOV_EXCL_LINE
-               ret = STORAGE_ERROR_NOT_SUPPORTED;
+               ret = STORAGE_ERROR_NO_DEVICE;
                goto out;
        }