Tue Oct 30 10:54:25 2018 UTC ()
Pull up the following revisions(s) (requested by mrg in ticket #1639):
	usr.bin/systat/main.c:	revision 1.52 via patch

Add missing 'b' to the list of options.
Alpha-sort the option handling.


(sborrill)
diff -r1.48.2.1 -r1.48.2.2 src/usr.bin/systat/main.c

cvs diff -r1.48.2.1 -r1.48.2.2 src/usr.bin/systat/main.c (expand / switch to context diff)
--- src/usr.bin/systat/main.c 2017/09/04 06:04:06 1.48.2.1
+++ src/usr.bin/systat/main.c 2018/10/30 10:54:25 1.48.2.2
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.48.2.1 2017/09/04 06:04:06 snj Exp $	*/
+/*	$NetBSD: main.c,v 1.48.2.2 2018/10/30 10:54:25 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -36,7 +36,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: main.c,v 1.48.2.1 2017/09/04 06:04:06 snj Exp $");
+__RCSID("$NetBSD: main.c,v 1.48.2.2 2018/10/30 10:54:25 sborrill Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -102,7 +102,7 @@
 	egid = getegid();
 	(void)setegid(getgid());
 
-	while ((ch = getopt(argc, argv, "M:N:nw:t:")) != -1)
+	while ((ch = getopt(argc, argv, "M:N:bnw:t:")) != -1)
 		switch(ch) {
 		case 'M':
 			memf = optarg;
@@ -110,19 +110,19 @@
 		case 'N':
 			nlistf = optarg;
 			break;
+		case 'b':
+			bflag = !bflag;
+			break;
 		case 'n':
 			nflag = !nflag;
 			break;
-		case 'w':
-			if ((naptime = atoi(optarg)) <= 0)
-				errx(1, "interval <= 0.");
-			break;
 		case 't':
 			if ((turns = atoi(optarg)) <= 0)
 				errx(1, "turns <= 0.");
 			break;
-		case 'b':
-			bflag = !bflag;
+		case 'w':
+			if ((naptime = strtod(optarg, NULL)) <= 0)
+				errx(1, "interval <= 0.");
 			break;
 		case '?':
 		default: