Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/usr.bin/systat Pull up the following revisions(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/d446ad974bae
branches:  netbsd-7
changeset: 445471:d446ad974bae
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Tue Oct 30 10:54:25 2018 +0000

description:
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.

diffstat:

 usr.bin/systat/main.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (53 lines):

diff -r 98cbac43c066 -r d446ad974bae usr.bin/systat/main.c
--- a/usr.bin/systat/main.c     Tue Oct 30 10:17:52 2018 +0000
+++ b/usr.bin/systat/main.c     Tue Oct 30 10:54:25 2018 +0000
@@ -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:



Home | Main Index | Thread Index | Old Index