[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path directly |
Date: |
Tue, 20 Jan 2015 17:10:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 19/01/2015 14:23, address@hidden wrote:
> @@ -780,6 +788,12 @@ static int qdev_get_fw_dev_path_helper(DeviceState *dev,
> char *p, int size)
> d = bus_get_fw_dev_path(dev->parent_bus, dev);
> }
> if (d) {
> + l += snprintf(p + l, size - l, "%s/", d);
> + g_free(d);
> + }
> +
> + d = qdev_get_own_fw_dev_path_from_handler(dev->parent_bus, dev);
This changes preexisting behavior. If d was true, you wouldn't go down
the following else. Now it does.
I was thinking it should be handled though the "suffix" argument to
add_boot_device_path, but that's harder now that the suffix has to be
passed to device_add_bootindex_property.
Perhaps you could call qdev_get_own_fw_dev_path_from_handler in
get_boot_devices_list, and convert non-NULL suffixes to implementations
of FWPathProvider?
Paolo
> + if (d) {
> l += snprintf(p + l, size - l, "%s", d);
> g_free(d);
> } else {
[Qemu-devel] [PATCH 2/4] vhost-scsi: add bootindex property, arei.gonglei, 2015/01/19
[Qemu-devel] [PATCH 3/4] vhost-scsi: realize the TYPE_FW_PATH_PROVIDER interface, arei.gonglei, 2015/01/19
[Qemu-devel] [PATCH 4/4] vhost-scsi: add an ioctl interface to get target id, arei.gonglei, 2015/01/19