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:
parent
57827baa10
commit
0c6cd17945
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user