From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhHBE-0004tF-7Q for qemu-devel@nongnu.org; Tue, 28 May 2013 06:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhHB9-0000vE-Bx for qemu-devel@nongnu.org; Tue, 28 May 2013 06:31:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhHB8-0000v5-Lf for qemu-devel@nongnu.org; Tue, 28 May 2013 06:30:55 -0400 Message-ID: <51A48752.7000901@redhat.com> Date: Tue, 28 May 2013 12:30:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1369736734-15449-1-git-send-email-akong@redhat.com> In-Reply-To: <1369736734-15449-1-git-send-email-akong@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qdev: don't add typename to fw_dev_path when get_fw_dev_path isn't implemented List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: aliguori@us.ibm.com, kevin@koconnor.net, seabios@seabios.org, qemu-devel@nongnu.org Il 28/05/2013 12:25, Amos Kong ha scritto: > 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. This is not enough, because it would change behavior for other buses that do not have get_fw_dev_path. You also need to add a default implementation of the callback. > Signed-off-by: Paolo Bonzini You don't need my Signed-off-by. On the other hand, you should Cc qemu-stable@nongnu.org. Paolo > Signed-off-by: Amos Kong > --- > 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); > g_free(d); > } else { > - l += snprintf(p + l, size - l, "%s", object_get_typename(OBJECT(dev))); > + return l; > } > } > l += snprintf(p + l , size - l, "/"); >