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>
size = vol->used_bytes;
}
+ printf("Read %u bytes from volume %s to %p\n", size, volume, buf);
+
if (vol->corrupted)
printf("read from corrupted volume %d", vol->vol_id);
if (offp + size > vol->used_bytes)
}
if (argc == 3) {
- printf("Read %lld bytes from volume %s to %lx\n", size,
- argv[3], addr);
-
return ubi_volume_read(argv[3], (char *)addr, size);
}
}