From patchwork Tue Mar 22 20:06:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firas Azar X-Patchwork-Id: 8644901 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9262E9F294 for ; Tue, 22 Mar 2016 20:18:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7CBF2037F for ; Tue, 22 Mar 2016 20:18:54 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C943E2034B for ; Tue, 22 Mar 2016 20:18:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiSj0-0001hp-Gd; Tue, 22 Mar 2016 20:16:22 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiSZx-0000yL-BG for xen-devel@lists.xen.org; Tue, 22 Mar 2016 20:07:01 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 76/DA-02479-4E5A1F65; Tue, 22 Mar 2016 20:07:00 +0000 X-Env-Sender: firas.azar@oracle.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1458677218!30862114!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 40032 invoked from network); 22 Mar 2016 20:06:59 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-3.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 22 Mar 2016 20:06:59 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2MK6vqn012998 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Mar 2016 20:06:58 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u2MK6vK0009492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 22 Mar 2016 20:06:57 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u2MK6u5Z016045 for ; Tue, 22 Mar 2016 20:06:57 GMT Received: from 10.149.239.54 (/10.149.239.54) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 22 Mar 2016 13:06:56 -0700 From: Firas Azar To: xen-devel@lists.xen.org Date: Tue, 22 Mar 2016 16:06:39 -0400 Message-Id: <1458677199-10301-1-git-send-email-firas.azar@oracle.com> X-Mailer: git-send-email 1.9.1 X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Mailman-Approved-At: Tue, 22 Mar 2016 20:16:21 +0000 Cc: firas.azar@oracle.com Subject: [Xen-devel] [PATCH] pygrub: remove isconfig option X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The pygrub command option "isconfig" is broken and obsolete. This patch removes it since the alternate options "-l -n" provide the same functionality. Signed-off-by: Firas Azar --- tools/pygrub/src/pygrub | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index 40f9584..82d4f01 100755 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -776,10 +776,11 @@ if __name__ == "__main__": try: opts, args = getopt.gnu_getopt(sys.argv[1:], 'qilnh::', - ["quiet", "interactive", "list-entries", "not-really", "help", - "output=", "output-format=", "output-directory=", "offset=", - "entry=", "kernel=", - "ramdisk=", "args=", "isconfig", "debug"]) + ["quiet", "interactive", "list-entries", + "not-really", "help", "output=", + "output-format=", "output-directory=", + "offset=", "entry=", "kernel=", + "ramdisk=", "args=", "debug"]) except getopt.GetoptError: usage() sys.exit(1) @@ -793,7 +794,6 @@ if __name__ == "__main__": entry = None interactive = True list_entries = False - isconfig = False part_offs = None debug = False not_really = False @@ -838,8 +838,6 @@ if __name__ == "__main__": entry = a # specifying the entry to boot implies non-interactive interactive = False - elif o in ("--isconfig",): - isconfig = True elif o in ("--debug",): debug = True elif o in ("--output-format",): @@ -871,15 +869,6 @@ if __name__ == "__main__": else: fd = os.open(output, os.O_WRONLY) - # debug - if isconfig: - chosencfg = run_grub(file, entry, fs, incfg["args"]) - print " kernel: %s" % chosencfg["kernel"] - if chosencfg["ramdisk"]: - print " initrd: %s" % chosencfg["ramdisk"] - print " args: %s" % chosencfg["args"] - sys.exit(0) - # if boot filesystem is set then pass to fsimage.open bootfsargs = '"%s"' % incfg["args"] bootfsgroup = re.findall('zfs-bootfs=(.*?)[\s\,\"]', bootfsargs)