svn commit: r341777 - in stable/12: lib/libprocstat usr.bin/fstat usr.bin/procstat

Konstantin Belousov kib at FreeBSD.org
Mon Dec 10 01:03:18 UTC 2018


Author: kib
Date: Mon Dec 10 01:03:16 2018
New Revision: 341777
URL: https://svnweb.freebsd.org/changeset/base/341777

Log:
  MFC r341448:
  Print type designator 'D' for the KF_TYPE_DEV files.

Modified:
  stable/12/lib/libprocstat/libprocstat.c
  stable/12/lib/libprocstat/libprocstat.h
  stable/12/usr.bin/fstat/fstat.c
  stable/12/usr.bin/procstat/procstat_files.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libprocstat/libprocstat.c
==============================================================================
--- stable/12/lib/libprocstat/libprocstat.c	Mon Dec 10 01:01:43 2018	(r341776)
+++ stable/12/lib/libprocstat/libprocstat.c	Mon Dec 10 01:03:16 2018	(r341777)
@@ -588,6 +588,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;
 		}
@@ -673,6 +677,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/12/lib/libprocstat/libprocstat.h
==============================================================================
--- stable/12/lib/libprocstat/libprocstat.h	Mon Dec 10 01:01:43 2018	(r341776)
+++ stable/12/lib/libprocstat/libprocstat.h	Mon Dec 10 01:03:16 2018	(r341777)
@@ -71,6 +71,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/12/usr.bin/fstat/fstat.c
==============================================================================
--- stable/12/usr.bin/fstat/fstat.c	Mon Dec 10 01:01:43 2018	(r341776)
+++ stable/12/usr.bin/fstat/fstat.c	Mon Dec 10 01:03:16 2018	(r341777)
@@ -301,6 +301,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/12/usr.bin/procstat/procstat_files.c
==============================================================================
--- stable/12/usr.bin/procstat/procstat_files.c	Mon Dec 10 01:01:43 2018	(r341776)
+++ stable/12/usr.bin/procstat/procstat_files.c	Mon Dec 10 01:03:16 2018	(r341777)
@@ -408,6 +408,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}");


More information about the svn-src-all mailing list