From patchwork Tue Nov 23 22:41:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 351071 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oANMavs4032215 for ; Tue, 23 Nov 2010 22:36:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752828Ab0KWWg4 (ORCPT ); Tue, 23 Nov 2010 17:36:56 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:60485 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752201Ab0KWWg4 (ORCPT ); Tue, 23 Nov 2010 17:36:56 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id A3B421B4038; Tue, 23 Nov 2010 22:36:55 +0000 (UTC) From: Mike Frysinger To: linux-kbuild@vger.kernel.org, Michal Marek Subject: [PATCH v2] headers_install: check exit status of unifdef Date: Tue, 23 Nov 2010 17:41:36 -0500 Message-Id: <1290552096-28568-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1290551142-18849-1-git-send-email-vapier@gentoo.org> References: <1290551142-18849-1-git-send-email-vapier@gentoo.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 23 Nov 2010 22:36:57 +0000 (UTC) diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 4ca3be3..59ad768 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -45,6 +45,13 @@ foreach my $file (@files) { close $in; system $unifdef . " $tmpfile > $installdir/$file"; + # unifdef will exit 0 on success, and will exit 1 when the + # file was processed successfully but no changes were made, + # so abort only when it's higher than that. + my $e = $? >> 8; + if ($e > 2) { + die "$tmpfile: $!\n"; + } unlink $tmpfile; } exit 0;