[libvirt] [PATCH] 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> --- src/util/util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 8f2a17e..c173e49 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -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++) { -- 1.7.0.4

On Tue, Aug 10, 2010 at 01:46:46PM +0200, Soren Hansen wrote:
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> --- src/util/util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util/util.c b/src/util/util.c index 8f2a17e..c173e49 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -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++) {
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 08/10/2010 06:48 AM, Daniel P. Berrange wrote:
On Tue, Aug 10, 2010 at 01:46:46PM +0200, Soren Hansen wrote:
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>
ACK
Pushed, along with a .mailmap update to satisfy 'make syntax-check'. Soren, this patch introduced a third distinct author address for you - let me know if you want AUTHORS updated to swap which one is listed as your primary address. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Tue, Aug 10, 2010 at 07:18:06AM -0600, Eric Blake wrote:
Pushed, along with a .mailmap update to satisfy 'make syntax-check'.
Soren, this patch introduced a third distinct author address for you - let me know if you want AUTHORS updated to swap which one is listed as your primary address.
soren@canonical.com is no longer valid, so I won't be submitting any more patches from that address. Let's go with soren@linux2go.dk as the primary one and leave soren@ubuntu.com as an alias. -- Soren Hansen <soren@linux2go.dk> Systems Architect, The Rackspace Cloud Ubuntu Developer

On 08/10/2010 07:51 AM, Soren Hansen wrote:
On Tue, Aug 10, 2010 at 07:18:06AM -0600, Eric Blake wrote:
Pushed, along with a .mailmap update to satisfy 'make syntax-check'.
Soren, this patch introduced a third distinct author address for you - let me know if you want AUTHORS updated to swap which one is listed as your primary address.
soren@canonical.com is no longer valid, so I won't be submitting any more patches from that address.
Let's go with soren@linux2go.dk as the primary one and leave soren@ubuntu.com as an alias.
Updated accordingly; thanks for the rapid feedback. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Soren Hansen