On 02/27/2017 04:56 PM, Jeff Cody wrote:
>>> static BlockDriver bdrv_rbd = {
>
>>> - .instance_size = sizeof(BDRVRBDState),
>>> - .bdrv_needs_filename = true,
>>> - .bdrv_file_open = qemu_rbd_open,
>>> - .bdrv_close = qemu_rbd_close,
>>> - .bdrv_create = qemu_rbd_create,
>>> - .bdrv_has_zero_init = bdrv_has_zero_init_1,
>>> - .bdrv_get_info = qemu_rbd_getinfo,
>>> - .create_opts = &qemu_rbd_create_opts,
>>> - .bdrv_getlength = qemu_rbd_getlength,
>>> - .bdrv_truncate = qemu_rbd_truncate,
>>> - .protocol_name = "rbd",
>>> + .format_name = "rbd",
>>> + .instance_size = sizeof(BDRVRBDState),
>>> + .bdrv_parse_filename = qemu_rbd_parse_filename,
>>> + .bdrv_file_open = qemu_rbd_open,
>>> + .bdrv_close = qemu_rbd_close,
>>> + .bdrv_create = qemu_rbd_create,
>>> + .bdrv_has_zero_init = bdrv_has_zero_init_1,
>>> + .bdrv_get_info = qemu_rbd_getinfo,
>>> + .create_opts = &qemu_rbd_create_opts,
>>
>> Pointless &; might as well remove it for consistency while touching it.
>>
>
> I'm not sure I understand - we need the '&' here for the .create_opts
> initializer, unless I am overlooking something.Nope, I'm overlooking. I assumed that everything here was a function pointer, but you are right that .create_opts takes an object (not a function) pointer, so the & is necessary. Maybe I need to take a short break from reviewing... -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
