[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] Fix order of kernel argument construction to prevent arg repeat bug



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Date 1169132699 0
# Node ID fd0f2b4b707160ffdf1e6d56f0cf8ad166a1f147
# Parent  8e79d8d87ecd371c3b1881be1fcdccfcdcf50b22
[XEND] Fix order of kernel argument construction to prevent arg repeat bug

Make sure user specified kernel args are appended at the end but also
make sure that we do not duplicate root= and ip=.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff -r 8e79d8d87ecd -r fd0f2b4b7071 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Jan 18 09:24:40 2007 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Thu Jan 18 15:04:59 2007 +0000
@@ -1115,19 +1115,17 @@ class XendConfig(dict):
         # configuration
         log.debug("update_with_image_sxp(%s)" % scrub_password(image_sxp))
 
-        kernel_args = ""
+        # user-specified args must come last: previous releases did this and
+        # some domU kernels rely upon the ordering.
+        kernel_args = sxp.child_value(image_sxp, 'args', '')
 
         # attempt to extract extra arguments from SXP config
         arg_ip = sxp.child_value(image_sxp, 'ip')
         if arg_ip and not re.search(r'ip=[^ ]+', kernel_args):
-            kernel_args += 'ip=%s ' % arg_ip
+            kernel_args = 'ip=%s ' % arg_ip + kernel_args
         arg_root = sxp.child_value(image_sxp, 'root')
         if arg_root and not re.search(r'root=', kernel_args):
-            kernel_args += 'root=%s ' % arg_root
-
-        # user-specified args must come last: previous releases did this and
-        # some domU kernels rely upon the ordering.
-        kernel_args += sxp.child_value(image_sxp, 'args', '')
+            kernel_args = 'root=%s ' % arg_root + kernel_args
 
         if bootloader:
             self['_temp_using_bootloader'] = '1'

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.