WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] pygrub: LiloConf.py supports root and rea

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] pygrub: LiloConf.py supports root and read-only
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Aug 2007 05:30:25 -0700
Delivery-date: Tue, 07 Aug 2007 05:28:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1186391614 -3600
# Node ID fd20c1333e3ee8f58e879aed79d74a75bc1969e6
# Parent  f8d5c509f156cbe3a6a1683f21a75e560e7ba369
pygrub: LiloConf.py supports root and read-only

LiloConf.py ignores the following options: root and read-only.
This patch fixes the issue.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
---
 tools/pygrub/src/LiloConf.py |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff -r f8d5c509f156 -r fd20c1333e3e tools/pygrub/src/LiloConf.py
--- a/tools/pygrub/src/LiloConf.py      Mon Aug 06 10:12:34 2007 +0100
+++ b/tools/pygrub/src/LiloConf.py      Mon Aug 06 10:13:34 2007 +0100
@@ -18,12 +18,13 @@ class LiloImage(object):
                 "  initrd: %s\n" %(self.title, self.root, self.kernel,
                                    self.args, self.initrd))
     def reset(self, lines, path):
-        self._root = self._initrd = self._kernel = self._args = None
+        self._initrd = self._kernel = self._readonly = None
+        self._args = ""
         self.title = ""
         self.lines = []
         self.path = path
+        self.root = ""
         map(self.set_from_line, lines)
-        self.root = "" # dummy
 
     def set_from_line(self, line, replace = None):
         (com, arg) = GrubConf.grub_exact_split(line, 2)
@@ -55,6 +56,23 @@ class LiloImage(object):
         return self._initrd
     initrd = property(get_initrd, set_initrd)
 
+    def set_args(self, val):
+        self._args = val
+    def get_args(self):
+        args = self._args
+        if self.root:
+            args += " root=" + self.root
+        if self.readonly:
+            args += " ro"
+        return args
+    args = property(get_args, set_args)
+
+    def set_readonly(self, val):
+        self._readonly = 1
+    def get_readonly(self):
+        return self._readonly
+    readonly = property(get_readonly, set_readonly)
+
     # set up command handlers
     commands = { "label": "self.title",
                  "root": "self.root",
@@ -62,7 +80,7 @@ class LiloImage(object):
                  "image": "self.kernel",
                  "initrd": "self.initrd",
                  "append": "self.args",
-                 "read-only": None,
+                 "read-only": "self.readonly",
                  "chainloader": None,
                  "module": None}
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] pygrub: LiloConf.py supports root and read-only, Xen patchbot-unstable <=