Date: Mon, 10 Dec 2018 01:39:41 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341779 - in stable/11: lib/libprocstat usr.bin/fstat usr.bin/procstat Message-ID: <201812100139.wBA1dfTM053391@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Dec 10 01:39:40 2018 New Revision: 341779 URL: https://svnweb.freebsd.org/changeset/base/341779 Log: MFC r341448: Print type designator 'D' for the KF_TYPE_DEV files. Modified: stable/11/lib/libprocstat/libprocstat.c stable/11/lib/libprocstat/libprocstat.h stable/11/usr.bin/fstat/fstat.c stable/11/usr.bin/procstat/procstat_files.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libprocstat/libprocstat.c ============================================================================== --- stable/11/lib/libprocstat/libprocstat.c Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/lib/libprocstat/libprocstat.c Mon Dec 10 01:39:40 2018 (r341779) @@ -583,6 +583,10 @@ procstat_getfiles_kvm(struct procstat *procstat, struc type = PS_FST_TYPE_PROCDESC; data = file.f_data; break; + case DTYPE_DEV: + type = PS_FST_TYPE_DEV; + data = file.f_data; + break; default: continue; } @@ -668,6 +672,7 @@ kinfo_type2fst(int kftype) } kftypes2fst[] = { { KF_TYPE_PROCDESC, PS_FST_TYPE_PROCDESC }, { KF_TYPE_CRYPTO, PS_FST_TYPE_CRYPTO }, + { KF_TYPE_DEV, PS_FST_TYPE_DEV }, { KF_TYPE_FIFO, PS_FST_TYPE_FIFO }, { KF_TYPE_KQUEUE, PS_FST_TYPE_KQUEUE }, { KF_TYPE_MQUEUE, PS_FST_TYPE_MQUEUE }, Modified: stable/11/lib/libprocstat/libprocstat.h ============================================================================== --- stable/11/lib/libprocstat/libprocstat.h Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/lib/libprocstat/libprocstat.h Mon Dec 10 01:39:40 2018 (r341779) @@ -69,6 +69,7 @@ #define PS_FST_TYPE_UNKNOWN 11 #define PS_FST_TYPE_NONE 12 #define PS_FST_TYPE_PROCDESC 13 +#define PS_FST_TYPE_DEV 14 /* * Special descriptor numbers. Modified: stable/11/usr.bin/fstat/fstat.c ============================================================================== --- stable/11/usr.bin/fstat/fstat.c Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/usr.bin/fstat/fstat.c Mon Dec 10 01:39:40 2018 (r341779) @@ -299,6 +299,8 @@ print_file_info(struct procstat *procstat, struct file case PS_FST_TYPE_SEM: print_sem_info(procstat, fst); break; + case PS_FST_TYPE_DEV: + break; default: if (vflg) fprintf(stderr, Modified: stable/11/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/11/usr.bin/procstat/procstat_files.c Mon Dec 10 01:38:48 2018 (r341778) +++ stable/11/usr.bin/procstat/procstat_files.c Mon Dec 10 01:39:40 2018 (r341779) @@ -407,6 +407,11 @@ procstat_files(struct procstat *procstat, struct kinfo xo_emit("{eq:fd_type/procdesc}"); break; + case PS_FST_TYPE_DEV: + str = "D"; + xo_emit("{eq:fd_type/dev}"); + break; + case PS_FST_TYPE_NONE: str = "?"; xo_emit("{eq:fd_type/none}");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812100139.wBA1dfTM053391>