[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qdev: don't add typename to fw_dev_path when get_fw

From: Amos Kong
Subject: [Qemu-devel] [PATCH] qdev: don't add typename to fw_dev_path when get_fw_dev_path isn't implemented
Date: Tue, 28 May 2013 18:25:34 +0800

Currently we add typename to fw_dev_path if virtio-bus
doesn't have get_fw_dev_path implementation, the fw_dev_path
passed to seabios is not expected, the typename is redundant.
It causes that bootindex parameter of scsi device doesn't work.

This patch changes the qdev_get_fw_dev_path_helper() to add
nothing if device doesn't have get_fw_dev_path implementation.

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Amos Kong <address@hidden>
 hw/core/qdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 6985ad8..150255d 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -515,7 +515,7 @@ static int qdev_get_fw_dev_path_helper(DeviceState *dev, 
char *p, int size)
             l += snprintf(p + l, size - l, "%s", d);
         } else {
-            l += snprintf(p + l, size - l, "%s", 
+            return l;
     l += snprintf(p + l , size - l, "/");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]