mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-15 08:20:59 +02:00
lbmk: don't use status for unconditional returns
in cases where lbmk must always return from a function, there are some cases where it relies on non-zero exit status, which in practise is always the case, but may change in the future if the relevant part is modified e.g. do_something && return 0 the proper form is: do_something return 0 also do this for unconditional exits Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+10
-5
@@ -31,8 +31,12 @@ main()
|
||||
{
|
||||
while [ $# -gt 0 ]; do
|
||||
case ${1} in
|
||||
help) usage && exit 0 ;;
|
||||
list) items config/coreboot && exit 0 ;;
|
||||
help)
|
||||
usage
|
||||
exit 0 ;;
|
||||
list)
|
||||
items config/coreboot || :
|
||||
exit 0 ;;
|
||||
-d) _displaymode="${2}" ;;
|
||||
-p) _payload="${2}" ;;
|
||||
-k) _keyboard="${2}" ;;
|
||||
@@ -216,10 +220,11 @@ build_target()
|
||||
build_roms()
|
||||
{
|
||||
cbcfg="${1}"
|
||||
[ ! -f "${cbcfg}" ] && \
|
||||
if [ ! -f "${cbcfg}" ]; then
|
||||
printf "'%s' does not exist. Skipping build for %s %s %s\n" \
|
||||
"${cbcfg}" "${board}" "${displaymode}" "${initmode}" \
|
||||
1>&2 && return 0
|
||||
"${cbcfg}" "${board}" "${displaymode}" "${initmode}" 1>&2
|
||||
return 0
|
||||
fi
|
||||
|
||||
x_ ./update trees -b coreboot ${board}
|
||||
|
||||
|
||||
@@ -34,7 +34,10 @@ main()
|
||||
x_ mkdir -p "bin/serprog_${platform}"
|
||||
|
||||
if [ $# -gt 1 ] ; then
|
||||
[ "${2}" = "list" ] && print_boards ${boards_dir} && return 0
|
||||
if [ "${2}" = "list" ]; then
|
||||
print_boards ${boards_dir}
|
||||
return 0
|
||||
fi
|
||||
build_${platform}_rom "${2}"
|
||||
else
|
||||
printf "Building all serprog targets\n"
|
||||
|
||||
Reference in New Issue
Block a user