diff options
author | joerg <joerg@FreeBSD.org> | 1996-10-20 12:54:55 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-10-20 12:54:55 +0000 |
commit | 0c6cd17945d88a0c7330e2b4c5cf66b376a591d7 (patch) | |
tree | 8fbe23cac284ac460ffeb1a8dfadfba95841053f /usr.sbin/pstat | |
parent | 57827baa10808e56b01e8dd1af8e6ce45763ddd8 (diff) | |
download | FreeBSD-src-0c6cd17945d88a0c7330e2b4c5cf66b376a591d7.zip FreeBSD-src-0c6cd17945d88a0c7330e2b4c5cf66b376a591d7.tar.gz |
Make pstat -s (aka. sswapinfo) print ``[NFS]'' as opposed to
``/dev/??'' for NFS swap.
I had a hard time to figure out whether it's possible to print the
actual mounted swap file, but i failed to get any information. If
anybody knows how to get ``192.168.0.1:/swap.192.168.0.3'' instead,
please step forward!
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r-- | usr.sbin/pstat/pstat.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 7edf8b7..d6ddc57 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -1132,9 +1132,13 @@ swapmode() continue; if (!totalflag) - (void)printf("/dev/%-6s %*d ", - devname(sw[i].sw_dev, S_IFBLK), - hlen, sw[i].sw_nblks / div); + if (sw[i].sw_dev != NODEV) + (void)printf("/dev/%-6s %*d ", + devname(sw[i].sw_dev, S_IFBLK), + hlen, sw[i].sw_nblks / div); + else + (void)printf("[NFS swap] %*d ", + hlen, sw[i].sw_nblks / div); /* The first dmmax is never allocated to avoid trashing of * disklabels |