svn commit: r224610 - stable/8/sbin/hastctl

Mikolaj Golub trociny at FreeBSD.org
Tue Aug 2 12:43:41 UTC 2011


Author: trociny
Date: Tue Aug  2 12:43:40 2011
New Revision: 224610
URL: http://svn.freebsd.org/changeset/base/224610

Log:
  MFC r223976:
  
  When exiting with error because of an invalid command line argument
  use errx(3), not err(3), and the exit code from sysexits(3).

Modified:
  stable/8/sbin/hastctl/hastctl.c
Directory Properties:
  stable/8/sbin/hastctl/   (props changed)

Modified: stable/8/sbin/hastctl/hastctl.c
==============================================================================
--- stable/8/sbin/hastctl/hastctl.c	Tue Aug  2 11:35:28 2011	(r224609)
+++ stable/8/sbin/hastctl/hastctl.c	Tue Aug  2 12:43:40 2011	(r224610)
@@ -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:


More information about the svn-src-all mailing list