Author: ian
Date: Sun Dec 21 17:10:24 2014
New Revision: 276026
URL: https://svnweb.freebsd.org/changeset/base/276026

Log:
  Allow whitspace to appear between device name and unit number in loaderdev.
  This allows the same value to be used in u-boot commands and the loaderdev
  env var that gets passed to ubldr, for example 'fatload mmc 1 ${bootfile}".

Modified:
  head/sys/boot/uboot/common/main.c

Modified: head/sys/boot/uboot/common/main.c
==============================================================================
--- head/sys/boot/uboot/common/main.c   Sun Dec 21 17:09:01 2014        
(r276025)
+++ head/sys/boot/uboot/common/main.c   Sun Dec 21 17:10:24 2014        
(r276026)
@@ -212,10 +212,11 @@ get_load_device(int *type, int *unit, in
 
        p = get_device_type(devstr, type);
 
-       /*
-        * Empty device string, or unknown device name, or a bare, known 
-        * device name. 
-        */
+       /* Ignore optional spaces after the device name. */
+       while (*p == ' ')
+               p++;
+
+       /* Unknown device name, or a known name without unit number.  */
        if ((*type == -1) || (*p == '\0')) {
                return;
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to