]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lvm storage backend: handle command_names=1 in lvm.conf
authorSerge E. Hallyn <serge.hallyn@canonical.com>
Wed, 28 Sep 2011 20:08:34 +0000 (15:08 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 30 Sep 2011 21:17:44 +0000 (15:17 -0600)
commit30f555c6a8a7f6a801ca8a02b308085f2e364c55
tree90045adcff931c06e7e721a4b14c747131ce569b
parenta111b9e24f9e91e3cd97bd207377d700af708dd5
lvm storage backend: handle command_names=1 in lvm.conf

If the regexes supported (?:pvs)?, then we could handle this by
optionally matching but not returning the initial command name.  But it
doesn't.  So add a new char* argument to
virStorageBackendRunProgRegex().  If that argument is NULL then we act
as usual.  Otherwise, if the string at that argument is found at the
start of a returned line, we drop that before running the regex.

With this patch, virt-manager shows me lvs with command_names 1 or 0.

The definitions of PVS_BASE etc may want to be moved into the configure
scripts (though given how PVS is found, IIUC that could only happen if
pvs was a link to pvs_real), but in any case no sense dealing with that
until we're sure this is an ok way to handle it.

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
src/storage/storage_backend.c
src/storage/storage_backend.h
src/storage/storage_backend_fs.c
src/storage/storage_backend_iscsi.c
src/storage/storage_backend_logical.c