Re: [Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path directly

2015-01-21 Thread Gonglei
On 2015/1/21 18:52, Paolo Bonzini wrote: On 21/01/2015 03:14, Gonglei wrote: On 2015/1/21 0:10, Paolo Bonzini wrote: On 19/01/2015 14:23, arei.gong...@huawei.com wrote: @@ -780,6 +788,12 @@ static int qdev_get_fw_dev_path_helper(DeviceState *dev, char *p, int size) d =

Re: [Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path directly

2015-01-21 Thread Paolo Bonzini
On 21/01/2015 03:14, Gonglei wrote: On 2015/1/21 0:10, Paolo Bonzini wrote: On 19/01/2015 14:23, arei.gong...@huawei.com 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);

Re: [Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path directly

2015-01-20 Thread Paolo Bonzini
On 19/01/2015 14:23, arei.gong...@huawei.com 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);

Re: [Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path directly

2015-01-20 Thread Gonglei
On 2015/1/21 0:10, Paolo Bonzini wrote: On 19/01/2015 14:23, arei.gong...@huawei.com 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) { +

[Qemu-devel] [PATCH 1/4] qdev: support to get a device firmware path directly

2015-01-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com commit 6b1566c (qdev: Introduce FWPathProvider interface) did a good job for supproting to get firmware path on some different architectures. Moreover further more, we can use the interface to get firmware path name for a device which isn't attached a