Re: [PATCH 1/2] test_driver: provide basic disk hotplug support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/1/24 23:31, John Levon wrote:
> Add some basic plumbing, based on the qemu driver.
> 
> Signed-off-by: John Levon <john.levon@xxxxxxxxxxx>
> ---
>  src/test/test_driver.c | 162 ++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 161 insertions(+), 1 deletion(-)
> 
> diff --git a/src/test/test_driver.c b/src/test/test_driver.c
> index 03afe8af8d..b7e36e8451 100644
> --- a/src/test/test_driver.c
> +++ b/src/test/test_driver.c

> +
> +/**
> + * testDomainAttachDeviceDiskLive:
> + * @driver: test driver struct
> + * @vm: domain object
> + * @dev: device to attach (expected type is DISK)
> + *
> + * Attach a new disk or in case of cdroms/floppies change the media in the drive.
> + * This function handles all the necessary steps to attach a new storage source
> + * to the VM.
> + */
> +static int
> +testDomainAttachDeviceDiskLive(testDriver *driver,
> +                               virDomainObj *vm,
> +                               virDomainDeviceDef *dev)
> +{
> +    return testDomainAttachDeviceDiskLiveInternal(driver, vm, dev);

You've removed too much. As comment above says, and per
virDomainAttachDevice() documentation, there is one (arguably weird) use
of this function: to change media in CDROM/FLOPPY devices.

> +}
> +
> +

Michal



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux