* for example will fail.
*
* In order to open the device read-only, we are using the `read-only`
- * property of the libblkio driver in blkio_file_open().
+ * property of the libblkio driver in blkio_open().
*/
fd = qemu_open(path, O_RDWR, NULL);
if (fd < 0) {
return 0;
}
-static int blkio_file_open(BlockDriverState *bs, QDict *options, int flags,
- Error **errp)
+static int blkio_open(BlockDriverState *bs, QDict *options, int flags,
+ Error **errp)
{
const char *blkio_driver = bs->drv->protocol_name;
BDRVBlkioState *s = bs->opaque;
*/
#define BLKIO_DRIVER_COMMON \
.instance_size = sizeof(BDRVBlkioState), \
- .bdrv_open = blkio_file_open, \
+ .bdrv_open = blkio_open, \
.bdrv_close = blkio_close, \
.bdrv_co_getlength = blkio_co_getlength, \
.bdrv_co_truncate = blkio_truncate, \
}
}
-static int null_file_open(BlockDriverState *bs, QDict *options, int flags,
- Error **errp)
+static int null_open(BlockDriverState *bs, QDict *options, int flags,
+ Error **errp)
{
QemuOpts *opts;
BDRVNullState *s = bs->opaque;
.protocol_name = "null-co",
.instance_size = sizeof(BDRVNullState),
- .bdrv_open = null_file_open,
+ .bdrv_open = null_open,
.bdrv_parse_filename = null_co_parse_filename,
.bdrv_co_getlength = null_co_getlength,
.bdrv_co_get_allocated_file_size = null_co_get_allocated_file_size,
.protocol_name = "null-aio",
.instance_size = sizeof(BDRVNullState),
- .bdrv_open = null_file_open,
+ .bdrv_open = null_open,
.bdrv_parse_filename = null_aio_parse_filename,
.bdrv_co_getlength = null_co_getlength,
.bdrv_co_get_allocated_file_size = null_co_get_allocated_file_size,
qemu_vfio_pci_unmap_bar(s->vfio, 0, (void *)regs, 0, sizeof(NvmeBar));
}
- /* Cleaning up is done in nvme_file_open() upon error. */
+ /* Cleaning up is done in nvme_open() upon error. */
return ret;
}
g_free(s->device);
}
-static int nvme_file_open(BlockDriverState *bs, QDict *options, int flags,
- Error **errp)
+static int nvme_open(BlockDriverState *bs, QDict *options, int flags,
+ Error **errp)
{
const char *device;
QemuOpts *opts;
.create_opts = &bdrv_create_opts_simple,
.bdrv_parse_filename = nvme_parse_filename,
- .bdrv_open = nvme_file_open,
+ .bdrv_open = nvme_open,
.bdrv_close = nvme_close,
.bdrv_co_getlength = nvme_co_getlength,
.bdrv_probe_blocksizes = nvme_probe_blocksizes,
return ret;
}
-static int ssh_file_open(BlockDriverState *bs, QDict *options, int bdrv_flags,
- Error **errp)
+static int ssh_open(BlockDriverState *bs, QDict *options, int bdrv_flags,
+ Error **errp)
{
BDRVSSHState *s = bs->opaque;
BlockdevOptionsSsh *opts;
.protocol_name = "ssh",
.instance_size = sizeof(BDRVSSHState),
.bdrv_parse_filename = ssh_parse_filename,
- .bdrv_open = ssh_file_open,
+ .bdrv_open = ssh_open,
.bdrv_co_create = ssh_co_create,
.bdrv_co_create_opts = ssh_co_create_opts,
.bdrv_close = ssh_close,