Skip to content
Snippets Groups Projects
Commit fc59c403 authored by Thomas Mittelstädt's avatar Thomas Mittelstädt
Browse files

Some error corrections like logging function instead of echo


Signed-off-by: default avatarThomas Mittelstaedt <thomas.mittelstaedt@de.bosch.com>
parent 5a88fa82
No related branches found
No related tags found
1 merge request!61Some changes for mountimage tool
This commit is part of merge request !61. Comments created here will be created in the context of that merge request.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Copyright (c) 2023 Thomas Mittelstaedt <thomas.mittelstaedt@de.bosch.com> # Copyright (c) 2023 Thomas Mittelstaedt <thomas.mittelstaedt@de.bosch.com>
VERSION=2.1.0 VERSION=2.1.1
VERSIONDATE=2023 VERSIONDATE=2023
SHORT=hp:m:vr:ulf SHORT=hp:m:vr:ulf
...@@ -133,7 +133,7 @@ function print_verbose_line() { ...@@ -133,7 +133,7 @@ function print_verbose_line() {
# $* : Strings to log # $* : Strings to log
####################################### #######################################
function print_error_line() { function print_error_line() {
echo "$(basename $0): $*" >&2 echo "${PROGNAME}: $*" >&2
} }
...@@ -316,7 +316,7 @@ local found_valid_root_partition ...@@ -316,7 +316,7 @@ local found_valid_root_partition
root_devices=( $(get_root_partitions ${IMAGE_DEVICE} ${IMAGE_DEVICE_P}) ) root_devices=( $(get_root_partitions ${IMAGE_DEVICE} ${IMAGE_DEVICE_P}) )
size=${#root_devices[@]} size=${#root_devices[@]}
if [ "$size" -eq "0" ]; then if [ "$size" -eq "0" ]; then
echo "/ is not mounted for $IMAGE_DEVICE, can't handle sub mounts" print_verbose_line "/ is not mounted for $IMAGE_DEVICE, can't handle sub mounts"
mdevice='' mdevice=''
mbind='' mbind=''
else else
...@@ -450,7 +450,7 @@ local parsed ...@@ -450,7 +450,7 @@ local parsed
shift shift
;; ;;
--version) --version)
echo "$(basename $0) $VERSION ($VERSIONDATE)" echo "$PROGNAME $VERSION ($VERSIONDATE)"
shift shift
exit 0 exit 0
;; ;;
...@@ -656,7 +656,7 @@ local mbind rootmnt ...@@ -656,7 +656,7 @@ local mbind rootmnt
if test "$labelpath" != "/"; then if test "$labelpath" != "/"; then
rootmnt=$(check_and_try_to_mount_root_partition $device $devicep) rootmnt=$(check_and_try_to_mount_root_partition $device $devicep)
if [ -z "${rootmnt}" ];then if [ -z "${rootmnt}" ];then
echo "/ is not mounted for $device, can't handle sub mounts" print_error_line "/ is not mounted for $device, can't handle sub mounts"
mdevice='' mdevice=''
mbind='' mbind=''
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment