svn commit: r276026 - head/sys/boot/uboot/common
Ian Lepore
ian at FreeBSD.org
Sun Dec 21 17:10:26 UTC 2014
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;
}
More information about the svn-src-head
mailing list