summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
01670b8)
SCCS-vsn: usr.bin/systat/swap.c 8.3
-static char sccsid[] = "@(#)swap.c 8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)swap.c 8.3 (Berkeley) %G%";
#include "systat.h"
#include "extern.h"
#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));
extern char *getbsize __P((int *headerlenp, long *blocksizep));
void showspace __P((char *header, int hlen, long blocksize));
"Disk", hlen, header, "Used",
"/0% /10% /20% /30% /40% /50% /60% /70% /80% /90% /100%");
for (i = 0; i < nswdev; i++) {
"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);