X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=perl%2Flib%2FSys%2FGuestfs%2FLib.pm;h=fc6a10f69149f67e7e2ff322de3c4608de7b58ae;hb=70e0696422d355635dcc00372a582b2abf07a9d6;hp=95c18a51dc1a6916acec34ce5f90d1891112c477;hpb=759f4369de965f46f4a93b3a75dada050f87e223;p=libguestfs.git diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 95c18a5..fc6a10f 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -894,7 +894,7 @@ sub _find_filesystem my $label = $1; foreach (sort keys %$fses) { if (exists $fses->{$_}->{label} && - $fses->{$_}->{label} =~ /$label/i) { + $fses->{$_}->{label} eq $label) { return ($_, $fses->{$_}); } } @@ -1108,7 +1108,7 @@ sub _find_grub_prefix die(__"Can't find grub on guest") unless($g->exists('/boot/grub/menu.lst')); # Look for the most specific mount point in mounts - foreach my $path qw(/boot/grub /boot /) { + foreach my $path (qw(/boot/grub /boot /)) { if(exists($mounts->{$path})) { return "" if($path eq '/'); return $path; @@ -1339,10 +1339,10 @@ sub _find_modprobe_aliases my %modprobe_aliases; - for my $pattern qw(/files/etc/conf.modules/alias - /files/etc/modules.conf/alias - /files/etc/modprobe.conf/alias - /files/etc/modprobe.d/*/alias) { + for my $pattern (qw(/files/etc/conf.modules/alias + /files/etc/modules.conf/alias + /files/etc/modprobe.conf/alias + /files/etc/modprobe.d/*/alias)) { for my $path ( $g->aug_match($pattern) ) { $path =~ m{^/files(.*)/alias(?:\[\d*\])?$} or die __x("{path} doesn't match augeas pattern",