[PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

From:

Felix Zielcke

Subject:

[PATCH] Grub2 cannot find LVM volume groups with a dash (-) in the name

Date:

Mon, 11 Aug 2008 18:18:32 +0200

I still can't see any use in this `escape a dash with a dash because we
use a dash to seperate the vg part from the lv one' from LVM.
As I already wrote, grub-probe works fine if you remove that double
escaping from the file name and remount it.
LVM (lv* vg* commands) shouldn't use the filename to get the vg and lv
part ...
fz-vm:/dev# lvdisplay
--- Logical volume ---
LV Name /dev/m-y--vg/l-vol--0
VG Name m-y--vg
lvdisplay is even showing the unescaped directory + symlink
Well attached is now my cute little asprintf patch with a very ugly LVM
part.
It works for
volumegroup: linuxvg
logicalvolume: lvol0
/dev/mapper/linuxvg-lvol0
volume group: m-y--vg
logical volume: l-vol--0
/dev/mapper/m--y----vg-l--vol----0
Please comment this, please give me hints how to make it better.
I don't like the code myself but it seems like we should handle this
double dash problem :(