[U-Boot] [PATCH 1/4] UBIFS: Add padded size to ubifsload output

Stefan Roese sr at denx.de
Thu Oct 28 14:09:15 CEST 2010


ubifsload pads with 0's to a multiple of 4096 bytes while reading a file
to memory. This patch adds this additional output to the command output.

Example:

=> ubifsload 1000000 test.txt
Loading file 'test.txt' to addr 0x01000000 with size 25 (padded to 4096)...
Done

Signed-off-by: Stefan Roese <sr at denx.de>
---
 fs/ubifs/ubifs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 3fc7990..8215443 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -677,8 +677,8 @@ int ubifs_load(char *filename, u32 addr, u32 size)
 		size = inode->i_size;
 
 	count = (size + UBIFS_BLOCK_SIZE - 1) >> UBIFS_BLOCK_SHIFT;
-	printf("Loading file '%s' to addr 0x%08x with size %d (0x%08x)...\n",
-	       filename, addr, size, size);
+	printf("Loading file '%s' to addr 0x%08x with size %d (padded to %d)...\n",
+	       filename, addr, size, count * UBIFS_BLOCK_SIZE);
 
 	page.addr = (void *)addr;
 	page.index = 0;
-- 
1.7.3.2



More information about the U-Boot mailing list