summaryrefslogtreecommitdiffstats
path: root/sbin/hastctl/hastctl.c
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2011-07-13 05:56:51 +0000
committertrociny <trociny@FreeBSD.org>2011-07-13 05:56:51 +0000
commit706512ba38c659f7df569a92197fce593a2cd371 (patch)
tree6d2596f0df5227c5bee19a6e083250821e0814e5 /sbin/hastctl/hastctl.c
parentec6755c2ee6ff3b1d58394b3777e9980d67fb33d (diff)
downloadFreeBSD-src-706512ba38c659f7df569a92197fce593a2cd371.zip
FreeBSD-src-706512ba38c659f7df569a92197fce593a2cd371.tar.gz
When exiting with error because of an invalid command line argument
use errx(3), not err(3), and the exit code from sysexits(3). Approved by: pjd (mentor)
Diffstat (limited to 'sbin/hastctl/hastctl.c')
-rw-r--r--sbin/hastctl/hastctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c
index 2f8a6eb..233b948 100644
--- a/sbin/hastctl/hastctl.c
+++ b/sbin/hastctl/hastctl.c
@@ -403,15 +403,15 @@ main(int argc, char *argv[])
break;
case 'e':
if (expand_number(optarg, &extentsize) < 0)
- err(1, "Invalid extentsize");
+ errx(EX_USAGE, "Invalid extentsize");
break;
case 'k':
if (expand_number(optarg, &keepdirty) < 0)
- err(1, "Invalid keepdirty");
+ errx(EX_USAGE, "Invalid keepdirty");
break;
case 'm':
if (expand_number(optarg, &mediasize) < 0)
- err(1, "Invalid mediasize");
+ errx(EX_USAGE, "Invalid mediasize");
break;
case 'h':
default:
OpenPOWER on IntegriCloud