From 7dc5af5545bb72e1343cc959b3f0e5cdd8758f1f Mon Sep 17 00:00:00 2001 From: Dominik Dingel Date: Fri, 26 Apr 2013 02:12:49 +0000 Subject: Common: Add quick access to first boot device Instead of manually parsing the boot_list as character stream, we can access the nth boot device, specified by the position in the boot order. Signed-off-by: Dominik Dingel Reviewed-by: Anthony Liguori Signed-off-by: Alexander Graf --- include/sysemu/sysemu.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sysemu') diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 6578782fc3..43b961c0f6 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -181,6 +181,8 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev, const char *suffix); char *get_boot_devices_list(size_t *size); +DeviceState *get_boot_device(uint32_t position); + bool usb_enabled(bool default_usb); extern QemuOptsList qemu_drive_opts; -- cgit v1.2.3