UBIFS: Add padded size to ubifsload output
PATCH 1/4 UBIFS: Add padded size to ubifsload output
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 <[email protected]>
--- fs/ubifs/ubifs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ubifs/ubifs.c +2 -2
@@ -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 ;
Signature · 1 line
1.7.3.2