
On Mon, Feb 03, 2014 at 01:20:59PM -0700, Stephen Warren wrote:
From: Stephen Warren swarren@nvidia.com
Fix a few issues with the generic "save" shell command, and fs_write() function.
fstypes[].write wasn't filled in for some file-systems, and isn't checked when used, which could cause crashes/... if executing save on e.g. fat/ext filesystems.
fs_write() requires the length argument to be non-zero, since it needs to know exactly how many bytes to write. Adjust the comments and code according to this.
fs_write() wasn't prototyped in <fs.h> like other generic functions; other code should be able to call this directly rather than invoking the "save" shell command.
Signed-off-by: Stephen Warren swarren@nvidia.com Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!