recovery init: disable interactivity for 'ubiformat' command
We have seen corner cases (e.g. when the partition to format has already some corrupted UBI metadata) where ubiformat stops and ask the user for confirmation to do the format. We cannot have such interactivity in the recovery ramdisk so use the '-y' argument to assume yes for all questions. Also use the '-q' (quiet) parameter instead of the '/dev/null' redirections to remove command's output. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
e80d5b021c
commit
3371ed864c
|
|
@ -269,8 +269,7 @@ format_ubi_volume() {
|
|||
ubidetach -p "/dev/mtd${mtd_num}" >/dev/null 2>&1
|
||||
fi
|
||||
# Format MTD partition.
|
||||
ubiformat "/dev/mtd${mtd_num}" >/dev/null 2>&1
|
||||
if [ "$?" != "0" ]; then
|
||||
if ! ubiformat "/dev/mtd${mtd_num}" -q -y; then
|
||||
quit_with_error "Error erasing '/dev/mtd${mtd_num}' block"
|
||||
fi
|
||||
psplash_progress "50"
|
||||
|
|
|
|||
Loading…
Reference in New Issue