From 729ab7e5f6d5c7b9b6e05e9a36b1cf3b57a61054 Mon Sep 17 00:00:00 2001 From: Shreeya Patel Date: Sat, 18 Apr 2020 20:54:23 +0530 Subject: [PATCH] scripts: qemu-check.sh: Use getopts Use getopts to parse the arguments instead of manual parsing to leave no room for errors, bugs, and inconsistent conventions introduced by custom implementation. The script uses no options as of now, so current implementation just exits if any option is provided. Signed-off-by: Shreeya Patel --- scripts/qemu-check.sh | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/scripts/qemu-check.sh b/scripts/qemu-check.sh index 29bc0c5f8..b9762d0bd 100755 --- a/scripts/qemu-check.sh +++ b/scripts/qemu-check.sh @@ -7,18 +7,33 @@ READY_MSG="6c 00 00 00 00 00 00 70" rm -f dump-*.txt +print_usage() +{ + cat <