From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hmxcx-0005pS-Nn for mharc-grub-devel@gnu.org; Mon, 15 Jul 2019 05:50:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56512) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmxcw-0005pH-4N for grub-devel@gnu.org; Mon, 15 Jul 2019 05:50:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmxcs-0007Rj-4z for grub-devel@gnu.org; Mon, 15 Jul 2019 05:50:34 -0400 Received: from m9a0003g.houston.softwaregrp.com ([15.124.64.68]:33429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hmxco-0007Js-G6 for grub-devel@gnu.org; Mon, 15 Jul 2019 05:50:28 -0400 Received: FROM m9a0003g.houston.softwaregrp.com (15.121.0.190) BY m9a0003g.houston.softwaregrp.com WITH ESMTP FOR grub-devel@gnu.org; Mon, 15 Jul 2019 09:50:24 +0000 Received: from M9W0068.microfocus.com (2002:f79:bf::f79:bf) by M9W0067.microfocus.com (2002:f79:be::f79:be) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 15 Jul 2019 09:28:32 +0000 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (15.124.72.11) by M9W0068.microfocus.com (15.121.0.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Mon, 15 Jul 2019 09:28:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZwY+dcuxW7+o3GJsTVxauCbLCKJxN8UCDdcUUDOnamVonJqTGli68eEoy3l7oDEwoda3aDiarBXmYrJwmmfjC+P11BbecilHirYStFub/rGu0fSTN0Wl8pc3kKMDIemwv9ueTYKVd0QooUhJdC5JOr+hBjNNOPSxLDpDu175oB/5Wspnh3EIwXnUlRcg0NEUMGB/oMd9TZQ6aTSZMdPlwiUpt2JktMClgI5q4ekXOf1765gRuEtnpmFTUpUQ55lwemxe68k+btLlpUiRygbh2lM/yGFUXzghLphMdkbtMi7e8NC9+Uamk7kz7F0bomeh7yVJjZWrUmd9l9m+Bumr5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WwbObVrm9mMo8qsEcjmtdeWFXL1ULQQ1Zm+mu8UJjlw=; b=EpgZTG0vFCuicEJGwi3ngnNy2fmDO+ceGVShDoIyoqxBnp0+ZIK+FHnmrIu34EkfcQRuXRP2t60xqg8O8VjUd3x4KilsothFKmfPeffOj7oeNRkBmZBHy+npMytsfkMxumPORPYcMaMsMsTgdgsZtBB4ku4sorhmrVfF3ghdZ0KkgO5GlQ5i9rCXYxJzaI/NBf7cy7lNM62dY8nnNxgvV06NHZBm99DPeTkyhAHhfoQACMRoqcliOFxK7GCW1EJecJUm+cwZIHwtm5SxNlDKnwMHRN56tZqC2Xij/NotyYrMtfrodFcqfjp5PVQluUVTKa9bvbfnti2Q8EyPcZxtGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none Received: from BY5PR18MB3122.namprd18.prod.outlook.com (10.255.139.11) by BY5PR18MB3395.namprd18.prod.outlook.com (10.255.139.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Mon, 15 Jul 2019 09:28:31 +0000 Received: from BY5PR18MB3122.namprd18.prod.outlook.com ([fe80::b023:74c9:ef22:8e7e]) by BY5PR18MB3122.namprd18.prod.outlook.com ([fe80::b023:74c9:ef22:8e7e%3]) with mapi id 15.20.2073.012; Mon, 15 Jul 2019 09:28:31 +0000 From: Michael Chang To: "grub-devel@gnu.org" Subject: [PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG Thread-Topic: [PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG Thread-Index: AQHVOu+qfIl662MfYUiGdKlMfVF6OA== Date: Mon, 15 Jul 2019 09:28:31 +0000 Message-ID: <20190715092821.10128-1-mchang@suse.com> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR06CA0031.namprd06.prod.outlook.com (2603:10b6:a03:d4::44) To BY5PR18MB3122.namprd18.prod.outlook.com (2603:10b6:a03:1af::11) authentication-results: spf=none (sender IP is ) smtp.mailfrom=MChang@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.16.4 x-originating-ip: [202.47.205.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9335da18-a642-4d6d-8c19-08d70906cd3e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BY5PR18MB3395; x-ms-traffictypediagnostic: BY5PR18MB3395: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 00997889E7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(4636009)(376002)(136003)(396003)(346002)(366004)(39860400002)(189003)(199004)(66446008)(66946007)(476003)(66476007)(66556008)(64756008)(14454004)(2616005)(8676002)(6916009)(8936002)(6116002)(80792005)(486006)(5660300002)(6436002)(52116002)(99286004)(81156014)(1076003)(81166006)(14444005)(256004)(478600001)(68736007)(50226002)(26005)(25786009)(2351001)(2906002)(7736002)(316002)(186003)(386003)(3846002)(71200400001)(5640700003)(102836004)(71190400001)(53936002)(66066001)(86362001)(6486002)(36756003)(305945005)(6506007)(2501003)(6512007)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3395; H:BY5PR18MB3122.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: RfMjDgLmQo12ujRon7UxHmHbjIAiTFcD1dhbFCJmi0O70Vh512TwJ0anvFDZeMXWuaC+qbD5Rm4OQJAntEl0zuwXwiFjpEfWbW9c/0Ltei7d0+D3YiB+89uI4rNU7+hcd0wa7YC2TmYn3/2793grCwjXoYNLhme6d688d/rLi4idgCu3GkTuuDQ39V5QPavvGiytoJM6zqUmX000q9UvBnT6uGMVlyn+0vuiQtRdlgkMlp78EGcRv/heUyckDgSEBSdt95bsBwrXUYUtF3E8YdgWHmPob+hghJypfbc3litWHxylc3BXN2pvKvX924Vywm2pHLHpBPvgGBsD68q59820hFhVnQvuGV5C+v69njPgjBmQMKVuBTNSusHoZoQvq9OMEmgtiJ70k7e4uGw/LVwrflytebEm7MR88+KPjvE= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 9335da18-a642-4d6d-8c19-08d70906cd3e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2019 09:28:31.7784 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MChang@suse.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3395 X-OriginatorOrg: suse.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 15.124.64.68 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 09:50:35 -0000 This patch adds support to disable os-prober debug output while running grub-mkconfig through GRUB_OS_PROBER_DISABLE_DEBUG=3Dtrue in simple configuration interface. The os-prober needs to support the OS_PROBER_DISABLE_DEBUG environment variable, which was introduced by 1.72 release. Signed-off-by: Michael Chang --- docs/grub.texi | 4 ++++ util/grub-mkconfig.in | 3 ++- util/grub.d/30_os-prober.in | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index 3d50b16ba..0295d1e67 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1490,6 +1490,10 @@ for them. Set this option to @samp{true} to disable= this. List of space-separated FS UUIDs of filesystems to be ignored from os-prob= er output. For efi chainloaders it's @@ =20 +@item GRUB_OS_PROBER_DISABLE_DEBUG +Set to @samp{true} to disable @command{os-prober} program's debug output w= hile +running the @command{grub-mkconfig}. + @item GRUB_DISABLE_SUBMENU Normally, @command{grub-mkconfig} will generate top level menu entry for the kernel with highest version number and put all other found kernels diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 9f477ff05..80e8a9d62 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -238,7 +238,8 @@ export GRUB_DEFAULT \ GRUB_ENABLE_CRYPTODISK \ GRUB_BADRAM \ GRUB_OS_PROBER_SKIP_LIST \ - GRUB_DISABLE_SUBMENU + GRUB_DISABLE_SUBMENU \ + GRUB_OS_PROBER_DISABLE_DEBUG =20 if test "x${grub_cfg}" !=3D "x"; then rm -f "${grub_cfg}.new" diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in index 515a68c7a..b182b5842 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -30,6 +30,10 @@ if [ "x${GRUB_DISABLE_OS_PROBER}" =3D "xtrue" ]; then exit 0 fi =20 +if [ "x${GRUB_OS_PROBER_DISABLE_DEBUG}" =3D "xtrue" ]; then + export OS_PROBER_DISABLE_DEBUG=3Dy +fi + if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prob= er 2> /dev/null`" ] ; then # missing os-prober and/or linux-boot-prober exit 0 --=20 2.16.4