summaryrefslogtreecommitdiffstats
path: root/include/sysemu/blockdev.h
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2014-10-01 14:19:24 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2014-10-03 10:30:33 +0100
commita66c9dc734fb30de1e18e9dc217f2d37e16c492a (patch)
treec552c8b9c139288451d1a379bf18409c26ecaae4 /include/sysemu/blockdev.h
parentcf77b2d25eeabe268412cf41d4ea38ec5de8c611 (diff)
downloadhqemu-a66c9dc734fb30de1e18e9dc217f2d37e16c492a.zip
hqemu-a66c9dc734fb30de1e18e9dc217f2d37e16c492a.tar.gz
blockdev: Orphaned drive search
When users use command line options like -hda, -cdrom, or even -drive if=ide, it is up to the board initialization routines to pick up these drives and create backing devices for them. Some boards, like Q35, have not been doing this. However, there is no warning explaining why certain drive specifications are just silently ignored, so this function adds a check to print some warnings to assist users in debugging these sorts of issues in the future. This patch will not warn about drives added with if_none, for which it is not possible to tell in advance if the omission of a backing device is an issue. A warning in these cases is considered appropriate. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1412187569-23452-2-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/sysemu/blockdev.h')
-rw-r--r--include/sysemu/blockdev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index abec381..3040286 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -38,6 +38,7 @@ struct DriveInfo {
int unit;
int auto_del; /* see blockdev_mark_auto_del() */
bool enable_auto_del; /* Only for legacy drive_new() */
+ bool is_default; /* Added by default_drive() ? */
int media_cd;
int cyls, heads, secs, trans;
QemuOpts *opts;
@@ -46,6 +47,7 @@ struct DriveInfo {
};
DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
+bool drive_check_orphaned(void);
DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
int drive_get_max_bus(BlockInterfaceType type);
DriveInfo *drive_get_next(BlockInterfaceType type);
OpenPOWER on IntegriCloud