Commit 68c7025d99dbac9ddf1a166a19efc3f9e98f1301
Committed by
Heiko Schocher
1 parent
1612ff0dfb
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
cmd: ubi: print load size after establishing volume size
When using static volumes, the file size stored in the volume is determined at runtime. Currently the ubi command prints the file size specified on the console, which leads to a rather confusing series of messages: # ubi read ${fdt_addr_r} testvol Read 0 bytes from volume testvol to 82000000 No size specified -> Using max size (179924992) Make sure to print the actual size read in any case: # ubi read ${fdt_addr_r} testvol No size specified -> Using max size (179924992) Read 179924992 bytes from volume testvol to 82000000 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff
cmd/ubi.c
... | ... | @@ -356,6 +356,8 @@ |
356 | 356 | size = vol->used_bytes; |
357 | 357 | } |
358 | 358 | |
359 | + printf("Read %u bytes from volume %s to %p\n", size, volume, buf); | |
360 | + | |
359 | 361 | if (vol->corrupted) |
360 | 362 | printf("read from corrupted volume %d", vol->vol_id); |
361 | 363 | if (offp + size > vol->used_bytes) |
... | ... | @@ -674,9 +676,6 @@ |
674 | 676 | } |
675 | 677 | |
676 | 678 | if (argc == 3) { |
677 | - printf("Read %lld bytes from volume %s to %lx\n", size, | |
678 | - argv[3], addr); | |
679 | - | |
680 | 679 | return ubi_volume_read(argv[3], (char *)addr, size); |
681 | 680 | } |
682 | 681 | } |
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153
-
mentioned in commit 134153