From patchwork Wed Nov 24 00:54:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 351391 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 oAO0nMFC018147 for ; Wed, 24 Nov 2010 00:49:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754145Ab0KXAtW (ORCPT ); Tue, 23 Nov 2010 19:49:22 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:44351 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754086Ab0KXAtW (ORCPT ); Tue, 23 Nov 2010 19:49:22 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D69641B4067; Wed, 24 Nov 2010 00:49:20 +0000 (UTC) From: Mike Frysinger To: linux-kbuild@vger.kernel.org, Michal Marek Subject: [PATCH v3] headers_install: check exit status of unifdef Date: Tue, 23 Nov 2010 19:54:02 -0500 Message-Id: <1290560042-30381-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1290552096-28568-1-git-send-email-vapier@gentoo.org> References: <1290552096-28568-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]); Wed, 24 Nov 2010 00:49:23 +0000 (UTC) diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 4ca3be3..efb3be1 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 > 1) { + die "$tmpfile: $!\n"; + } unlink $tmpfile; } exit 0;