Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
diff sbin/fzfs @ 497:eb42828c0cbf
Use the new output routinges for errors in fzfs' global error handling
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 30 Aug 2024 16:48:24 +0200 |
| parents | 312aebce590c |
| children | 46406503a635 |
line wrap: on
line diff
--- a/sbin/fzfs Fri Aug 30 16:44:23 2024 +0200 +++ b/sbin/fzfs Fri Aug 30 16:48:24 2024 +0200 @@ -516,8 +516,7 @@ exit 2; ;; *) - echo "ERROR: option handling failed" 1>&2 - exit 2 + fatal 2 "option handling failed" 1>&2 ;; esac done @@ -528,7 +527,7 @@ shift $((OPTIND-1)) OPTIND=1 -test $# -gt 0 || { echo "ERROR: no command given" 1>&2; exit 2; } +test $# -gt 0 || fatal 2 "no command given" command="$1" shift @@ -547,7 +546,6 @@ command_create_tree "$@" ;; *) - echo "ERROR: unknown command \`${command}'" 1>&2 - exit 2 + fatal 2 "unknown command \`${command}'" 1>&2 ;; esac
