[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path functi
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path function |
Date: |
Thu, 16 Oct 2014 12:04:39 +0200 |
On 15 October 2014 11:05, Gerd Hoffmann <address@hidden> wrote:
> From: Gonglei <address@hidden>
>
> Introduce del_boot_device_path() to clean up fw_cfg content when
> hot-unplugging a device that refers to a bootindex or update a
> existent devcie's bootindex.
> +void del_boot_device_path(DeviceState *dev, const char *suffix)
> +{
> + FWBootEntry *i;
> +
> + if (dev == NULL) {
> + return;
> + }
> +
> + QTAILQ_FOREACH(i, &fw_boot_order, link) {
> + if ((!suffix || !g_strcmp0(i->suffix, suffix)) &&
I've just noticed that this won't build with our minimum
required glib version: g_strcmp0 wasn't introduced
until glib 2.16.
It should be fairly easy to provide a back-compat implementation
in our glib-compat.h header, or you could just rephrase this
to work with the usual strcmp, since you're already doing a
manual NULL check on one of the arguments.
thanks
-- PMM
- [Qemu-devel] [PULL 00/34] allow changing bootorder via monitor, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 23/34] isa-fdc: remove bootindexA/B property from qdev to qom, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 24/34] scsi: add bootindex to qom property, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path function, Gerd Hoffmann, 2014/10/15
- Re: [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path function,
Peter Maydell <=
- [Qemu-devel] [PULL 25/34] ide: add bootindex to qom property, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 01/34] bootdevice: move bootdevice related code to new file bootdevice.c, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 13/34] rtl8139: add bootindex to qom property, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 26/34] virtio-blk: add bootindex to qom property, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 21/34] vfio: remove bootindex property from qdev to qom, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 33/34] bootindex: delete bootindex when device is removed, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 02/34] bootindex: add check bootindex function, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 06/34] bootindex: support to set a existent device's bootindex to -1, Gerd Hoffmann, 2014/10/15
- [Qemu-devel] [PULL 17/34] net: remove bootindex property from qdev to qom, Gerd Hoffmann, 2014/10/15