[U-Boot] [PATCH V4 02/12] fs: implement infrastructure for an 'exists' function

Tom Rini trini at ti.com
Tue Feb 4 23:06:32 CET 2014


On Mon, Feb 03, 2014 at 01:21:00PM -0700, Stephen Warren wrote:

> From: Stephen Warren <swarren at nvidia.com>
> 
> This could be used in scripts such as:
> 
> if test -e mmc 0:1 /boot/boot.scr; then
>     load mmc 0:1 ${scriptaddr} /boot/boot.scr
>     source ${scriptaddr}
> fi
> 
> rather than:
> 
> if load mmc 0:1 ${scriptaddr} /boot/boot.scr; then
>     source ${scriptaddr}
> fi
> 
> This prevents errors being printed by attempts to load non-existent
> files, which can be important when checking for a large set of files,
> such as /boot/boot.scr.uimg, /boot/boot.scr, /boot/extlinux.conf,
> /boot.scr.uimg, /boot.scr, /extlinux.conf.
> 
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140204/7b4c2d5c/attachment.pgp>


More information about the U-Boot mailing list