linux-base: Discard labels containing the # character
svn path=/dists/sid/linux-2.6/; revision=15510
This commit is contained in:
parent
06986e9c25
commit
63d419cf28
|
@ -1264,12 +1264,13 @@ sub scan_devices {
|
|||
# Discard all labels and UUIDs(!) that are ambiguous.
|
||||
# Discard all labels with 'unsafe' characters (escaped by blkid using
|
||||
# backslashes) as they will not be usable in all configuration files.
|
||||
# Similarly for '#' which blkid surprisingly does not consider unsafe.
|
||||
# Sort each device's IDs in reverse lexical order so that UUIDs are
|
||||
# preferred.
|
||||
for my $bdev (keys(%bdev_map)) {
|
||||
@{$bdev_map{$bdev}->{ids}} =
|
||||
sort({$b cmp $a}
|
||||
grep({ @{$id_map{$_}} == 1 && $_ !~ /\\/ }
|
||||
grep({ @{$id_map{$_}} == 1 && $_ !~ /[\\#]/ }
|
||||
@{$bdev_map{$bdev}->{ids}}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue