PERFORCE change 156324 for review

Robert Watson rwatson at FreeBSD.org
Sun Jan 18 04:23:14 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=156324

Change 156324 by rwatson at rwatson_freebsd_capabilities on 2009/01/18 12:22:37

	Export procdesc pid in filedesc sysctl so that procstat sees it;
	not exported by ofiledesc.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#14 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/sys/kern/kern_descrip.c#14 (text+ko) ====

@@ -2643,7 +2643,6 @@
 	struct proc *p;
 	struct tty *tp;
 	int vfslocked;
-	pid_t pid;
 
 	name = (int *)arg1;
 	if ((p = pfind((pid_t)name[0])) == NULL)
@@ -2675,7 +2674,6 @@
 		vp = NULL;
 		so = NULL;
 		tp = NULL;
-		pid = 0;
 		kif->kf_fd = i;
 		switch (fp->f_type) {
 		case DTYPE_VNODE:
@@ -2728,7 +2726,6 @@
 			break;
 
 		case DTYPE_PROCDESC:
-			pid = ((struct procdesc *)fp->f_data)->pd_pid;
 			kif->kf_type = KF_TYPE_PROCDESC;
 			break;
 
@@ -2905,7 +2902,6 @@
 	struct proc *p;
 	struct tty *tp;
 	int vfslocked;
-	pid_t pid;
 
 	name = (int *)arg1;
 	if ((p = pfind((pid_t)name[0])) == NULL)
@@ -2987,8 +2983,8 @@
 			break;
 
 		case DTYPE_PROCDESC:
-			pid = ((struct procdesc *)fp->f_data)->pd_pid;
 			kif->kf_type = KF_TYPE_PROCDESC;
+			kif->kf_pid = ((struct procdesc *)fp->f_data)->pd_pid;
 			break;
 
 		default:


More information about the p4-projects mailing list