[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 05/30] bootindex: rework add_boot_device_path
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH v9 05/30] bootindex: rework add_boot_device_path function |
Date: |
Thu, 11 Sep 2014 07:27:36 +0000 |
Hi,
> Subject: Re: [PATCH v9 05/30] bootindex: rework add_boot_device_path
> function
>
> > +static void del_original_boot_device(DeviceState *dev, const char *suffix)
>
> Hmm, now we have two simliar delete functions. One which deletes all
> entries belonging to a device, and one deleting only in case the suffix
> matches (the later being needed to handle the floppy case I guess?).
>
Yes.
> Can't we combine the two into one, to avoid code duplication?
Yes, we can. :)
> For example by deleting all entries for a device in case suffix == NULL?
>
Good point. When we hot-unplug a device we can pass 'suffix == NULL'
to del_original_boot_device(DeviceState *dev, const char *suffix), and
then remove all entries belonging to this device.
Thanks! Will rework it.
Best regards,
-Gonglei
- [Qemu-devel] [PATCH v9 00/30] modify boot order of guest, and take effect after rebooting, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 02/30] bootindex: add check bootindex function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 03/30] bootindex: add del_boot_device_path function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 01/30] bootdevice: move bootdevice related code to new file bootdevice.c, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 06/30] bootindex: support to set a existent device's bootindex to -1, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 07/30] bootindex: add a setter/getter functions wrapper for bootindex property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 05/30] bootindex: rework add_boot_device_path function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 08/30] virtio-net: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 04/30] fw_cfg: add fw_cfg_machine_reset function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 12/30] pcnet: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 13/30] rtl8139: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 14/30] spapr_lian: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 10/30] eepro100: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 15/30] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 09/30] e1000: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 18/30] virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 17/30] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10