Signed-off-by: taeyoung <ty317.kim@samsung.com>
Change-Id: I7b6a4e580dc1e2e615cd3c39ec4762150156b09e
}
static void compat_cb(int storage_id,
}
static void compat_cb(int storage_id,
- storage_dev_e dev, storage_state_e state,
- const char *fstype, const char *fsuuid, const char *mountpath,
- bool primary, int flags, void *user_data)
+ storage_dev_e dev, storage_state_e state,
+ const char *fstype, const char *fsuuid, const char *mountpath,
+ bool primary, int flags, void *user_data)
{
struct compat_cb_info* ccb_info;
dd_list *elem;
{
struct compat_cb_info* ccb_info;
dd_list *elem;
- if(storage_id == STORAGE_TYPE_EXTERNAL && dev == STORAGE_DEV_EXT_SDCARD){
+ if (storage_id == STORAGE_TYPE_EXTERNAL && dev == STORAGE_DEV_EXT_SDCARD)
DD_LIST_FOREACH(compat_cb_list, elem, ccb_info)
ccb_info->user_cb(storage_id, state, ccb_info->user_data);
DD_LIST_FOREACH(compat_cb_list, elem, ccb_info)
ccb_info->user_cb(storage_id, state, ccb_info->user_data);
}
API int storage_set_state_changed_cb(int storage_id, storage_state_changed_cb callback, void *user_data)
}
API int storage_set_state_changed_cb(int storage_id, storage_state_changed_cb callback, void *user_data)
/* For backward compatability */
if (storage_id == STORAGE_TYPE_EXTERNAL) {
/* For backward compatability */
if (storage_id == STORAGE_TYPE_EXTERNAL) {
ret = storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, compat_cb, NULL);
ret = storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, compat_cb, NULL);
- if(ret == STORAGE_ERROR_NONE)
+ if (ret == STORAGE_ERROR_NONE)
compat_cb_init = 1;
else
return ret;
}
ccb_info = malloc(sizeof(struct compat_cb_info));
compat_cb_init = 1;
else
return ret;
}
ccb_info = malloc(sizeof(struct compat_cb_info));
return STORAGE_ERROR_OPERATION_FAILED;
ccb_info->user_cb = callback;
ccb_info->user_data = user_data;
return STORAGE_ERROR_OPERATION_FAILED;
ccb_info->user_cb = callback;
ccb_info->user_data = user_data;
struct compat_cb_info* ccb_info;
DD_LIST_FOREACH_SAFE(compat_cb_list, elem, elem_n, ccb_info) {
struct compat_cb_info* ccb_info;
DD_LIST_FOREACH_SAFE(compat_cb_list, elem, elem_n, ccb_info) {
- if(ccb_info->user_cb == callback){
+ if (ccb_info->user_cb == callback) {
DD_LIST_REMOVE(compat_cb_list, ccb_info);
free(ccb_info);
return STORAGE_ERROR_NONE;
DD_LIST_REMOVE(compat_cb_list, ccb_info);
free(ccb_info);
return STORAGE_ERROR_NONE;