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!
This commit is contained in:
joerg 1996-10-20 12:54:55 +00:00
parent 57827baa10
commit 0c6cd17945

View File

@ -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