[U-Boot] [PATCH] fs: ext4 write: return file len on success

Przemyslaw Marczak p.marczak at samsung.com
Tue Feb 17 15:31:52 CET 2015


After rework of the file system API, the size of ext4
write was missed. This causes printing unreliable write
size at the end of the file system write operation.

Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Cc: Lukasz Majewski <l.majewski at samsung.com>
Cc: Simon Glass <sjg at chromium.org>
---
 fs/ext4/ext4_write.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index f7c52cc..fbc4c4b 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -1000,10 +1000,13 @@ int ext4_write_file(const char *filename, void *buf, loff_t offset,
 	}
 	ext4fs_close();
 
+	*actwrite = len;
+
 	return 0;
 
 fail:
 	ext4fs_close();
+	*actwrite = 0;
 
 	return -1;
 }
-- 
1.9.1



More information about the U-Boot mailing list