From 1ca4d09ae0bcc2fdd6aeef0fdc11f82394f7e757 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Wed, 8 Dec 2010 13:35:05 +0200 Subject: Add bootindex parameter to net/block/fd device If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order. Signed-off-by: Gleb Natapov Signed-off-by: Blue Swirl --- hw/ide/qdev.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/ide/qdev.c') diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 01a181bb45..2bb5c27341 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -21,6 +21,7 @@ #include "qemu-error.h" #include #include "blockdev.h" +#include "sysemu.h" /* --------------------------------- */ @@ -143,6 +144,10 @@ static int ide_drive_initfn(IDEDevice *dev) if (!dev->serial) { dev->serial = qemu_strdup(s->drive_serial_str); } + + add_boot_device_path(dev->conf.bootindex, &dev->qdev, + dev->unit ? "/disk@1" : "/disk@0"); + return 0; } -- cgit v1.2.3