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] Fix the build.

# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 3904e3c336111c6c9f5f007fb2d3c8bb58beec6d
# Parent  1a0cc9fdcd485f4ddc69c9381b5ef2bba2b29ef3
Fix the build.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 1a0cc9fdcd48 -r 3904e3c33611 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Tue Jan 10 14:44:36 2006
+++ b/tools/libxc/xc_linux_build.c      Tue Jan 10 14:53:39 2006
@@ -402,8 +402,11 @@
         ctxt->initrd.start    = 0;
         ctxt->initrd.size     = 0;
     }
-    strncpy((char *)ctxt->cmdline, cmdline, IA64_COMMAND_LINE_SIZE);
-    ctxt->cmdline[IA64_COMMAND_LINE_SIZE-1] = '\0';
+    if ( cmdline != NULL )
+    {
+        strncpy((char *)ctxt->cmdline, cmdline, IA64_COMMAND_LINE_SIZE);
+        ctxt->cmdline[IA64_COMMAND_LINE_SIZE-1] = '\0';
+    }
     munmap(start_info, PAGE_SIZE);
 
     free(page_array);
@@ -693,12 +696,11 @@
         start_info->mod_start    = vinitrd_start;
         start_info->mod_len      = initrd_len;
     }
-    if (cmdline != NULL) {
+    if ( cmdline != NULL )
     {
         strncpy((char *)start_info->cmd_line, cmdline, MAX_GUEST_CMDLINE);
         start_info->cmd_line[MAX_GUEST_CMDLINE-1] = '\0';
-    } else
-        start_info->cmd_line[0] = '\0';
+    }
     munmap(start_info, PAGE_SIZE);
 
     /* shared_info page starts its life empty. */
@@ -759,8 +761,7 @@
         goto error_out;
     }
 
-    if ( (image_name == NULL) ||
-         ((image = xc_read_kernel_image(image_name, &image_size)) == NULL) )
+    if ( (image = xc_read_kernel_image(image_name, &image_size)) == NULL )
         goto error_out;
 
     if ( (ramdisk_name != NULL) && (strlen(ramdisk_name) != 0) )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix the build., Xen patchbot -unstable <=