value = result->value;
if (info->check_size > 0 && check_size < 0)
- check_size = (storage_info.total_size < info->check_size)? 1 : 0;
+ check_size = (storage_info.total_size < info->check_size) ? 1 : 0;
if (MATCH(name, "CHECK_SIZE"))
info->check_size = atoi(value);
else if (check_size == 0 && MATCH(name, "RESERVE"))
if (ret)
return -errno;
+ memset(buf, 0, sizeof(struct statvfs_32));
+
buf->f_bsize = s.f_bsize;
buf->f_frsize = s.f_frsize;
buf->f_blocks = (unsigned long)s.f_blocks;
return 0;
}
-static int mount_check(const char* path)
+static int mount_check(const char *path)
{
int ret = false;
- struct mntent* mnt;
- const char* table = "/etc/mtab";
- FILE* fp;
+ struct mntent *mnt;
+ const char *table = "/etc/mtab";
+ FILE *fp;
fp = setmntent(table, "r");
if (!fp)
return ret;
- while ((mnt=getmntent(fp))) {
+ while ((mnt = getmntent(fp))) {
if (!strcmp(mnt->mnt_dir, path)) {
ret = true;
break;
return SDCARD_PATH;
}
-static void sdcard_state_cb(keynode_t* key, void* data)
+static void sdcard_state_cb(keynode_t *key, void *data)
{
struct storage_cb_info *cb_info;
dd_list *elem;
*path = strdup(st->root());
if (!*path) {
- _E("Failed to copy the root string : %s", strerror(errno));
+ _E("Failed to copy the root string : %d", errno);
return STORAGE_ERROR_OUT_OF_MEMORY;
}
*path = strdup(temp);
if (!*path) {
- _E("Failed to copy the directory(%d) string : %s", type, strerror(errno));
+ _E("Failed to copy the directory(%d) string : %d", type, errno);
return STORAGE_ERROR_OUT_OF_MEMORY;
}