unsigned long long tmp;
struct ubi_volume *vol;
loff_t offp = 0;
+ size_t len_read;
vol = ubi_find_volume(volume);
if (vol == NULL)
tmp = offp;
off = do_div(tmp, vol->usable_leb_size);
lnum = tmp;
+ len_read = size;
do {
if (off + len >= vol->usable_leb_size)
len = vol->usable_leb_size - off;
len = size > tbuf_size ? tbuf_size : size;
} while (size);
+ if (!size)
+ env_set_hex("filesize", len_read);
+
free(tbuf);
return err;
}