From patchwork Tue Aug 13 21:02:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Young X-Patchwork-Id: 11092913 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 E86AE912 for ; Tue, 13 Aug 2019 21:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7D20286BF for ; Tue, 13 Aug 2019 21:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB52928741; Tue, 13 Aug 2019 21:04:14 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52F6E286BF for ; Tue, 13 Aug 2019 21:04:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxdwG-0006nJ-I1; Tue, 13 Aug 2019 21:02:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxdwF-0006n7-Cp for xen-devel@lists.xenproject.org; Tue, 13 Aug 2019 21:02:39 +0000 X-Inumbo-ID: ad0d99a4-be0d-11e9-9dcb-df702742206e Received: from EUR04-HE1-obe.outbound.protection.outlook.com (unknown [40.107.7.123]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ad0d99a4-be0d-11e9-9dcb-df702742206e; Tue, 13 Aug 2019 21:02:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ceBl+OG/HYqZqhr2Ejme+efc0SGtbnFFd0rdcFPYZ/SLZvaotGj+q+kl6/gHUdR0yhvHVE1qtY93KTNcnyi3oz/KjeW3OK/37NYENhcTVkbBE2MAjAkJtSiPkNZXRT0rYHuPlHEh5r2KlnDgL37AXuNsotHJiyflpQPrOOVeK3aEPx/Y9Xcfb0FLXxcM5VlXhYLmrEJuJtsXnUi+54s48GsiIdhIG18j0J6FJpuDSyI5CzMqIEXxDy/qYHXPrScbp8JbCbm6yEWrSQQznEfZeC2Q9GKGaxtwa9qIKok7DVP3+E2o8ceejnd7ZmW+xfDyGAocGDrxI6H/U+yNXCeQ5A== 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=6QP9a269pUKw96NgmF0pNGLuxWwMPtdgeK1Qzt/Ka4w=; b=Ma4XwBvxkXpigd79nveA5WK5sgs1EeZdw+L8y+W2Qre3rasui59BNsYB142oavDa4Dhm3sPkR1+zn9Toalcd210mo58GxASMbOzL7Z/7dCEwCmzr/QbbTfup6WlcYqKbWay2IsZFdBRRYdmKDUmOXrEEvePaqfujdmaS1/gfqpAt8iZpDx1rgCEOrB4nN91c4x0u8S2yKldgtYjQgwSTNp0/ZwpziXAwUskT0UkdiTJjimOOBMjrWBD3LXLErASyVitU4nd7Nk58EzMrcFjv4JxBQp9Q0ke0PGoWuQIshYKK3+NUNrg0Y5CJoJOrEd9ywQQ4nIAkNyYnIh0bolsCsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=durham.ac.uk; dmarc=pass action=none header.from=durham.ac.uk; dkim=pass header.d=durham.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=durhamuniversity.onmicrosoft.com; s=selector2-durhamuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6QP9a269pUKw96NgmF0pNGLuxWwMPtdgeK1Qzt/Ka4w=; b=iyJ9t7K+1sXSzLy4n/MpbPYZlrBaRRuE966a1k9SkPp9VXQaSpbHmSZMhq47VIh2Emq+ub9BKyhn60R5cPzRfplqHtKj1IhGMFSrmZ+8INyffvAmsKswk6vr/W1q3VreBxGghnjFM4q2pkpM0iuSrP80vZGKqGDmg5f7izoDTlk= Received: from VI1PR06MB4720.eurprd06.prod.outlook.com (20.177.200.18) by VI1PR06MB4000.eurprd06.prod.outlook.com (20.176.5.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.20; Tue, 13 Aug 2019 21:02:34 +0000 Received: from VI1PR06MB4720.eurprd06.prod.outlook.com ([fe80::3164:1b3d:165e:ac42]) by VI1PR06MB4720.eurprd06.prod.outlook.com ([fe80::3164:1b3d:165e:ac42%6]) with mapi id 15.20.2157.015; Tue, 13 Aug 2019 21:02:34 +0000 From: "YOUNG, MICHAEL A." To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH] failing to set value to 0 in Grub2ConfigFile Thread-Index: AQHVUhpuA7gOz+/Ark2RBY58DX7TkA== Date: Tue, 13 Aug 2019 21:02:34 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: user-agent: Alpine 2.21 (LFD 202 2017-01-01) x-originating-ip: [2a00:23c4:9208:400:c49a:db08:8036:b390] x-clientproxiedby: LO2P265CA0194.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::14) To VI1PR06MB4720.eurprd06.prod.outlook.com (2603:10a6:803:90::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=m.a.young@durham.ac.uk; x-ms-exchange-messagesentrepresentingtype: 1 x-x-sender: michael@austen3.home x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b97cfeab-1b44-44ec-b8d2-08d720319072 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(49563074)(7193020); SRVR:VI1PR06MB4000; x-ms-traffictypediagnostic: VI1PR06MB4000: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01283822F8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(346002)(366004)(39860400002)(376002)(396003)(136003)(189003)(199004)(558084003)(6116002)(8936002)(786003)(2351001)(5640700003)(64756008)(86362001)(66616009)(66556008)(58126008)(66946007)(66476007)(478600001)(66446008)(6916009)(316002)(14454004)(71190400001)(46003)(71200400001)(99286004)(25786009)(36756003)(8676002)(53346004)(53936002)(486006)(6506007)(386003)(476003)(2501003)(81166006)(7736002)(81156014)(256004)(52116002)(2906002)(6436002)(99936001)(305945005)(9686003)(5660300002)(6486002)(6512007)(102836004)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR06MB4000; H:VI1PR06MB4720.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: durham.ac.uk does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /s/eNbme8vUhuyN1I44s8WroI1EpSqes4ppzXKZOMs/3pHWmrKNL1+hB74B2/Scd9mESP+Se7CXXERZQA5OUw6HN2UhPFLqclWpoznqrLWya5w2KJgEnZl8S7rjV8QSSEfEOFQpdFZEYqBfG/l6Z/TyC+wT6tvZ/c/8IUt3KgH/WExp2/O8DIeMXydRGFkwnlSkcgOu56JaSPeidHP/H6QD3NJypAR2TP7mStRFpwOhyfI20Cg50NusQp0UkevTUqlCL/c6I98P5qrd4ac5zpcvonaun5EbA298g574uuHBSgqngMM1etlckd+HU67VG+tKhXMoPZlIX7SfDuP2f+Ie1d3f7dKZI7IrKrIl6UX1TT9Ea1qkWzc8Y3xec7DjjiEoJw7RkLaTdXq/BJ293HfiWgAvJIiWTAHKbV+l+Fp8= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: durham.ac.uk X-MS-Exchange-CrossTenant-Network-Message-Id: b97cfeab-1b44-44ec-b8d2-08d720319072 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2019 21:02:34.7187 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7250d88b-4b68-4529-be44-d59a2d8a6f94 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lIod/guzR3wzcfM+gl+gfMZVEjsG4WPrYxqlr7wiEHRYdVOXAxeTuqYGWzXnf2d/YBoI3YLqsqRFuyWtfinyqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR06MB4000 Subject: [Xen-devel] [PATCH] failing to set value to 0 in Grub2ConfigFile X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP I have been looking at the pygrub code to see if it is possible to cope with grub files with BLSCFG and spotted this minor issue in GrubConf.py where the code intends to replace ${saved_entry} and ${next_entry} with 0 but doesn't succeed. Signed-off-by: Michael Young From a08eff9b1b881dc61f9427153706e2d5b3bd0e01 Mon Sep 17 00:00:00 2001 From: Michael Young Date: Tue, 13 Aug 2019 21:15:02 +0100 Subject: [PATCH] failing to set value to 0 in Grub2ConfigFile In Grub2ConfigFile the code to handle ${saved_entry} and ${next_entry} sets arg = "0" but this now does nothing following "tools/pygrub: Make pygrub understand default entry in string format" d1b93ea2615bd789ee28901f1f1c05ffb319cb61 which replaced arg.strip() with arg_strip in the following line. This patch restores the previous behaviour. --- tools/pygrub/src/GrubConf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py index 594139bac7..73f1bbed2f 100644 --- a/tools/pygrub/src/GrubConf.py +++ b/tools/pygrub/src/GrubConf.py @@ -440,7 +440,7 @@ class Grub2ConfigFile(_GrubConfigFile): arg_strip = arg.strip() if arg_strip == "${saved_entry}" or arg_strip == "${next_entry}": logging.warning("grub2's saved_entry/next_entry not supported") - arg = "0" + arg_strip = "0" setattr(self, self.commands[com], arg_strip) else: logging.info("Ignored directive %s" %(com,))