[U-Boot] [PATCH 2/2] beagle: handle import of environments in files with CRLF as line endings

Alexander Holler
2012-05-14T09:21:32Z

Am 14.05.2012 11:07, schrieb Alexander Holler:
> Am 13.05.2012 23:38, schrieb Wolfgang Denk:
>> Dear Alexander,
>>
>> In message<4FB01720.90402@ahsoftware.de> you wrote:
>
>> What exactly are such error modes, by the way? I would expect that
>> trailing white space is pretty much harmless for most variable
>> settings?
>
> The problem already starts in u-boot itself:
>
> a="b\r"
>
> I'm not sure if \r on the u-boot-cmdline does work, but you know what I
> mean.
>
> $a=="b"
>
> is false
>
> fatload $a
>
> fails (if the file is named 'b').
>
> ...

And

a="1\r"

isn't a number. So anything which expects a number will fail. E.g.

fatls usb 0:${a}

and every arithmetic which uses ${a}

Regards,

Alexander