summaryrefslogtreecommitdiffstats
path: root/tools/virt-win-reg
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-05-17 13:15:25 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-05-17 17:05:11 +0100
commit4443cfab8b16d862c8ab2971acccf4f18802b95c (patch)
tree45f9016d6d4a765625aec11bb1e53df26eed99a4 /tools/virt-win-reg
parent3b4bb214c36d2659dff58e1a79bad8a9c48fa51d (diff)
downloadlibguestfs-4443cfab8b16d862c8ab2971acccf4f18802b95c.tar.gz
libguestfs-4443cfab8b16d862c8ab2971acccf4f18802b95c.tar.xz
libguestfs-4443cfab8b16d862c8ab2971acccf4f18802b95c.zip
virt-win-reg: Don't use implicit $_ in map_path_to_hive function.
Diffstat (limited to 'tools/virt-win-reg')
-rwxr-xr-xtools/virt-win-reg14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/virt-win-reg b/tools/virt-win-reg
index 056ecce8..1018e116 100755
--- a/tools/virt-win-reg
+++ b/tools/virt-win-reg
@@ -367,36 +367,36 @@ sub import_mapper
sub map_path_to_hive
{
local $_ = shift;
- my ($hiveshortname, $hivefile, $prefix);
+ my ($hiveshortname, $hivefile, $path, $prefix);
if (/^\\?(?:HKEY_LOCAL_MACHINE|HKLM)\\SAM(\\.*)?$/i) {
$hiveshortname = "sam";
$hivefile = "$systemroot/system32/config/$hiveshortname";
- $_ = defined $1 ? $1 : "\\";
+ $path = defined $1 ? $1 : "\\";
$prefix = "HKEY_LOCAL_MACHINE\\SAM";
}
elsif (/^\\?(?:HKEY_LOCAL_MACHINE|HKLM)\\SECURITY(\\.*)?$/i) {
$hiveshortname = "security";
$hivefile = "$systemroot/system32/config/$hiveshortname";
- $_ = defined $1 ? $1 : "\\";
+ $path = defined $1 ? $1 : "\\";
$prefix = "HKEY_LOCAL_MACHINE\\SECURITY";
}
elsif (/^\\?(?:HKEY_LOCAL_MACHINE|HKLM)\\SOFTWARE(\\.*)?$/i) {
$hiveshortname = "software";
$hivefile = "$systemroot/system32/config/$hiveshortname";
- $_ = defined $1 ? $1 : "\\";
+ $path = defined $1 ? $1 : "\\";
$prefix = "HKEY_LOCAL_MACHINE\\SOFTWARE";
}
elsif (/^\\?(?:HKEY_LOCAL_MACHINE|HKLM)\\SYSTEM(\\.*)?$/i) {
$hiveshortname = "system";
$hivefile = "$systemroot/system32/config/$hiveshortname";
- $_ = defined $1 ? $1 : "\\";
+ $path = defined $1 ? $1 : "\\";
$prefix = "HKEY_LOCAL_MACHINE\\SYSTEM";
}
elsif (/^\\?(?:HKEY_USERS|HKU)\\.DEFAULT(\\.*)?$/i) {
$hiveshortname = "default";
$hivefile = "$systemroot/system32/config/$hiveshortname";
- $_ = defined $1 ? $1 : "\\";
+ $path = defined $1 ? $1 : "\\";
$prefix = "HKEY_LOCAL_MACHINE\\.DEFAULT";
}
else {
@@ -404,7 +404,7 @@ sub map_path_to_hive
p => $_)
}
- return ($hiveshortname, $hivefile, $_, $prefix);
+ return ($hiveshortname, $hivefile, $path, $prefix);
}
# Download a named hive file. Die on failure.