Re: [PATCH 4/4] logical: Adjust regex for devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 22, 2016 at 05:21:06PM -0500, John Ferlan wrote:
> From: Joe Harvell <joe.harvell@xxxxxxxxxxxx>
> 
> Since our 'devices' parsing logic now will use the 'nextents' (or
> lvs 'stripes' output) to decide whether or not to parse the field,
> use the regex of "(\\S*)" (e.g. zero or more) instead of "(\\S+)"
> (1 or more) when grabbing the 'groups[3]' or 'devices' field.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/storage/storage_backend_logical.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
> index 3010f58..2af3e69 100644
> --- a/src/storage/storage_backend_logical.c
> +++ b/src/storage/storage_backend_logical.c
> @@ -333,7 +333,8 @@ virStorageBackendLogicalFindLVs(virStoragePoolObjPtr pool,
>       *    striped, so "," is not a suitable separator either (rhbz 727474).
>       */
>      const char *regexes[] = {
> -       "^\\s*(\\S+)#(\\S*)#(\\S+)#(\\S+)#([0-9]+)#(\\S+)#([0-9]+)#([0-9]+)#(\\S+)#?\\s*$"
> +/*             name   orig   uuid   devs  stripes  segsz  vgextsz       sz lvattr */
> +       "^\\s*(\\S+)#(\\S*)#(\\S+)#(\\S*)#([0-9]+)#(\\S+)#([0-9]+)#([0-9]+)#(\\S+)#?\\s*$"
>      };
>      int vars[] = {
>          9

This could be squashed into the previous commit and if you are creating a
comment with labels, please use the exact names that lvs uses.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]