This has the effect of switching $gho->{Lvdev} from /dev/$VG/$LV to
/dev/mapper/$VG-$LV (where $VG and $LV have an s/-/--/ transformation
applied).
The two paths point to the samedevice and most call sites don't care
about the distinction. Some places which use "kpartx $dev" to Lvdev
expect to be able to append a partition number to $dev, while kpartx
only creates the /dev/mapper form, meaning such places cannot use
Lvdev. By making this switch we allow these places (such as
ts-freebsd-install) to use kpartx.
The only other place I'm aware of which requires one form or the other
is the Debian initramfs code which expects root=/dev/mapper/vg-lv and
does not accept /dev/vg/lv. However this is already handled correctly.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
$gho->{Vg}= $r{"${gn}_vg"};
$gho->{Lv}= $r{"${gn}_disk_lv"};
$gho->{Lvdev}= (defined $gho->{Vg} && defined $gho->{Lv})
- ? '/dev/'.$gho->{Vg}.'/'.$gho->{Lv} : undef;
+ ? lv_dev_mapper($gho->{Vg},$gho->{Lv}) : undef;
}
sub guest_find_diskimg($)