]> xenbits.xensource.com Git - xen.git/commitdiff
make libxl build since 21811
authorStefano Stabellini <sstabellini@xensource.com>
Mon, 19 Jul 2010 14:15:32 +0000 (15:15 +0100)
committerStefano Stabellini <sstabellini@xensource.com>
Mon, 19 Jul 2010 14:15:32 +0000 (15:15 +0100)
First hunk, I assume is getting the arguments in wrong order on memset.

Second hunk is to kill a compiler warning about mis-use of printf-style
format strings which kills the build on -Werror.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
tools/libxl/libxl_bootloader.c

index dfec4bca49565a022d59fcd94a67ca8ed7a7af3c..e7cf62424432dc7c93ffe86f0d366021e760e843 100644 (file)
@@ -251,7 +251,7 @@ static char * bootloader_interact(struct libxl_ctx *ctx, int xenconsoled_fd, int
                 if (temp == NULL)
                     goto out_err;
                 output = temp;
-                memset(output + size_out, new_size - size_out, 0);
+                memset(output + size_out, 0, new_size - size_out);
                 size_out = new_size;
             }
 
@@ -386,7 +386,7 @@ int libxl_run_bootloader(struct libxl_ctx *ctx,
     }
 
     dom_console_xs_path = libxl_sprintf(ctx, "%s/serial/0/tty", libxl_xs_get_dompath(ctx, domid));
-    libxl_xs_write(ctx, XBT_NULL, dom_console_xs_path, dom_console_slave_tty_path);
+    libxl_xs_write(ctx, XBT_NULL, dom_console_xs_path, "%s", dom_console_slave_tty_path);
 
     pid = fork_exec_bootloader(&bootloader_fd, (char *)info->u.pv.bootloader, args);
     if (pid < 0) {