git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b4bb21
)
virt-win-reg: Don't use implicit $_ in map_path_to_hive function.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 17 May 2011 12:15:25 +0000
(13:15 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 17 May 2011 16:05:11 +0000
(17:05 +0100)
tools/virt-win-reg
patch
|
blob
|
history
diff --git
a/tools/virt-win-reg
b/tools/virt-win-reg
index
056ecce
..
1018e11
100755
(executable)
--- a/
tools/virt-win-reg
+++ b/
tools/virt-win-reg
@@
-367,36
+367,36
@@
sub import_mapper
sub map_path_to_hive
{
local $_ = shift;
sub map_path_to_hive
{
local $_ = shift;
- my ($hiveshortname, $hivefile, $prefix);
+ my ($hiveshortname, $hivefile, $p
ath, $p
refix);
if (/^\\?(?:HKEY_LOCAL_MACHINE|HKLM)\\SAM(\\.*)?$/i) {
$hiveshortname = "sam";
$hivefile = "$systemroot/system32/config/$hiveshortname";
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";
$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";
$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";
$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";
$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 {
$prefix = "HKEY_LOCAL_MACHINE\\.DEFAULT";
}
else {
@@
-404,7
+404,7
@@
sub map_path_to_hive
p => $_)
}
p => $_)
}
- return ($hiveshortname, $hivefile, $
_
, $prefix);
+ return ($hiveshortname, $hivefile, $
path
, $prefix);
}
# Download a named hive file. Die on failure.
}
# Download a named hive file. Die on failure.