#define EXTENDED_INTERNAL_PATH "/run/extended-internal-sd"
#define PATH_LEN 55
-#define EXTENDED_SD_PATH "/opt/media/extendedsd"
+#define EXTENDED_SD_PATH "/opt/extendedsd"
#define EXTENDED_SD_STRING "ExtendedInternalSD"
+#define EXT4_NAME "ext4"
+
/* Minimum value of block id */
#define BLOCK_ID_MIN 10
/* For 2.4 Backward Compatibility */
BLOCK_FLAG_CLEAR_ALL(data);
/* for 2.4 backward compatibility */
+ // What if storage id 1 is existed? (multi sdcard case)
if (data->primary == true && data->block_type == BLOCK_MMC_DEV)
data->id = EXT_PRIMARY_SD_FIXID;
else
{
const struct block_fs_ops *fs;
dd_list *elem;
+ const char *fstype;
int len;
int r;
if (!data || !data->devnode || !data->mount_point)
return -EINVAL;
- if (!fs_type)
- fs_type = data->fs_type;
+ if (data->block_type == BLOCK_MMC_EXTENDED_INTERNAL_DEV)
+ fstype = EXT4_NAME;
+ else {
+ if (!fs_type)
+ fstype = data->fs_type;
+ else
+ fstype = fs_type;
+ }
fs = NULL;
- len = strlen(fs_type);
+ len = strlen(fstype);
DD_LIST_FOREACH(fs_head, elem, fs) {
- if (!strncmp(fs->name, fs_type, len))
+ if (!strncmp(fs->name, fstype, len))
break;
}
if (!fs) {
BLOCK_FLAG_SET(data, FS_NOT_SUPPORTED);
- _E("not supported file system(%s)", fs_type);
+ _E("not supported file system(%s)", fstype);
return -ENOTSUP;
}
static void release_format_data(struct format_data *data)
{
if (data) {
- free(data->fs_type);
+ if (data->fs_type)
+ free(data->fs_type);
free(data);
}
}
}
/*
- Method name Method call format string Reply format string
-{ "ShowDeviceList", NULL, NULL, request_show_device_list },
-{ "GetDeviceList" , "s", "a(issssssisibii)", request_get_device_list },
-{ "GetDeviceList2", "s", "a(issssssisibi)", request_get_device_list_2 },
-{ "Mount", "is", "i", request_public_mount_block },
-{ "Unmoun, "ii", "i", request_public_unmount_block },
-{ "Format", "ii", "i", request_format_block },
-{ "GetDeviceInfo", "i", "(issssssisibii)", request_get_device_info },
-{ "GetMmcPrimary", NULL, "(issssssisibii)", request_get_mmc_primary },
-{ "PrivateMount", "is", "i", request_private_mount_block },
-{ "PrivateUnmount", "ii", "i", request_private_unmount_block },
+ Method name Method call format string Reply format string
+{ "ShowDeviceList", NULL, NULL, request_show_device_list },
+{ "GetDeviceList", "s", "a(issssssisibii)", request_get_device_list },
+{ "GetDeviceList2", "s", "a(issssssisibi)", request_get_device_list_2 },
+{ "Mount", "is", "i", request_public_mount_block },
+{ "Unmoun, "ii", "i", request_public_unmount_block },
+{ "Format", "ii", "i", request_format_block },
+{ "GetDeviceInfo", "i", "(issssssisibii)", request_get_device_info },
+{ "GetMmcPrimary", NULL, "(issssssisibii)" , request_get_mmc_primary },
+{ "PrivateMount", "is", "i", request_private_mount_block },
+{ "PrivateUnmount", "ii", "i", request_private_unmount_block },
*/
static const dbus_method_s manager_methods[] = {