Add "ubd" to the list of disk prefixes

virDiskNameToIndex has a list of disk name prefixes that it uses in the
process of finding the disk's index. This list is missing "ubd" which
is the disk prefix used for UML domains.

Signed-off-by: Soren Hansen <soren@linux2go.dk>
This commit is contained in:
Soren Hansen 2010-08-10 13:46:46 +02:00 committed by Eric Blake
parent e9a8f3c644
commit 92e43e6d02
2 changed files with 2 additions and 1 deletions

View File

@ -13,3 +13,4 @@
<jfehlig@novell.com> <jfehlig@linux-ypgk.site>
<jclift@redhat.com> <justin@salasaga.org>
<berrange@redhat.com> <dan@berrange.com>
<soren@canonical.com> <soren@linux2go.dk>

View File

@ -2367,7 +2367,7 @@ const char *virEnumToString(const char *const*types,
int virDiskNameToIndex(const char *name) {
const char *ptr = NULL;
int idx = 0;
static char const* const drive_prefix[] = {"fd", "hd", "vd", "sd", "xvd"};
static char const* const drive_prefix[] = {"fd", "hd", "vd", "sd", "xvd", "ubd"};
unsigned int i;
for (i = 0; i < ARRAY_CARDINALITY(drive_prefix); i++) {