Modify return value for invalid storage id 50/102550/2 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141744 accepted/tizen/3.0.m2/tv/20170104.142128 accepted/tizen/3.0.m2/wearable/20170104.142422 accepted/tizen/3.0/common/20161209.094921 accepted/tizen/3.0/ivi/20161209.002546 accepted/tizen/3.0/mobile/20161209.002510 accepted/tizen/3.0/tv/20161209.002527 accepted/tizen/3.0/wearable/20161209.002536 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161208.091728
authorpr.jung <pr.jung@samsung.com>
Tue, 6 Dec 2016 05:44:49 +0000 (14:44 +0900)
committerpr.jung <pr.jung@samsung.com>
Tue, 6 Dec 2016 05:48:34 +0000 (14:48 +0900)
Change-Id: I84256fb1ad79fbe2b915e10fc52d5a35ccade445
Signed-off-by: pr.jung <pr.jung@samsung.com>
include/storage-experimental.h
src/storage-inhouse.c

index 65f11e1..a86b272 100644 (file)
@@ -39,8 +39,8 @@ extern "C" {
  * @since_tizen 3.0
  *
  * @param[in] storage_id The storage id
- * @param[out] storage type (internal, external).
- * @param[out] the kind of storage device for external type (sdcard, usb).
+ * @param[out] type storage type (internal or external).
+ * @param[out] dev the kind of storage device for external type (sdcard, usb). If type is #STORAGE_TYPE_EXTERNAL, then value of this param is invalid.
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
@@ -48,7 +48,6 @@ extern "C" {
  * @retval #STORAGE_ERROR_NONE               Successful
  * @retval #STORAGE_ERROR_INVALID_PARAMETER  Invalid parameter
  * @retval #STORAGE_ERROR_OUT_OF_MEMORY      Out of memory
- * @retval #STORAGE_ERROR_NOT_SUPPORTED      Storage not supported
  * @retval #STORAGE_ERROR_NO_DEVICE          No such device
  */
 int storage_get_type_dev(int storage_id, storage_type_e *type, storage_dev_e *dev);
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;
        }