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

[Xen-changelog] [xen master] tools: xl: prepend root= to root field on command line with no extra



commit cde92647ea4f5c487059a3c89f2e3f1aec9a42d3
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Thu Mar 12 17:56:47 2015 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Mar 13 10:22:22 2015 +0000

    tools: xl: prepend root= to root field on command line with no extra
    
    This was broken in 49ab17a3a615 "tools: xl: handle unspecified extra=
    when dealing with root=".
    
    Reported-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Tested-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index a27ac9e..04faf98 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -817,7 +817,8 @@ static char *parse_cmdline(XLU_Config *config)
             if (asprintf(&cmdline, "root=%s %s", root, extra) == -1)
                 cmdline = NULL;
         } else if (root) {
-            cmdline = strdup(root);
+            if (asprintf(&cmdline, "root=%s", root) == -1)
+                cmdline = NULL;
         } else if (extra) {
             cmdline = strdup(extra);
         }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.