qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for h


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device
Date: Mon, 19 May 2014 09:18:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Jun Li <address@hidden> writes:

> On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote:
>> On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote:
[...]
>>> diff --git a/vl.c b/vl.c
>>> index 9975e5a..1713c68 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -1184,6 +1184,22 @@ void add_boot_device_path(int32_t bootindex, 
>>> DeviceState *dev,
>>>       QTAILQ_INSERT_TAIL(&fw_boot_order, node, link);
>>>   }
>>>   +void remove_boot_device_path(int32_t bootindex, DeviceState
>>> *dev,
>>> +                             const char *suffix)
>> Why do we need suffix here?
>> It seems unused.

dev is unused as well.

> Hi Michael,
>
> I just want to keep the same as function "add_boot_device_path". Such as:
> void add_boot_device_path(int32_t bootindex, DeviceState *dev,
>                           const char *suffix)

Functions creating something commonly take different arguments than the
function to destroy it.

> I also find another function has define mon, but not be used in this 
> function. Such as:
> ---file vl.c---
> do_usb_del(Monitor *mon, const QDict *qdict)
> {
>     const char *devname = qdict_get_str(qdict, "devname");
>     if (usb_device_del(devname) < 0) {
>         error_report("could not delete USB device '%s'", devname);
>     }
> }

This one has a compelling reason: it's a mon_cmd_t mhandler.cmd
callback.



reply via email to

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