| 1 |
Description: vgdisplay prints no units with 0 size allocations |
| 2 |
Origin: https://lists.uni-koeln.de/pipermail/linux-fai/2009-September/007285.html |
| 3 |
Bug-Debian: https://bugs.debian.org/551083 |
| 4 |
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=96770 |
| 5 |
Author: Mathieu Alorent <malorent at echo.fr> |
| 6 |
Reviewed-by: gregor herrmann <[email protected]> |
| 7 |
Last-Update: 2012-02-11 |
| 8 |
Bug: https://rt.cpan.org/Ticket/Display.html?id=96770 |
| 9 |
|
| 10 |
--- a/LVM.pm |
| 11 |
+++ b/LVM.pm |
| 12 |
@@ -270,10 +270,10 @@ |
| 13 |
next VGINF; } |
| 14 |
|
| 15 |
# Parse the number of allocated physical extents from the volume group. |
| 16 |
- elsif( m/Alloc PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { |
| 17 |
+ elsif( m/Alloc PE \/ Size\s+(\S+) \/ (\S+)(?:\s+(\S+))?/ ) { |
| 18 |
$vghash{$vgn}->{alloc_pe} = $1; |
| 19 |
$vghash{$vgn}->{alloc_pe_size} = $2; |
| 20 |
- $vghash{$vgn}->{alloc_pe_size_unit} = $3; |
| 21 |
+ $vghash{$vgn}->{alloc_pe_size_unit} = $3 || "B"; |
| 22 |
next VGINF; } |
| 23 |
|
| 24 |
# Parse the volume group name. |