struct block_device *bdev;
char *fs_type;
enum unmount_operation option;
- bool udev_update;
};
struct pipe_data {
}
static int block_format(struct block_data *data,
- const char *fs_type, bool mount_point_updated, bool udev_update)
+ const char *fs_type, bool mount_point_updated)
{
const struct block_fs_ops *fs;
dd_list *elem;
/* need to update the partition data.
* It can be changed in doing format. */
- if (udev_update)
- retrieve_udev_device(data, mount_point_updated);
+ retrieve_udev_device(data, mount_point_updated);
out:
return r;
}
static int format_block_device(struct block_device *bdev,
const char *fs_type,
- enum unmount_operation option, bool udev_update)
+ enum unmount_operation option)
{
struct block_data *data;
int r;
}
}
- r = block_format(data, fs_type, bdev->mount_point_updated, udev_update);
+ r = block_format(data, fs_type, bdev->mount_point_updated);
if (r < 0)
_E("fail to format %s device : %d", data->devnode, r);
}
static struct format_data *get_format_data(
- const char *fs_type, enum unmount_operation option, bool udev_update)
+ const char *fs_type, enum unmount_operation option)
{
struct format_data *fdata;
else
fdata->fs_type = NULL;
fdata->option = option;
- fdata->udev_update = udev_update;
return fdata;
}
goto out;
}
- ret = format_block_device(bdev, fdata->fs_type, fdata->option, fdata->udev_update);
+ ret = format_block_device(bdev, fdata->fs_type, fdata->option);
if (ret < 0)
_E("fail to mount block device for %s", bdev->data->devnode);
if (need_format) {
struct format_data *fdata;
- fdata = get_format_data(NULL, 1, true);
+ fdata = get_format_data(NULL, UNMOUNT_FORCE);
if (!fdata) {
_E("Failed to get format data");
return -ENOMEM;
goto out;
}
- fdata = get_format_data(NULL, option, true);
+ fdata = get_format_data(NULL, option);
if (!fdata) {
_E("Failed to get format data");
goto out;
goto out;
}
- fdata = get_format_data(type, option, true);
+ fdata = get_format_data(type, option);
if (!fdata) {
_E("Failed to get format data");
goto out;