mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-18 07:52:10 +01:00
ubi: extend support for LED activity
Add LED activity for ubi_dev_scan() and ubi_volume_read() routines. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
This commit is contained in:
parent
88e7a462f0
commit
2bc0837ce1
@ -549,6 +549,7 @@ int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size)
|
||||
}
|
||||
len = size > tbuf_size ? tbuf_size : size;
|
||||
|
||||
led_activity_blink();
|
||||
tmp = offp;
|
||||
off = do_div(tmp, vol->usable_leb_size);
|
||||
lnum = tmp;
|
||||
@ -582,6 +583,7 @@ int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size)
|
||||
env_set_hex("filesize", len_read);
|
||||
|
||||
free(tbuf);
|
||||
led_activity_off();
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -600,7 +602,9 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset)
|
||||
if (err)
|
||||
return -err;
|
||||
|
||||
led_activity_blink();
|
||||
err = ubi_init();
|
||||
led_activity_off();
|
||||
if (err)
|
||||
return -err;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user