From: Tomas Mudrunka Date: Fri, 5 Jan 2024 17:16:26 +0000 (+0100) Subject: nyni je funkce X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=052685bdfb69e95d2940f081a084bb1b30b370ca;p=mirrors%2FPrograms.git nyni je funkce --- diff --git a/bash/serial_loopback_test.sh b/bash/serial_loopback_test.sh index d128f99..8b945fa 100755 --- a/bash/serial_loopback_test.sh +++ b/bash/serial_loopback_test.sh @@ -5,6 +5,8 @@ # #Tested in: busybox ash, bash +function serial_loopback_test() { + trylimit=0 seconds=0 baudrate=115200 @@ -71,3 +73,7 @@ exec 6<&- echo TRANSMITTED: $trycnt, ERRORS: $errcnt, SECONDS: $(($(date +%s)-$datestart)) [ "$errcnt" = "0" -a "$trycnt" -gt 0 ] && exit 0 exit 255 + +} + +serial_loopback_test "$@"