[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path fu
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function |
Date: |
Mon, 01 Sep 2014 08:43:20 +0200 |
Hi,
> +static bool is_same_fw_dev_path(DeviceState *src, DeviceState *dst)
> +{
> + bool ret = false;
> + char *devpath_src = qdev_get_fw_dev_path(src);
> + char *devpath_dst = qdev_get_fw_dev_path(dst);
> +
> + if (!strcmp(devpath_src, devpath_dst)) {
> + ret = true;
> + }
> +
> + g_free(devpath_src);
> + g_free(devpath_dst);
> + return ret;
> +}
> +
> +void del_boot_device_path(DeviceState *dev)
> +{
> + FWBootEntry *i;
> +
> + assert(dev != NULL);
> +
> + /* remove all entries of the assigned device */
> + QTAILQ_FOREACH(i, &fw_boot_order, link) {
> + if (i->dev == NULL) {
> + continue;
> + }
> + if ((i->dev == dev || is_same_fw_dev_path(i->dev, dev))) {
Why this is needed? Is there any case where i-->dev != dev but
is_same_fw_dev_path() returns true?
cheers,
Gerd
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/01
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/02
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/02
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gerd Hoffmann, 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/03
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Gonglei (Arei), 2014/09/04
- Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function, Eduardo Habkost, 2014/09/04