[PATCH] headers_install: check exit status of unifdef

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If unifdef fails for any reason (like segfaulting), we should be aborting
the install steps.  So check its exit status in this unlikely scenario.

Reported-by: Diego Elio Pettenà <flameeyes@xxxxxxxxxx>
Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 scripts/headers_install.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
index 4ca3be3..00856f1 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -44,7 +44,8 @@ foreach my $file (@files) {
 	close $out;
 	close $in;
 
-	system $unifdef . " $tmpfile > $installdir/$file";
+	system $unifdef . " $tmpfile > $installdir/$file"
+	    and die "$tmpfile: $!\n";
 	unlink $tmpfile;
 }
 exit 0;
-- 
1.7.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux