diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-03-22 10:48:03 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-04-17 10:23:27 +0200 |
commit | 65bb3a5c11b00671c1067ee27ea364b6d7e6e2ac (patch) | |
tree | 43a6f3762c1bb39eeffff08ce14994aa67b725b4 /hw/usb/host-linux.c | |
parent | ee008ba62673943d5cd40c5761955efdbca444cd (diff) |
Add bootindex support to usb-host and usb-redir
When passing through a usb pendrive seabios will present it in the F12
boot menu and will happily boot from it.
This patch adds bootorder support so you can even make it the default
boot device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/host-linux.c')
-rw-r--r-- | hw/usb/host-linux.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index 90919c242a..5eb69160b0 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -115,6 +115,7 @@ typedef struct USBHostDevice { int addr; char port[MAX_PORTLEN]; struct USBAutoFilter match; + int32_t bootindex; int seen, errcount; QTAILQ_ENTRY(USBHostDevice) next; @@ -1403,6 +1404,7 @@ static int usb_host_initfn(USBDevice *dev) if (s->match.bus_num != 0 && s->match.port != NULL) { usb_host_claim_port(s); } + add_boot_device_path(s->bootindex, &dev->qdev, NULL); return 0; } @@ -1418,6 +1420,7 @@ static Property usb_host_dev_properties[] = { DEFINE_PROP_HEX32("vendorid", USBHostDevice, match.vendor_id, 0), DEFINE_PROP_HEX32("productid", USBHostDevice, match.product_id, 0), DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4), + DEFINE_PROP_INT32("bootindex", USBHostDevice, bootindex, -1), DEFINE_PROP_END_OF_LIST(), }; |