summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-05 21:56:47 +0000
committerphk <phk@FreeBSD.org>2003-06-05 21:56:47 +0000
commit6a770c47d44fec12ad7ebfd0b9904f691ca7dcc1 (patch)
tree853ad914a6f119c105a0ec017600fe9f57a11876 /usr.sbin/pstat
parent433d1e778c3d417117e79f66027c59e8c9dd4ab0 (diff)
downloadFreeBSD-src-6a770c47d44fec12ad7ebfd0b9904f691ca7dcc1.zip
FreeBSD-src-6a770c47d44fec12ad7ebfd0b9904f691ca7dcc1.tar.gz
Report NODEV devices as <NFSfile>
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r--usr.sbin/pstat/pstat.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 8b25890..eb23ec9 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -570,8 +570,12 @@ swapmode_sysctl(void)
break;
if (xsw.xsw_version != XSWDEV_VERSION)
errx(1, "xswdev version mismatch");
- snprintf(ksw.ksw_devname, sizeof ksw.ksw_devname,
- "/dev/%s", devname(xsw.xsw_dev, S_IFCHR));
+ if (xsw.xsw_dev == NODEV)
+ snprintf(ksw.ksw_devname, sizeof ksw.ksw_devname,
+ "<NFSfile>");
+ else
+ snprintf(ksw.ksw_devname, sizeof ksw.ksw_devname,
+ "/dev/%s", devname(xsw.xsw_dev, S_IFCHR));
ksw.ksw_used = xsw.xsw_used;
ksw.ksw_total = xsw.xsw_nblks;
ksw.ksw_flags = xsw.xsw_flags;
OpenPOWER on IntegriCloud