From patchwork Fri Aug 31 22:33:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10584505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 078F0920 for ; Fri, 31 Aug 2018 22:33:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEE392BB45 for ; Fri, 31 Aug 2018 22:33:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2A1C2BB98; Fri, 31 Aug 2018 22:33:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 831D52BB45 for ; Fri, 31 Aug 2018 22:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727273AbeIACnI (ORCPT ); Fri, 31 Aug 2018 22:43:08 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47748 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727201AbeIACnI (ORCPT ); Fri, 31 Aug 2018 22:43:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gJIEMefwE4xMZFyYSRGFkkmLSbNPctFrRdyhB0dUiWU=; b=EroODGsRIgFYGr8zd8zKnLzee xmjYsHheTNZT5P/2aBeo7Iiqs0xLNd3SLAmRsQldLzG/1lr3XtD9HJEcEOoA8L1sHZLBP2F+1FBp7 dh687oEMBnQOIUzIUWPX5P/l/0ctDB3f2ZJYRTFO3c1nrDYYcXL5X2spe6EMRXW9LJRH0CCtymDLO 8AEKoDU420FAdGOf2ejpvucYpnmLwlfsuKylcGEWM9/3CgS1FeS1eh/WQXZm9JZQjgCywtsm3jElk joR0ZDe35P2MP217dBcKTOERgISHxOReKNOHHObmWsFzzw+eCrhfcCuXUot9xXvKEv6F/AATjJy0R 0McvNZGLA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvryw-0003Yj-Lh; Fri, 31 Aug 2018 22:33:34 +0000 To: linux-kbuild , LKML , Masahiro Yamada From: Randy Dunlap Subject: [PATCH] kbuild: modules_install: Warn if System.map file is not found Message-ID: Date: Fri, 31 Aug 2018 15:33:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap If there is no System.map file for "make modules_install", scripts/depmod.sh will silently exit with success, having done nothing. Since this is an unexpected situation, change it to report a Warning for the missing file. The behavior is not changed except for the Warning message. The (previous) silent success and new Warning can be reproduced by: $ make mrproper; make defconfig $ make modules; make modules_install and since System.map is produced by "make vmlinux", the steps above omit producing the System.map file. Reported-by: Masahiro Yamada Cc: Masahiro Yamada Signed-off-by: Randy Dunlap --- scripts/depmod.sh | 1 + 1 file changed, 1 insertion(+) --- lnx-419-rc1.orig/scripts/depmod.sh +++ lnx-419-rc1/scripts/depmod.sh @@ -11,6 +11,7 @@ DEPMOD=$1 KERNELRELEASE=$2 if ! test -r System.map ; then + echo "Warning: modules_install: missing 'System.map' file" exit 0 fi