equal
deleted
inserted
replaced
21 } |
21 } |
22 |
22 |
23 my ($current, %dev); |
23 my ($current, %dev); |
24 foreach (`sfdisk -d 2>/dev/null`) { |
24 foreach (`sfdisk -d 2>/dev/null`) { |
25 chomp; |
25 chomp; |
|
26 ### $_ |
26 if (/^# partition table .*?(\/\S+)/) { |
27 if (/^# partition table .*?(\/\S+)/) { |
27 $current = (stat $1)[6] >> 8 == $devmapper ? undef : $1 |
28 $current = (stat $1)[6] >> 8 == $devmapper ? undef : $1 |
28 and push(@{$dev{$current}}, $_); |
29 and push(@{$dev{$current}}, $_); |
29 next; |
30 next; |
30 } |
31 } |
|
32 next if not $current; |
31 push @{$dev{$current}}, $_; |
33 push @{$dev{$current}}, $_; |
32 } |
34 } |
33 ### partiton tables of useful blockdevices: |
35 ### partiton tables of useful blockdevices: |
34 ### %dev |
36 ### %dev |
35 |
37 |