static int ubi_volume_read(char *volume, char *buf, size_t size)
{
int err, lnum, off, len, tbuf_size;
- size_t count_save = size;
void *tbuf;
unsigned long long tmp;
struct ubi_volume *vol;
if (vol->corrupted)
printf("read from corrupted volume %d", vol->vol_id);
if (offp + size > vol->used_bytes)
- count_save = size = vol->used_bytes - offp;
+ size = vol->used_bytes - offp;
tbuf_size = vol->usable_leb_size;
if (size < tbuf_size)
int err = 0;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (mtdparts_init() != 0) {
printf("Error initializing mtdparts!\n");
}
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#ifdef CONFIG_CMD_UBIFS
/*