Jun Li <junm...@gmail.com> 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.