summaryrefslogtreecommitdiff
path: root/pwx/check_tree.pl
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-05-17 08:13:21 +0200
committerSven Eden <yamakuzure@gmx.net>2018-05-24 18:50:09 +0200
commit5552feb7cd5f6290b4c0739edce06af021d6f9a9 (patch)
treef84f14ed38a569af4a1089609e1503fce1d12bf8 /pwx/check_tree.pl
parent01cac2ea18bec7583c8d0e34bec197782842f887 (diff)
check_tree.pl : Do not skip mask info with useless hunks.
Diffstat (limited to 'pwx/check_tree.pl')
-rwxr-xr-xpwx/check_tree.pl25
1 files changed, 13 insertions, 12 deletions
diff --git a/pwx/check_tree.pl b/pwx/check_tree.pl
index 35173aeb3..c293d6c9d 100755
--- a/pwx/check_tree.pl
+++ b/pwx/check_tree.pl
@@ -478,21 +478,22 @@ sub build_output {
$in_mask_block = $hHunk->{is_mask} && (!$hHunk->{is_endif}) ? 1 : 0;
$in_else_block = $hHunk->{is_else} && (!$hHunk->{is_endif}) ? 1 : 0;
- # The useless are to be skipped
- $hHunk->{useful} or next;
+ # The useless are to be skipped, but we need the [e]logind[m]ask[i]nfo
+ if ($hHunk->{useful}) {
- # --- Add a comment line for later processing of .pwx files
- $hFile{pwxfile} and push(@{$hFile{output}}, "# emi ${in_mask_block} ${in_else_block}");
+ # --- Add the header line -----------------
+ # -----------------------------------------
+ push(@{$hFile{output}}, get_hunk_head(\$offset));
- # --- Add the header line -----------------
- # -----------------------------------------
- push(@{$hFile{output}}, get_hunk_head(\$offset));
-
- # --- Add the hunk lines ------------------
- # -----------------------------------------
- for my $line (@{$hHunk->{lines}}) {
- push(@{$hFile{output}}, $line);
+ # --- Add the hunk lines ------------------
+ # -----------------------------------------
+ for my $line (@{$hHunk->{lines}}) {
+ push(@{$hFile{output}}, $line);
+ }
}
+
+ # --- Add a comment line for later processing of .pwx files
+ $hFile{pwxfile} and push(@{$hFile{output}}, "# emi ${in_mask_block} ${in_else_block}");
} ## End of walking the hunks
return 1;