From c05cf3f3e10edce38e8c9c5378928c3f5810f75e Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 30 Jul 2008 08:52:44 +0000 Subject: [PATCH] * src/storage_backend_logical.c: patch from David Lively fixing small differences of behaviour for 'lvs' and 'vgs' on SLES Daniel --- AUTHORS | 1 + ChangeLog | 5 +++++ src/storage_backend_logical.c | 8 ++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8b20d0b9f1..4909b6ada7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -47,6 +47,7 @@ Patches have also been contributed by: Kaitlin Rupert Evgeniy Sokolov John Levon + David Lively [....send patches to get your name here....] diff --git a/ChangeLog b/ChangeLog index cbb7760e74..ab4f80198c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 30 10:51:12 CEST 2008 Daniel Veillard + + * src/storage_backend_logical.c: patch from David Lively fixing + small differences of behaviour for 'lvs' and 'vgs' on SLES + Wed Jul 30 10:45:41 CEST 2008 Daniel Veillard * qemud/qemud.c: patch from Guido Günther fixing the place where diff --git a/src/storage_backend_logical.c b/src/storage_backend_logical.c index 9a0c27fecf..db9768c0e8 100644 --- a/src/storage_backend_logical.c +++ b/src/storage_backend_logical.c @@ -200,9 +200,11 @@ virStorageBackendLogicalFindLVs(virConnectPtr conn, * Pull out name & uuid, device, device extent start #, segment size, extent size. * * NB can be multiple rows per volume if they have many extents + * + * NB lvs from some distros (e.g. SLES10 SP2) outputs trailing ":" on each line */ const char *regexes[] = { - "^\\s*(\\S+):(\\S+):(\\S+)\\((\\S+)\\):(\\S+):(\\S+)\\s*$" + "^\\s*(\\S+):(\\S+):(\\S+)\\((\\S+)\\):(\\S+):([0-9]+):?\\s*$" }; int vars[] = { 6 @@ -351,9 +353,11 @@ virStorageBackendLogicalRefreshPool(virConnectPtr conn, * 10603200512:4328521728 * * Pull out size & free + * + * NB vgs from some distros (e.g. SLES10 SP2) outputs trailing ":" on each line */ const char *regexes[] = { - "^\\s*(\\S+):(\\S+)\\s*$" + "^\\s*(\\S+):([0-9]+):?\\s*$" }; int vars[] = { 2