Vladimir Panteleev
2020-Jan-16 12:11 UTC
[Libguestfs] [PATCH 2/2] Win::Hivex::Regedit: Ignore comments
--- perl/lib/Win/Hivex/Regedit.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl/lib/Win/Hivex/Regedit.pm b/perl/lib/Win/Hivex/Regedit.pm index 2b17036..f0dbb50 100644 --- a/perl/lib/Win/Hivex/Regedit.pm +++ b/perl/lib/Win/Hivex/Regedit.pm @@ -153,8 +153,8 @@ sub reg_import #print STDERR "reg_import: parsing <<<$_>>>\n"; if ($state eq "outer") { - # Ignore blank lines, headers. - next if /^\s*$/; + # Ignore blank lines, headers, comments. + next if /^\s*(;.*)?$/; # .* is needed before Windows Registry Editor Version.. in # order to eat a possible Unicode BOM which regedit writes @@ -193,7 +193,7 @@ sub reg_import my $value = _parse_value ("", $1, $encoding); croak (_parse_error ($_, $lineno)) unless defined $value; push @newvalues, $value; - } elsif (/^\s*$/) { # blank line after values + } elsif (/^\s*(;.*)?$/) { # blank line after values _merge_node ($hmap, \%params, $newnode, \@newvalues, \@delvalues); $state = "outer"; } else { -- 2.25.0
Richard W.M. Jones
2020-Jan-16 13:07 UTC
Re: [Libguestfs] [PATCH 2/2] Win::Hivex::Regedit: Ignore comments
Thanks, I have pushed these two upstream. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Maybe Matching Threads
- [PATCH 1/2] Win::Hivex::Regedit: Accept CRLF line endings
- [LLVMdev] configuring LLVM 2.6 for OSX 10.4sdk on OSX 10.5 system
- package seriation- how to manage font size and label margin
- [LLVMdev] configuring LLVM 2.6 for OSX 10.4sdk on OSX 10.5 system
- [PATCH 7/7] v2v: add support for SUSE VMDP drivers