boot: make it a little bit less verbose
The current boot code prints too much error messages without much value
in them. This patch prints the error string when it makes sense and
simplifies the return path of bootscript_boot(). Make use of pr_err()
in boot_entry() which is the shared code responsible for calling the
boot_entry->boot callback. Remove the unnecessary print statement
from bootsource_action() as well.

This removes a single print statement ATM, allowing us to go from this:

    booting 'sd'
    Cannot set parameter mci0.probe: No such device
    running automount command 'mci${global.sd}.probe=1 && mount /dev/disk${global.sd}.0 /mnt/sd' failed
    could not open /mnt/sd/zImage: No such device
    ERROR: Booting 'sd' failed: No such device
    booting 'sd' failed: No such device
    boot: No such device

to this:

    Booting entry 'sd'
    Cannot set parameter mci0.probe: No such device
    running automount command 'mci${global.sd}.probe=1 && mount /dev/disk${global.sd}.0 /mnt/sd' failed
    could not open /mnt/sd/zImage: No such device
    ERROR: Booting entry 'sd' failed
    boot: No such device

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 7083e6b commit 662ff5a3558e81e3f15678acb7999669c03ac75e
@Vivien Didelot Vivien Didelot authored on 18 Jan 2019
Sascha Hauer committed on 21 Jan 2019
Showing 1 changed file
View
common/boot.c