Date: Sun, 21 Dec 2014 17:10:25 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276026 - head/sys/boot/uboot/common Message-ID: <201412211710.sBLHAPWq036718@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412211710.sBLHAPWq036718>