PERFORCE change 32245 for review

Robert Watson rwatson at FreeBSD.org
Sat May 31 17:21:05 PDT 2003


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

Change 32245 by rwatson at rwatson_tislabs on 2003/05/31 17:20:11

	Further integrate TrustedBSD base branch: bring in phk's
	lint spammage, System V IPC permission checking clarifications,
	and PAM build fix.

Affected files ...

.. //depot/projects/trustedbsd/base/Makefile.inc1#39 integrate
.. //depot/projects/trustedbsd/base/lib/libc/ia64/gen/Makefile.inc#5 integrate
.. //depot/projects/trustedbsd/base/lib/libc/ia64/gen/makecontext.c#1 branch
.. //depot/projects/trustedbsd/base/lib/libc/stdlib/random.3#2 integrate
.. //depot/projects/trustedbsd/base/sys/amd64/amd64/amd64-gdbstub.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/amd64/amd64/db_trace.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/amd64/amd64/nexus.c#3 integrate
.. //depot/projects/trustedbsd/base/sys/cam/cam.c#3 integrate
.. //depot/projects/trustedbsd/base/sys/cam/cam_xpt.c#13 integrate
.. //depot/projects/trustedbsd/base/sys/cam/scsi/scsi_pt.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/cam/scsi/scsi_targ_bh.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_socket.c#5 integrate
.. //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_socket.h#3 integrate
.. //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_stat.c#7 integrate
.. //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_sysvec.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/conf/kern.post.mk#24 integrate
.. //depot/projects/trustedbsd/base/sys/ddb/db_break.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/dev/amd/amd.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/dev/bge/if_bge.c#23 integrate
.. //depot/projects/trustedbsd/base/sys/dev/bktr/bktr_os.c#9 integrate
.. //depot/projects/trustedbsd/base/sys/dev/buslogic/bt.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/dev/buslogic/bt_eisa.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/dev/ips/ips_ioctl.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/dev/musycc/musycc.c#5 integrate
.. //depot/projects/trustedbsd/base/sys/dev/pccbb/pccbb.c#25 integrate
.. //depot/projects/trustedbsd/base/sys/dev/pci/pci.c#20 integrate
.. //depot/projects/trustedbsd/base/sys/dev/streams/streams.c#12 integrate
.. //depot/projects/trustedbsd/base/sys/dev/syscons/fade/fade_saver.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/dev/vx/if_vx_eisa.c#3 integrate
.. //depot/projects/trustedbsd/base/sys/dev/xe/if_xe.c#7 integrate
.. //depot/projects/trustedbsd/base/sys/fs/msdosfs/msdosfs_vnops.c#13 integrate
.. //depot/projects/trustedbsd/base/sys/i386/i386/bios.c#13 integrate
.. //depot/projects/trustedbsd/base/sys/i386/i386/db_trace.c#9 integrate
.. //depot/projects/trustedbsd/base/sys/i386/isa/clock.c#16 integrate
.. //depot/projects/trustedbsd/base/sys/i386/isa/gpib.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/ia64/machdep.c#33 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/ia64/syscall.s#2 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/ia64/trap.c#18 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/ia64/vm_machdep.c#22 integrate
.. //depot/projects/trustedbsd/base/sys/ia64/include/_regset.h#2 integrate
.. //depot/projects/trustedbsd/base/sys/isa/pnp.c#5 integrate
.. //depot/projects/trustedbsd/base/sys/isa/ppc.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/isa/psm.c#11 integrate
.. //depot/projects/trustedbsd/base/sys/isa/vga_isa.c#5 integrate
.. //depot/projects/trustedbsd/base/sys/isofs/cd9660/cd9660_lookup.c#4 integrate
.. //depot/projects/trustedbsd/base/sys/kern/imgact_elf.c#20 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_conf.c#17 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_descrip.c#37 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_intr.c#22 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_mutex.c#25 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_synch.c#28 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_thread.c#26 integrate
.. //depot/projects/trustedbsd/base/sys/kern/subr_prf.c#23 integrate
.. //depot/projects/trustedbsd/base/sys/kern/subr_rman.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/kern/subr_witness.c#34 integrate
.. //depot/projects/trustedbsd/base/sys/kern/sysv_ipc.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/kern/vfs_subr.c#42 integrate
.. //depot/projects/trustedbsd/base/sys/kern/vfs_syscalls.c#41 integrate
.. //depot/projects/trustedbsd/base/sys/net/if_atmsubr.c#9 integrate
.. //depot/projects/trustedbsd/base/sys/net/if_ef.c#9 integrate
.. //depot/projects/trustedbsd/base/sys/nfsclient/bootp_subr.c#11 integrate
.. //depot/projects/trustedbsd/base/sys/pci/alpm.c#5 integrate
.. //depot/projects/trustedbsd/base/sys/pci/if_pcn.c#10 integrate
.. //depot/projects/trustedbsd/base/sys/pci/if_rl.c#22 integrate
.. //depot/projects/trustedbsd/base/sys/pci/if_sf.c#10 integrate
.. //depot/projects/trustedbsd/base/sys/pci/if_sk.c#11 integrate
.. //depot/projects/trustedbsd/base/sys/pci/if_ste.c#16 integrate
.. //depot/projects/trustedbsd/base/sys/pci/if_ti.c#19 integrate
.. //depot/projects/trustedbsd/base/sys/pci/ncr.c#7 integrate
.. //depot/projects/trustedbsd/base/sys/security/mac_lomac/mac_lomac.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/sys/devicestat.h#4 integrate
.. //depot/projects/trustedbsd/base/sys/ufs/ufs/ufs_vnops.c#27 integrate
.. //depot/projects/trustedbsd/base/sys/vm/uma_int.h#8 integrate
.. //depot/projects/trustedbsd/base/sys/vm/vm_glue.c#27 integrate
.. //depot/projects/trustedbsd/base/usr.bin/vgrind/vgrind.sh#3 integrate

Differences ...

==== //depot/projects/trustedbsd/base/Makefile.inc1#39 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/Makefile.inc1,v 1.362 2003/05/21 21:47:20 ru Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.363 2003/05/31 21:29:38 obrien Exp $
 #
 # Make command line options:
 #	-DNO_KERBEROS Do not build Heimdal (Kerberos 5)
@@ -640,11 +640,14 @@
 _strfile=	games/fortune/strfile
 .endif
 
+.if !defined(NO_CXX)
+_gperf=	gnu/usr.bin/gperf
 .if ${BOOTSTRAPPING} < 500113
 _groff=		gnu/usr.bin/groff
 .else
 _groff=		gnu/usr.bin/groff/tmac
 .endif
+.endif
 
 .if ( ${BOOTSTRAPPING} < 450005 || \
     ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 ))
@@ -670,7 +673,7 @@
     usr.bin/makewhatis usr.bin/rpcgen ${_uudecode} \
     ${_xargs} usr.bin/xinstall ${_yacc} \
     usr.sbin/config ${_kbdcontrol} \
-    gnu/usr.bin/gperf ${_groff} gnu/usr.bin/texinfo
+    ${_gperf} ${_groff} gnu/usr.bin/texinfo
 	@${ECHODIR} "===> ${_tool}"; \
 		cd ${.CURDIR}/${_tool}; \
 		${MAKE} DIRPRFX=${_tool}/ obj; \

==== //depot/projects/trustedbsd/base/lib/libc/ia64/gen/Makefile.inc#5 (text+ko) ====

@@ -1,9 +1,9 @@
-# $FreeBSD: src/lib/libc/ia64/gen/Makefile.inc,v 1.6 2003/01/11 07:24:54 marcel Exp $
+# $FreeBSD: src/lib/libc/ia64/gen/Makefile.inc,v 1.7 2003/05/31 19:42:51 marcel Exp $
 
 SRCS+=	__divdf3.S __divdi3.S __divsf3.S __divsi3.S __moddi3.S __modsi3.S \
 	__udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S _setjmp.S fabs.S \
 	fpgetmask.c fpgetround.c fpsetmask.c fpsetround.c frexp.c infinity.c \
-	isinf.c ldexp.c modf.c setjmp.S sigsetjmp.S
+	isinf.c ldexp.c makecontext.c modf.c setjmp.S sigsetjmp.S
 
 # The following may go away if function _Unwind_FindTableEntry()
 # will be part of GCC.

==== //depot/projects/trustedbsd/base/lib/libc/stdlib/random.3#2 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)random.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdlib/random.3,v 1.17 2001/09/07 14:46:36 asmodai Exp $
+.\" $FreeBSD: src/lib/libc/stdlib/random.3,v 1.18 2003/05/31 21:14:41 schweikh Exp $
 .\"
 .Dd June 4, 1993
 .Dt RANDOM 3
@@ -100,7 +100,7 @@
 .Pp
 The
 .Fn srandomdev
-routine initialize a state array using
+routine initializes a state array using the
 .Xr random 4
 random number device which returns good random numbers,
 suitable for cryptographic use.

==== //depot/projects/trustedbsd/base/sys/amd64/amd64/amd64-gdbstub.c#2 (text+ko) ====

@@ -92,7 +92,7 @@
  *
  ****************************************************************************/
 
-/* $FreeBSD: src/sys/amd64/amd64/amd64-gdbstub.c,v 1.23 2003/05/30 01:02:52 peter Exp $ */
+/* $FreeBSD: src/sys/amd64/amd64/amd64-gdbstub.c,v 1.24 2003/05/31 22:00:57 peter Exp $ */
 
 #include <sys/param.h>
 #include <sys/reboot.h>
@@ -120,11 +120,8 @@
    nasty interactions between app code and the stub (for instance if user steps
    into strlen, etc..) */
 
-#define strlen	gdb_strlen
-#define strcpy	gdb_strcpy
-
 static int
-strlen (const char *s)
+gdb_strlen (const char *s)
 {
   const char *s1 = s;
 
@@ -134,7 +131,7 @@
 }
 
 static char *
-strcpy (char *dst, const char *src)
+gdb_strcpy (char *dst, const char *src)
 {
   char *retval = dst;
 
@@ -223,7 +220,7 @@
 
 		  /* remove sequence chars from buffer */
 
-		  count = strlen (buffer);
+		  count = gdb_strlen (buffer);
 		  for (i=3; i <= count; i++)
 		    buffer[i-3] = buffer[i];
 		}
@@ -512,7 +509,7 @@
 
 	case 'G':		/* set the value of the CPU registers - return OK */
 	  hex2mem (&remcomInBuffer[1], (vm_offset_t)&registers, NUMREGBYTES);
-	  strcpy (remcomOutBuffer, "OK");
+	  gdb_strcpy (remcomOutBuffer, "OK");
 	  break;
 
 	case 'P':		/* Set the value of one register */
@@ -526,10 +523,10 @@
 		&& regno < NUM_REGS)
 	      {
 		hex2mem (ptr, (vm_offset_t)&registers + regno * 4, 4);
-		strcpy(remcomOutBuffer,"OK");
+		gdb_strcpy(remcomOutBuffer,"OK");
 	      }
 	    else
-	      strcpy (remcomOutBuffer, "P01");
+	      gdb_strcpy (remcomOutBuffer, "P01");
 	    break;
 	  }
 	case 'm':	/* mAA..AA,LLLL  Read LLLL bytes at address AA..AA */
@@ -542,11 +539,11 @@
 	      && hexToInt (&ptr, &length))
 	    {
 	      if (mem2hex((vm_offset_t) addr, remcomOutBuffer, length) == NULL)
-		strcpy (remcomOutBuffer, "E03");
+		gdb_strcpy (remcomOutBuffer, "E03");
 	      break;
 	    }
 	  else
-	    strcpy (remcomOutBuffer, "E01");
+	    gdb_strcpy (remcomOutBuffer, "E01");
 	  break;
 
 	case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
@@ -561,12 +558,12 @@
 	      && *(ptr++) == ':')
 	    {
 	      if (hex2mem(ptr, (vm_offset_t) addr, length) == NULL)
-		strcpy (remcomOutBuffer, "E03");
+		gdb_strcpy (remcomOutBuffer, "E03");
 	      else
-		strcpy (remcomOutBuffer, "OK");
+		gdb_strcpy (remcomOutBuffer, "OK");
 	    }
 	  else
-	    strcpy (remcomOutBuffer, "E02");
+	    gdb_strcpy (remcomOutBuffer, "E02");
 	  break;
 
 	  /* cAA..AA    Continue at address AA..AA(optional) */

==== //depot/projects/trustedbsd/base/sys/amd64/amd64/db_trace.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.56 2003/05/30 01:01:07 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.57 2003/05/31 22:02:11 peter Exp $
  */
 
 #include <sys/param.h>
@@ -567,7 +567,7 @@
 	case DBREG_DR7_WRONLY:
 	case DBREG_DR7_RDWR:
 		break;
-	default : return (-1); break;
+	default : return (-1);
 	}
 	
 	/*
@@ -577,7 +577,7 @@
 	case 1	: mask = 0x00; break;
 	case 2	: mask = 0x01 << 2; break;
 	case 4	: mask = 0x03 << 2; break;
-	default : return (-1); break;
+	default : return (-1);
 	}
 
 	mask |= access;

==== //depot/projects/trustedbsd/base/sys/amd64/amd64/nexus.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.52 2003/05/23 05:04:53 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.53 2003/05/31 21:58:55 peter Exp $
  */
 
 /*
@@ -411,7 +411,6 @@
 nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
 		 int flags, void (*ihand)(void *), void *arg, void **cookiep)
 {
-	driver_t	*driver;
 	int		error;
 
 	/* somebody tried to setup an irq that failed to allocate! */
@@ -422,8 +421,6 @@
 	if ((irq->r_flags & RF_SHAREABLE) == 0)
 		flags |= INTR_EXCL;
 
-	driver = device_get_driver(child);
-
 	/*
 	 * We depend here on rman_activate_resource() being idempotent.
 	 */

==== //depot/projects/trustedbsd/base/sys/cam/cam.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/cam.c,v 1.5 2002/01/09 03:38:58 msmith Exp $
+ * $FreeBSD: src/sys/cam/cam.c,v 1.6 2003/05/31 20:46:21 phk Exp $
  */
 #include <sys/param.h>
 
@@ -236,6 +236,7 @@
 				/* FALLTHROUGH */
 			case CAM_EPF_MINIMAL:
 				proto_flags |= CAM_ESF_PRINT_STATUS;
+				/* FALLTHROUGH */
 			default:
 				break;
 			}

==== //depot/projects/trustedbsd/base/sys/cam/cam_xpt.c#13 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.132 2003/03/08 08:01:26 phk Exp $
+ * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.133 2003/05/31 20:46:21 phk Exp $
  */
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -2995,8 +2995,8 @@
 			  	       &path->device->inq_data),
 			  scsi_cdb_string(start_ccb->csio.cdb_io.cdb_bytes,
 					  cdb_str, sizeof(cdb_str))));
-		/* FALLTHROUGH */
 	}
+	/* FALLTHROUGH */
 	case XPT_TARGET_IO:
 	case XPT_CONT_TARGET_IO:
 		start_ccb->csio.sense_resid = 0;
@@ -3111,8 +3111,8 @@
 		 * If we weren't able to take care of the abort request
 		 * in the XPT, pass the request down to the SIM for processing.
 		 */
-		/* FALLTHROUGH */
 	}
+	/* FALLTHROUGH */
 	case XPT_ACCEPT_TARGET_IO:
 	case XPT_EN_LUN:
 	case XPT_IMMED_NOTIFY:
@@ -3271,7 +3271,6 @@
 		int s;
 		dev_pos_type position_type;
 		struct ccb_dev_match *cdm;
-		int ret;
 
 		cdm = &start_ccb->cdm;
 
@@ -3316,10 +3315,10 @@
 
 		switch(position_type & CAM_DEV_POS_TYPEMASK) {
 		case CAM_DEV_POS_EDT:
-			ret = xptedtmatch(cdm);
+			xptedtmatch(cdm);
 			break;
 		case CAM_DEV_POS_PDRV:
-			ret = xptperiphlistmatch(cdm);
+			xptperiphlistmatch(cdm);
 			break;
 		default:
 			cdm->status = CAM_DEV_MATCH_ERROR;
@@ -5639,8 +5638,8 @@
 		xpt_print_path(periph->path);
 		printf("Unable to mode sense control page - malloc failure\n");
 		softc->action = PROBE_SERIAL_NUM;
-		/* FALLTHROUGH */
 	}
+	/* FALLTHROUGH */
 	case PROBE_SERIAL_NUM:
 	{
 		struct scsi_vpd_unit_serial_number *serial_buf;
@@ -6913,7 +6912,6 @@
 
 		if (ccb_h->flags & CAM_HIGH_POWER) {
 			struct highpowerlist	*hphead;
-			struct cam_ed		*device;
 			union ccb		*send_ccb;
 
 			hphead = &highpowerq;
@@ -6929,7 +6927,6 @@
 			 * Any high powered commands queued up?
 			 */
 			if (send_ccb != NULL) {
-				device = send_ccb->ccb_h.path->device;
 
 				STAILQ_REMOVE_HEAD(hphead, xpt_links.stqe);
 

==== //depot/projects/trustedbsd/base/sys/cam/scsi/scsi_pt.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.37 2003/04/01 15:06:22 phk Exp $
+ * $FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.38 2003/05/31 20:46:21 phk Exp $
  */
 
 #include <sys/param.h>
@@ -458,8 +458,8 @@
 		LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le)
 			ccbh->ccb_state |= PT_CCB_RETRY_UA;
 		splx(s);
-		/* FALLTHROUGH */
 	}
+	/* FALLTHROUGH */
 	default:
 		cam_periph_async(periph, code, path, arg);
 		break;

==== //depot/projects/trustedbsd/base/sys/cam/scsi/scsi_targ_bh.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.16 2003/02/02 13:17:27 alfred Exp $
+ * $FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.17 2003/05/31 20:44:32 phk Exp $
  */
 
 #include <sys/param.h>
@@ -399,11 +399,8 @@
 static cam_status
 targbhctor(struct cam_periph *periph, void *arg)
 {
-	struct ccb_pathinq *cpi;
 	struct targbh_softc *softc;
 
-	cpi = (struct ccb_pathinq *)arg;
-
 	/* Allocate our per-instance private storage */
 	softc = (struct targbh_softc *)malloc(sizeof(*softc),
 					      M_DEVBUF, M_NOWAIT);
@@ -436,13 +433,13 @@
 	targbhdislun(periph);
 
 	switch (softc->init_level) {
+	case 0:
+		panic("targdtor - impossible init level");;
+	case 1:
+		/* FALLTHROUGH */
 	default:
-		/* FALLTHROUGH */
-	case 1:
 		free(softc, M_DEVBUF);
 		break;
-	case 0:
-		panic("targdtor - impossible init level");;
 	}
 }
 

==== //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_socket.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_socket.c,v 1.20 2003/02/19 05:46:59 imp Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_socket.c,v 1.21 2003/05/31 20:33:18 phk Exp $
  */
 
 /*
@@ -62,18 +62,6 @@
 #include <compat/svr4/svr4_sockmod.h>
 #include <compat/svr4/svr4_proto.h>
 
-struct svr4_sockcache_entry {
-	struct proc *p;		/* Process for the socket		*/
-	void *cookie;		/* Internal cookie used for matching	*/
-	struct sockaddr_un sock;/* Pathname for the socket		*/
-	udev_t dev;		/* Device where the socket lives on	*/
-	ino_t ino;		/* Inode where the socket lives on	*/
-	TAILQ_ENTRY(svr4_sockcache_entry) entries;
-};
-
-extern TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head;
-extern int svr4_str_initialized;
-
 struct sockaddr_un *
 svr4_find_socket(td, fp, dev, ino)
 	struct thread *td;

==== //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_socket.h#3 (text+ko) ====

@@ -28,7 +28,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_socket.h,v 1.6 2002/03/20 05:41:38 alfred Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_socket.h,v 1.7 2003/05/31 20:33:18 phk Exp $
  */
 
 #ifndef _SVR4_SOCKET_H_
@@ -53,4 +53,17 @@
 void svr4_delete_socket(struct proc *, struct file *);
 int svr4_add_socket(struct thread *, const char *, struct stat *);
 
+struct svr4_sockcache_entry {
+	struct proc *p;		/* Process for the socket		*/
+	void *cookie;		/* Internal cookie used for matching	*/
+	struct sockaddr_un sock;/* Pathname for the socket		*/
+	udev_t dev;		/* Device where the socket lives on	*/
+	ino_t ino;		/* Inode where the socket lives on	*/
+	TAILQ_ENTRY(svr4_sockcache_entry) entries;
+};
+
+TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry);
+extern struct svr4_sockcache_head svr4_head;
+extern int svr4_str_initialized;
+
 #endif /* _SVR4_SOCKET_H_ */

==== //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_stat.c#7 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_stat.c,v 1.16 2002/12/14 01:56:24 alfred Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_stat.c,v 1.17 2003/05/31 20:33:18 phk Exp $
  */
 
 #include <sys/param.h>
@@ -39,6 +39,7 @@
 #include <sys/time.h>
 #include <sys/sysctl.h>
 #include <sys/sysproto.h>
+#include <sys/un.h>
 
 #include <vm/vm.h>
 

==== //depot/projects/trustedbsd/base/sys/compat/svr4/svr4_sysvec.c#8 (text+ko) ====

@@ -27,7 +27,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_sysvec.c,v 1.30 2003/03/21 19:49:34 jhb Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_sysvec.c,v 1.31 2003/05/31 20:33:18 phk Exp $
  */
 
 /* XXX we use functions that might not exist. */
@@ -61,7 +61,6 @@
 #include <compat/svr4/svr4_syscall.h>
 #include <compat/svr4/svr4_signal.h>
 #include <compat/svr4/svr4_sockio.h>
-#include <compat/svr4/svr4_socket.h>
 #include <compat/svr4/svr4_errno.h>
 #include <compat/svr4/svr4_proto.h>
 #include <compat/svr4/svr4_siginfo.h>

==== //depot/projects/trustedbsd/base/sys/conf/kern.post.mk#24 (text+ko) ====

@@ -6,9 +6,14 @@
 # should be defined in the kern.pre.mk so that port makefiles can
 # override or augment them.
 #
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.41 2003/04/30 12:19:25 markm Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.42 2003/05/31 21:16:12 phk Exp $
 #
 
+# In case the config had a makeoptions DESTDIR...
+.if defined(DESTDIR)
+MKMODULESENV+=	DESTDIR="${DESTDIR}"
+.endif
+
 .MAIN: all
 
 .for target in all clean cleandepend cleandir clobber depend install \

==== //depot/projects/trustedbsd/base/sys/ddb/db_break.c#4 (text+ko) ====

@@ -23,7 +23,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/ddb/db_break.c,v 1.21 2002/12/31 06:51:19 jake Exp $
+ * $FreeBSD: src/sys/ddb/db_break.c,v 1.22 2003/05/31 20:43:47 phk Exp $
  */
 
 /*
@@ -400,6 +400,7 @@
 	case KEY_CRTLB:
 		if (*state == KEY_CRTLB)
 			brk = 1;
+		/* FALLTHROUGH */
 	default:
 		*state = 0;
 		break;

==== //depot/projects/trustedbsd/base/sys/dev/amd/amd.c#4 (text+ko) ====

@@ -30,7 +30,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *********************************************************************
- * $FreeBSD: src/sys/dev/amd/amd.c,v 1.18 2003/05/27 04:59:57 scottl Exp $
+ * $FreeBSD: src/sys/dev/amd/amd.c,v 1.19 2003/05/31 20:43:17 phk Exp $
  */
 
 /*
@@ -393,13 +393,12 @@
 amd_action(struct cam_sim * psim, union ccb * pccb)
 {
 	struct amd_softc *    amd;
-	u_int   target_id, target_lun;
+	u_int   target_id;
 
 	CAM_DEBUG(pccb->ccb_h.path, CAM_DEBUG_TRACE, ("amd_action\n"));
 
 	amd = (struct amd_softc *) cam_sim_softc(psim);
 	target_id = pccb->ccb_h.target_id;
-	target_lun = pccb->ccb_h.target_lun;
 
 	switch (pccb->ccb_h.func_code) {
 	case XPT_SCSI_IO:
@@ -535,6 +534,7 @@
 	case XPT_TERM_IO:
 		pccb->ccb_h.status = CAM_REQ_INVALID;
 		xpt_done(pccb);
+		/* XXX: intentional fall-through ?? */
 	case XPT_GET_TRAN_SETTINGS:
 	{
 		struct ccb_trans_settings *cts;
@@ -927,7 +927,6 @@
 	u_int command;
 	u_int target;
 	u_int lun;
-	int tagged;
 
 	pccb = pSRB->pccb;
 	pcsio = &pccb->csio;
@@ -952,7 +951,6 @@
 		identify_msg |= MSG_IDENTIFY_DISCFLAG;
 
 	amd_write8(amd, SCSIFIFOREG, identify_msg);
-	tagged = 0;
 	if ((targ_info->disc_tag & AMD_CUR_TAGENB) == 0
 	  || (identify_msg & MSG_IDENTIFY_DISCFLAG) == 0)
 		pccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID;
@@ -966,7 +964,6 @@
 		pSRB->SRBState = SRB_START;
 		amd_write8(amd, SCSIFIFOREG, pcsio->tag_action);
 		amd_write8(amd, SCSIFIFOREG, pSRB->TagNumber);
-		tagged++;
 	} else {
 		command = SEL_W_ATN;
 		pSRB->SRBState = SRB_START;
@@ -1213,7 +1210,6 @@
 static int
 amdparsemsg(struct amd_softc *amd)
 {
-	struct	amd_target_info *targ_info;
 	int	reject;
 	int	done;
 	int	response;
@@ -1222,8 +1218,6 @@
 	response = FALSE;
 	reject = FALSE;
 
-	targ_info = &amd->tinfo[amd->cur_target];
-
 	/*
 	 * Parse as much of the message as is availible,
 	 * rejecting it if we don't support it.  When
@@ -1877,12 +1871,9 @@
 	int	   intflag;
 	struct amd_sg *ptr2;
 	u_int32_t   swlval;
-	u_int   target_id, target_lun;
 
 	pccb = pSRB->pccb;
 	pcsio = &pccb->csio;
-	target_id = pSRB->pccb->ccb_h.target_id;
-	target_lun = pSRB->pccb->ccb_h.target_lun;
 
 	CAM_DEBUG(pccb->ccb_h.path, CAM_DEBUG_TRACE,
 		  ("SRBdone - TagNumber %d\n", pSRB->TagNumber));

==== //depot/projects/trustedbsd/base/sys/dev/bge/if_bge.c#23 (text+ko) ====

@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.41 2003/05/21 07:00:49 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.42 2003/05/31 20:42:24 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -475,12 +475,10 @@
 	int phy, reg;
 {
 	struct bge_softc *sc;
-	struct ifnet *ifp;
 	u_int32_t val, autopoll;
 	int i;
 
 	sc = device_get_softc(dev);
-	ifp = &sc->arpcom.ac_if;
 
 	if (phy != 1)
 		switch(sc->bge_chipid) {

==== //depot/projects/trustedbsd/base/sys/dev/bktr/bktr_os.c#9 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.34 2003/03/25 00:07:00 jake Exp $ */
+/* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.35 2003/05/31 20:41:52 phk Exp $ */
 
 /*
  * This is part of the Driver for Video Capture Cards (Frame grabbers)
@@ -471,19 +471,16 @@
 static int
 bktr_detach( device_t dev )
 {
-	unsigned int	unit;
-
 	struct bktr_softc *bktr = device_get_softc(dev);
 
-	unit = device_get_unit(dev);
-
 	/* Disable the brooktree device */
 	OUTL(bktr, BKTR_INT_MASK, ALL_INTS_DISABLED);
 	OUTW(bktr, BKTR_GPIO_DMA_CTL, FIFO_RISC_DISABLED);
 
 #if defined(BKTR_USE_FREEBSD_SMBUS)
 	if (bt848_i2c_detach(dev))
-		printf("bktr%d: i2c_attach: can't attach\n", unit);
+		printf("bktr%d: i2c_attach: can't attach\n",
+		     device_get_unit(dev));
 #endif
 
 	/* Note: We do not free memory for RISC programs, grab buffer, vbi buffers */

==== //depot/projects/trustedbsd/base/sys/dev/buslogic/bt.c#8 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/buslogic/bt.c,v 1.38 2003/05/27 04:59:57 scottl Exp $
+ * $FreeBSD: src/sys/dev/buslogic/bt.c,v 1.39 2003/05/31 20:41:08 phk Exp $
  */
 
  /*
@@ -248,22 +248,29 @@
 	}
 	case 7:
 		bus_dmamap_unload(bt->ccb_dmat, bt->ccb_dmamap);
+		/* FALLTHROUGH */
 	case 6:
 		bus_dmamem_free(bt->ccb_dmat, bt->bt_ccb_array,
 				bt->ccb_dmamap);
 		bus_dmamap_destroy(bt->ccb_dmat, bt->ccb_dmamap);
+		/* FALLTHROUGH */
 	case 5:
 		bus_dma_tag_destroy(bt->ccb_dmat);
+		/* FALLTHROUGH */
 	case 4:
 		bus_dmamap_unload(bt->mailbox_dmat, bt->mailbox_dmamap);
+		/* FALLTHROUGH */
 	case 3:
 		bus_dmamem_free(bt->mailbox_dmat, bt->in_boxes,
 				bt->mailbox_dmamap);
 		bus_dmamap_destroy(bt->mailbox_dmat, bt->mailbox_dmamap);
+		/* FALLTHROUGH */
 	case 2:
 		bus_dma_tag_destroy(bt->buffer_dmat);
+		/* FALLTHROUGH */
 	case 1:
 		bus_dma_tag_destroy(bt->mailbox_dmat);
+		/* FALLTHROUGH */
 	case 0:
 		break;
 	}

==== //depot/projects/trustedbsd/base/sys/dev/buslogic/bt_eisa.c#4 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/buslogic/bt_eisa.c,v 1.15 2003/03/29 09:46:10 mdodd Exp $
+ * $FreeBSD: src/sys/dev/buslogic/bt_eisa.c,v 1.16 2003/05/31 20:41:08 phk Exp $
  */
 
 #include <sys/param.h>
@@ -162,25 +162,18 @@
 	switch(type) {
 		case EISA_DEVICE_ID_BUSLOGIC_74X_B:
 			return ("Buslogic 74xB SCSI host adapter");
-			break;
 		case EISA_DEVICE_ID_BUSLOGIC_74X_C:
 			return ("Buslogic 74xC SCSI host adapter");
-			break;
 		case EISA_DEVICE_ID_SDC3222B:
 			return ("Storage Dimensions SDC3222B SCSI host adapter");
-			break;
 		case EISA_DEVICE_ID_SDC3222F:
 			return ("Storage Dimensions SDC3222F SCSI host adapter");
-			break;
 		case EISA_DEVICE_ID_SDC3222WS:
 			return ("Storage Dimensions SDC3222WS SCSI host adapter");
-			break;
 		case EISA_DEVICE_ID_SDC3222WB:
 			return ("Storage Dimensions SDC3222WB SCSI host adapter");
-			break;
 		case EISA_DEVICE_ID_AMI_4801:
 			return ("AMI Series 48 SCSI host adapter");
-			break;
 		default:
 			break;
 	}

==== //depot/projects/trustedbsd/base/sys/dev/ips/ips_ioctl.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ips/ips_ioctl.c,v 1.1 2003/05/11 06:36:49 scottl Exp $
+ * $FreeBSD: src/sys/dev/ips/ips_ioctl.c,v 1.2 2003/05/31 20:40:12 phk Exp $
  */
 
 
@@ -86,18 +86,19 @@
 static int ips_ioctl_cmd(ips_softc_t *sc, ips_ioctl_t *ioctl_cmd, ips_user_request *user_request)
 {
 	int error = EINVAL;
-	       	if (bus_dma_tag_create(	/* parent    */	sc->adapter_dmatag,
-				/* alignment */	1,
-				/* boundary  */	0,
-				/* lowaddr   */	BUS_SPACE_MAXADDR_32BIT,
-				/* highaddr  */	BUS_SPACE_MAXADDR,
-				/* filter    */	NULL,
-				/* filterarg */	NULL,
-				/* maxsize   */	ioctl_cmd->datasize,
-				/* numsegs   */	1,
-				/* maxsegsize*/	ioctl_cmd->datasize,
-				/* flags     */	0,
-				&ioctl_cmd->dmatag) != 0) {
+
+	if (bus_dma_tag_create(	/* parent    */	sc->adapter_dmatag,
+			/* alignment */	1,
+			/* boundary  */	0,
+			/* lowaddr   */	BUS_SPACE_MAXADDR_32BIT,
+			/* highaddr  */	BUS_SPACE_MAXADDR,
+			/* filter    */	NULL,
+			/* filterarg */	NULL,
+			/* maxsize   */	ioctl_cmd->datasize,
+			/* numsegs   */	1,
+			/* maxsegsize*/	ioctl_cmd->datasize,
+			/* flags     */	0,
+			&ioctl_cmd->dmatag) != 0) {
 		return ENOMEM;
         }
 	if(bus_dmamem_alloc(ioctl_cmd->dmatag, &ioctl_cmd->data_buffer, 

==== //depot/projects/trustedbsd/base/sys/dev/musycc/musycc.c#5 (text+ko) ====

@@ -6,7 +6,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  *
- * $FreeBSD: src/sys/dev/musycc/musycc.c,v 1.26 2003/03/18 08:45:21 phk Exp $
+ * $FreeBSD: src/sys/dev/musycc/musycc.c,v 1.27 2003/05/31 20:39:28 phk Exp $
  *
  *
  *
@@ -339,13 +339,11 @@
 static void
 poke_847x(void *dummy)
 {
-	static int count;
 	int i;
 	struct csoftc *csc;
 
 	timeout(poke_847x, NULL, 1);
 	LIST_FOREACH(csc, &sc_list, list)  {
-		count++;
 		i = (csc->creg >> 24 & 0xf);
 		csc->creg &= ~0xf000000;
 		i++;
@@ -814,6 +812,7 @@
 					sc->chan[ch]->short_error++;
 					break;
 				}
+				/* FALLTHROUGH */
 			default:
 				musycc_intr0_tx_eom(sc, ch);
 				musycc_intr0_rx_eom(sc, ch);
@@ -1094,14 +1093,13 @@
 	struct csoftc *csc;
 	struct schan *sch;
 	struct mdesc *md, *md0;
-	u_int32_t ch, u, u0, len;
+	u_int32_t u, u0, len;
 	struct mbuf *m2;
 	struct mbuf *m;
 
 	sch = NG_HOOK_PRIVATE(hook);
 	sc = sch->sc;
 	csc = sc->csc;
-	ch = sch->chan;
 
 	if (csc->state != C_RUNNING) {
 		printf("csc->state = %d\n", csc->state);

==== //depot/projects/trustedbsd/base/sys/dev/pccbb/pccbb.c#25 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.71 2003/05/04 23:58:37 imp Exp $
+ * $FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.72 2003/05/31 20:35:32 phk Exp $
  */
 
 /*
@@ -654,7 +654,6 @@
 	if (sc->irq_res == NULL) {
 		printf("cbb: Unable to map IRQ...\n");
 		goto err;
-		return (ENOMEM);
 	}
 
 	if (bus_setup_intr(brdev, sc->irq_res, INTR_TYPE_AV, cbb_intr, sc,
@@ -1094,7 +1093,6 @@
 		break;
 	default:
 		return (0);			/* power NEVER changed */
-		break;
 	}
 
 	switch (volts & CARD_VPPMASK) {

==== //depot/projects/trustedbsd/base/sys/dev/pci/pci.c#20 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/pci/pci.c,v 1.214 2003/04/16 03:15:08 mdodd Exp $
+ * $FreeBSD: src/sys/dev/pci/pci.c,v 1.215 2003/05/31 20:34:36 phk Exp $
  *
  */
 
@@ -603,7 +603,6 @@
 		break;
 	default:
 		return (EINVAL);
-		break;
 	}
 	pci_set_command_bit(dev, child, bit);
 	command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2);
@@ -634,7 +633,6 @@
 		break;
 	default:
 		return (EINVAL);
-		break;
 	}
 	pci_clear_command_bit(dev, child, bit);
 	command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2);
@@ -899,11 +897,9 @@
 {
 	struct pci_devinfo *dinfo;
 	struct resource_list *rl;
-	pcicfgregs *cfg;
 	int retval = 0;
 
 	dinfo = device_get_ivars(child);
-	cfg = &dinfo->cfg;
 	rl = &dinfo->resources;
 
 	retval += bus_print_child_header(dev, child);
@@ -1220,10 +1216,8 @@

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list