storage_ext_device *dev;
if (storage_id < 0)
- return -EINVAL;
+ return -ENOTSUP;
dev = calloc(1, sizeof(storage_ext_device));
if (!dev) {
storage_ext_device *dev;
int ret;
- if (storage_id < 0 || !path)
+ if (storage_id < 0)
+ return -ENOTSUP;
+
+ if (!path)
return -EINVAL;
dev = calloc(1, sizeof(storage_ext_device));
storage_ext_device *dev;
int ret;
- if (storage_id < 0 || !state)
+ if (storage_id < 0)
+ return -ENOTSUP;
+
+ if (!state)
return -EINVAL;
dev = calloc(1, sizeof(storage_ext_device));
char root[PATH_MAX];
int ret;
- if (!path || storage_id < 0) {
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
+ if (!path) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
}
dd_list *elem;
bool found;
- if (!path || storage_id < 0) {
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
+ if (!path) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
}
const struct storage_ops *st;
dd_list *elem;
- if (!type || storage_id < 0) {
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
+ if (!type) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
}
dd_list *elem;
int ret;
- if (!state || storage_id < 0) {
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
+ if (!state) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
}
int ret;
dd_list *elem;
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
if (!callback) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
int ret;
dd_list *elem;
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
if (!callback) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
int ret;
dd_list *elem;
- if (!bytes || storage_id < 0) {
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
+ if (!bytes) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
}
out:
if (ret < 0) {
_E("Failed to get total memory : id(%d)", storage_id);
+ if (ret == -ENOTSUP)
+ return STORAGE_ERROR_NOT_SUPPORTED;
return STORAGE_ERROR_OPERATION_FAILED;
}
int ret;
dd_list *elem;
+ if (storage_id < 0)
+ return STORAGE_ERROR_NOT_SUPPORTED;
+
if (!bytes) {
_E("Invalid parameger");
return STORAGE_ERROR_INVALID_PARAMETER;
out:
if (ret < 0) {
_E("Failed to get available memory : id(%d)", storage_id);
+ if (ret == -ENOTSUP)
+ return STORAGE_ERROR_NOT_SUPPORTED;
return STORAGE_ERROR_OPERATION_FAILED;
}