qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Clean up pci_drive_hot_add()'s use of BlockInte


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] Clean up pci_drive_hot_add()'s use of BlockInterfaceType
Date: Thu, 22 Nov 2012 15:51:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Alexander Graf <address@hidden> writes:

> On 22.11.2012, at 15:16, Markus Armbruster wrote:
>
>> pci_drive_hot_add() parameter type has the wrong type: int instead of
>> BlockInterfaceType.  It's actually redundant, so we can just drop it.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> hw/device-hotplug.c | 11 ++++-------
>> hw/pci-hotplug.c    |  7 +++----
>> sysemu.h            |  3 +--
>> 3 files changed, 8 insertions(+), 13 deletions(-)
>> 
>> diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
>> index eec0fe3..6d9c080 100644
>> --- a/hw/device-hotplug.c
>> +++ b/hw/device-hotplug.c
>> @@ -49,18 +49,16 @@ DriveInfo *add_init_drive(const char *optstr)
>> }
>> 
>> #if !defined(TARGET_I386)
>> -int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
>> -                      DriveInfo *dinfo, int type)
>> +int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
>> {
>>     /* On non-x86 we don't do PCI hotplug */
>> -    monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
>> +    monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
>
> Can't we expose names instead? I don't really want internal enum
> numbering be part of our external CLI interface :)

Fixing that would be nice, but it's outside this patch's scope.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]