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

Re: [libvirt] [PATCH] Fix logical storage pool operation on SLES10-SP2



On Mon, Jul 28, 2008 at 03:35:30PM -0400, David Lively wrote:
> The attached patch adjusts for a difference in behavior in the LVM
> utilities 'lvs' and 'vgs'.  The SLES10-SP2 versions of these (and
> presumably others) append a trailing separator.  This patch simply
> adjusts the regexps to allow (but not require) this.
> 
> I thought just adding the ":?" to the regexps would do this, but this
> was leaving the trailing separator in the last group match, so I ended
> up tweaking the preceding group pattern as well.

Yeah, the \S+ is a greedy match, so it'd consume the ':' first. I don't
know if POSIX expressions have a non-greedy match modifir like Perl does.
That would let you do

   (\\S+?):?

But in any case, your suggested modification is fine, so ACK.

BTW, what version of the LVM tools is SLES using - its probably useful
to note that in the comment you added, in case the same problem is 
particular to a version, rather than just SLES

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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