Ticket #10986: 0001-Corrected-check-to-ensure-that-command-line-options-.patch

File 0001-Corrected-check-to-ensure-that-command-line-options-.patch, 1.1 KB (added by arvindsraj, 10 years ago)
  • src/system/boot/platform/u-boot/start.cpp

    From c66fae9d8a2ee20a4779683fe57839bef12a3aca Mon Sep 17 00:00:00 2001
    From: Arvind S Raj <sraj.arvind@gmail.com>
    Date: Fri, 27 Jun 2014 18:07:40 +0530
    Subject: [PATCH] Corrected check to ensure that command line options are
     indeed passed.
    
    * Currently, no command line options are being passed via u-boot
      to haiku. However, the comparison doesn't ensure that cmdline
      is not an empty string - it merely ensures cmdline is not null.
    ---
     src/system/boot/platform/u-boot/start.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/system/boot/platform/u-boot/start.cpp b/src/system/boot/platform/u-boot/start.cpp
    index 2f6a637..fd1e951 100644
    a b start_netbsd(struct board_info *bd, struct image_header *image,  
    137137{
    138138    const char *argv[] = { "haiku", cmdline };
    139139    int argc = 1;
    140     if (cmdline)
     140    // TODO: Ensure cmdline is mapped into memory by MMU before usage.
     141    if (cmdline && *cmdline)
    141142        argc++;
    142143    gUImage = image;
    143144    return start_raw(argc, argv);