diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-06-05 21:56:47 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-06-05 21:56:47 +0000 |
| commit | 1afc333e74542914e63fff275d898aface6dc999 (patch) | |
| tree | 853ad914a6f119c105a0ec017600fe9f57a11876 /usr.sbin/pstat | |
| parent | c6dd496cd9571118a6f47dbebd12549148ae2906 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/pstat')
| -rw-r--r-- | usr.sbin/pstat/pstat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 8b25890ed64f..eb23ec9754af 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; |
