summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-07-06 04:02:30 +0000
committerbde <bde@FreeBSD.org>1997-07-06 04:02:30 +0000
commit8e49bc41a2ccf2ebdd927af9395913f3da1156d1 (patch)
tree84177f8a2d33d775d16c7cabc1f608f3f5fc2753 /usr.bin
parentaed802936a4247991924cea2c0ff32b112a22f0b (diff)
downloadFreeBSD-src-8e49bc41a2ccf2ebdd927af9395913f3da1156d1.zip
FreeBSD-src-8e49bc41a2ccf2ebdd927af9395913f3da1156d1.tar.gz
Import Lite2's src/usr.bin/systat. cmds.c is still on the vendor branch
and this import just breaks it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/systat/cmds.c4
-rw-r--r--usr.bin/systat/swap.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/systat/cmds.c b/usr.bin/systat/cmds.c
index 4987c2c..e374e3f 100644
--- a/usr.bin/systat/cmds.c
+++ b/usr.bin/systat/cmds.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
#endif /* not lint */
#include <stdlib.h>
@@ -165,7 +165,7 @@ lookup(name)
nmatches++;
}
}
- if (nmatches > 1)
+ if (nmatches != 1)
return ((struct cmdtab *)-1);
return (found);
}
diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c
index f587eb4..4cefbd0 100644
--- a/usr.bin/systat/swap.c
+++ b/usr.bin/systat/swap.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)swap.c 8.2 (Berkeley) 2/21/94";
+static char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95";
#endif /* not lint */
/*
@@ -55,7 +55,6 @@ static char sccsid[] = "@(#)swap.c 8.2 (Berkeley) 2/21/94";
#include "systat.h"
#include "extern.h"
-extern char *devname __P((int, int));
extern char *getbsize __P((int *headerlenp, long *blocksizep));
void showspace __P((char *header, int hlen, long blocksize));
@@ -199,7 +198,7 @@ fetchswap()
void
labelswap()
{
- char *header;
+ char *header, *p;
int row, i;
row = 0;
@@ -209,8 +208,8 @@ labelswap()
"Disk", hlen, header, "Used",
"/0% /10% /20% /30% /40% /50% /60% /70% /80% /90% /100%");
for (i = 0; i < nswdev; i++) {
- mvwprintw(wnd, i + 1, 0, "%-5s",
- devname(sw[i].sw_dev, S_IFBLK));
+ p = devname(sw[i].sw_dev, S_IFBLK);
+ mvwprintw(wnd, i + 1, 0, "%-5s", p == NULL ? "??" : p);
}
}
OpenPOWER on IntegriCloud