=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/main.c,v retrieving revision 1.71 retrieving revision 1.72 diff -c -r1.71 -r1.72 *** src/usr.bin/systat/main.c 2019/10/14 19:22:17 1.71 --- src/usr.bin/systat/main.c 2020/01/12 20:51:08 1.72 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.71 2019/10/14 19:22:17 deraadt Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar * Copyright (c) 2001 Daniel Hartmeier --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.72 2020/01/12 20:51:08 martijn Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar * Copyright (c) 2001 Daniel Hartmeier *************** *** 212,218 **** usage(void) { extern char *__progname; ! fprintf(stderr, "usage: %s [-aBbiNn] [-d count] " "[-s delay] [-w width] [view] [delay]\n", __progname); exit(1); } --- 212,218 ---- usage(void) { extern char *__progname; ! fprintf(stderr, "usage: %s [-aBbhiNn] [-d count] " "[-s delay] [-w width] [view] [delay]\n", __progname); exit(1); } *************** *** 305,310 **** --- 305,314 ---- need_update = 1; return; } + if (strncasecmp(buf, "human", 5) == 0) { + humanreadable = !humanreadable; + return; + } for (s = buf; *s && strchr("0123456789+-.eE", *s) != NULL; s++) ; *************** *** 438,444 **** if (setresgid(gid, gid, gid) == -1) err(1, "setresgid"); ! while ((ch = getopt(argc, argv, "BNabd:ins:w:")) != -1) { switch (ch) { case 'a': maxlines = -1; --- 442,448 ---- if (setresgid(gid, gid, gid) == -1) err(1, "setresgid"); ! while ((ch = getopt(argc, argv, "BNabd:hins:w:")) != -1) { switch (ch) { case 'a': maxlines = -1; *************** *** 456,461 **** --- 460,468 ---- countmax = strtonum(optarg, 1, INT_MAX, &errstr); if (errstr) errx(1, "-d %s: %s", optarg, errstr); + break; + case 'h': + humanreadable = 1; break; case 'i': interactive = 1;