New API: is-lv: check if a block device is a logical volume (RHBZ#619793)
authorRichard Jones <rjones@redhat.com>
Fri, 30 Jul 2010 15:32:35 +0000 (16:32 +0100)
committerRichard Jones <rjones@redhat.com>
Fri, 30 Jul 2010 15:32:35 +0000 (16:32 +0100)
commit6280ac9b987c14f89749b4b4fdfec5a647567432
tree343d127f4ac0abed347a6f937799994efd95be5e
parent737181bcd7b1de8c3a613d6282030c34efa78fb6
New API: is-lv: check if a block device is a logical volume (RHBZ#619793)

This adds a new API, guestfs_is_lv (g, device), which returns true iff
the named device is an LVM2 logical volume.

A sample guestfish session:

><fs> lvs
/dev/vg_f13x64/lv_root
/dev/vg_f13x64/lv_swap
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
/dev/vda2
><fs> is-lv /dev/vg_f13x64/lv_root
true
><fs> is-lv /dev/vg_f13x64/lv_swap
true
><fs> is-lv /dev/vda
false
><fs> is-lv /dev/vda1
false
><fs> is-lv /dev/vda2
false
daemon/lvm.c
src/MAX_PROC_NR
src/generator.ml