X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=tools%2Fvirt-win-reg;fp=tools%2Fvirt-win-reg;h=1018e116cf85158a2e0b3685e0267a22d92685fa;hp=056ecce8faf1aa246908a8b1f95974b26ac19551;hb=4443cfab8b16d862c8ab2971acccf4f18802b95c;hpb=3b4bb214c36d2659dff58e1a79bad8a9c48fa51d diff --git a/tools/virt-win-reg b/tools/virt-win-reg index 056ecce..1018e11 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.