Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2004 15:23:56 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 53256 for review
Message-ID:  <200405222223.i4MMNu8E042706@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=53256

Change 53256 by marcel@marcel_nfs on 2004/05/22 15:23:55

	IFC @53255

Affected files ...

.. //depot/projects/gdb/lib/libc/stdio/fgetwc.c#3 integrate
.. //depot/projects/gdb/lib/libc/stdio/findfp.c#2 integrate
.. //depot/projects/gdb/lib/libc/stdio/fputwc.c#3 integrate
.. //depot/projects/gdb/lib/libc/stdio/freopen.c#2 integrate
.. //depot/projects/gdb/lib/libc/stdio/fseek.c#2 integrate
.. //depot/projects/gdb/lib/libc/stdio/local.h#3 integrate
.. //depot/projects/gdb/lib/libc/stdio/ungetwc.c#3 integrate
.. //depot/projects/gdb/sbin/geom/class/concat/gconcat.8#2 integrate
.. //depot/projects/gdb/sbin/geom/class/nop/gnop.8#2 integrate
.. //depot/projects/gdb/sbin/geom/class/stripe/gstripe.8#2 integrate
.. //depot/projects/gdb/sbin/geom/core/geom.c#2 integrate
.. //depot/projects/gdb/sbin/ggate/ggatel/Makefile#3 integrate
.. //depot/projects/gdb/sys/arm/arm/nexus.c#2 integrate
.. //depot/projects/gdb/sys/dev/acpica/acpivar.h#12 integrate
.. //depot/projects/gdb/sys/dev/firewire/firewire.c#7 integrate
.. //depot/projects/gdb/sys/dev/firewire/firewire.h#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/firewirereg.h#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwcrom.c#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwdev.c#5 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwmem.c#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwmem.h#2 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwohci.c#5 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwohci_pci.c#5 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwohcireg.h#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwohcivar.h#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/fwphyreg.h#2 integrate
.. //depot/projects/gdb/sys/dev/firewire/iec13213.h#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/iec68113.h#2 integrate
.. //depot/projects/gdb/sys/dev/firewire/if_fwe.c#4 integrate
.. //depot/projects/gdb/sys/dev/firewire/sbp.c#3 integrate
.. //depot/projects/gdb/sys/dev/firewire/sbp.h#2 integrate
.. //depot/projects/gdb/sys/dev/firewire/sbp_targ.c#4 integrate
.. //depot/projects/gdb/sys/dev/gx/if_gx.c#4 integrate
.. //depot/projects/gdb/sys/dev/ofw/openfirm.c#2 integrate
.. //depot/projects/gdb/sys/dev/ofw/openfirmio.c#4 integrate
.. //depot/projects/gdb/sys/dev/ofw/openfirmio.h#3 integrate
.. //depot/projects/gdb/sys/dev/usb/ehci_pci.c#3 integrate
.. //depot/projects/gdb/sys/dev/usb/umass.c#4 integrate
.. //depot/projects/gdb/sys/pci/agp.c#7 integrate
.. //depot/projects/gdb/sys/pci/agp_ali.c#3 integrate
.. //depot/projects/gdb/sys/pci/agp_amd.c#4 integrate
.. //depot/projects/gdb/sys/pci/agp_i810.c#5 integrate
.. //depot/projects/gdb/sys/pci/agp_intel.c#5 integrate
.. //depot/projects/gdb/sys/pci/agp_nvidia.c#3 integrate
.. //depot/projects/gdb/sys/pci/agp_sis.c#4 integrate
.. //depot/projects/gdb/sys/pci/agp_via.c#4 integrate
.. //depot/projects/gdb/sys/pci/agppriv.h#2 integrate
.. //depot/projects/gdb/tools/regression/geom_nop/Makefile#1 branch
.. //depot/projects/gdb/tools/regression/geom_nop/runtests.sh#1 branch
.. //depot/projects/gdb/tools/regression/geom_nop/test-1.sh#1 branch
.. //depot/projects/gdb/tools/regression/geom_nop/test-2.sh#1 branch
.. //depot/projects/gdb/tools/regression/geom_stripe/Makefile#1 branch
.. //depot/projects/gdb/tools/regression/geom_stripe/runtests.sh#1 branch
.. //depot/projects/gdb/tools/regression/geom_stripe/test-1.sh#1 branch
.. //depot/projects/gdb/tools/regression/geom_stripe/test-2.sh#1 branch
.. //depot/projects/gdb/usr.bin/ktrdump/ktrdump.8#3 integrate
.. //depot/projects/gdb/usr.bin/ktrdump/ktrdump.c#4 integrate
.. //depot/projects/gdb/usr.bin/tar/bsdtar.c#11 integrate
.. //depot/projects/gdb/usr.sbin/Makefile#7 integrate
.. //depot/projects/gdb/usr.sbin/eeprom/Makefile#1 branch
.. //depot/projects/gdb/usr.sbin/eeprom/eeprom.8#1 branch
.. //depot/projects/gdb/usr.sbin/eeprom/eeprom.c#1 branch
.. //depot/projects/gdb/usr.sbin/eeprom/ofw_options.c#1 branch
.. //depot/projects/gdb/usr.sbin/eeprom/ofw_options.h#1 branch
.. //depot/projects/gdb/usr.sbin/ofwdump/Makefile#3 integrate
.. //depot/projects/gdb/usr.sbin/ofwdump/ofw_util.c#3 integrate
.. //depot/projects/gdb/usr.sbin/ofwdump/ofw_util.h#2 integrate
.. //depot/projects/gdb/usr.sbin/ofwdump/ofwdump.8#3 integrate
.. //depot/projects/gdb/usr.sbin/ofwdump/ofwdump.c#2 integrate

Differences ...

==== //depot/projects/gdb/lib/libc/stdio/fgetwc.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002 Tim J. Robbins.
+ * Copyright (c) 2002-2004 Tim J. Robbins.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/fgetwc.c,v 1.8 2004/04/07 09:55:05 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/fgetwc.c,v 1.10 2004/05/22 15:41:03 tjr Exp $");
 
 #include "namespace.h"
 #include <errno.h>
@@ -77,34 +77,32 @@
 static __inline wint_t
 __fgetwc_nbf(FILE *fp)
 {
-	static const mbstate_t initial;
-	mbstate_t mbs;
-	char buf[MB_LEN_MAX];
-	size_t n, nconv;
-	int c;
 	wchar_t wc;
+	size_t nconv;
 
-	n = 0;
-	while (n < MB_CUR_MAX) {
-		if ((c = __sgetc(fp)) == EOF) {
-			if (n == 0)
-				return (WEOF);
+	if (fp->_r <= 0 && __srefill(fp))
+		return (WEOF);
+	do {
+		nconv = mbrtowc(&wc, fp->_p, fp->_r, &fp->_extra->mbstate);
+		if (nconv == (size_t)-1)
 			break;
+		else if (nconv == (size_t)-2)
+			continue;
+		else if (nconv == 0) {
+			/*
+			 * Assume that the only valid representation of
+			 * the null wide character is a single null byte.
+			 */
+			fp->_p++;
+			fp->_r--;
+			return (L'\0');
+		} else {
+			fp->_p += nconv;
+			fp->_r -= nconv;
+			return (wc);
 		}
-		buf[n++] = (char)c;
-		mbs = initial;
-		nconv = mbrtowc(&wc, buf, n, &mbs);
-		if (nconv == n)
-			return (wc);
-		else if (nconv == 0)
-			return (L'\0');
-		else if (nconv == (size_t)-1)
-			break;
-	}
-
-	while (n-- != 0)
-		__ungetc((unsigned char)buf[n], fp);
+	} while (__srefill(fp) == 0);
+	fp->_flags |= __SERR;
 	errno = EILSEQ;
-	fp->_flags |= __SERR;
 	return (WEOF);
 }

==== //depot/projects/gdb/lib/libc/stdio/findfp.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)findfp.c	8.2 (Berkeley) 1/4/94";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/findfp.c,v 1.28 2002/11/14 14:06:14 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/findfp.c,v 1.29 2004/05/22 15:19:41 tjr Exp $");
 
 #include <sys/param.h>
 #include <machine/atomic.h>
@@ -180,11 +180,7 @@
 	fp->_lb._size = 0;
 /*	fp->_lock = NULL; */	/* once set always set (reused) */
 	fp->_extra->orientation = 0;
-#ifdef notdef
-	/* Stateful encoding/decoding is not yet supported. */
-	memset(&fp->_extra->wstate, 0, sizeof(mbstate_t));
-	memset(&fp->_extra->rstate, 0, sizeof(mbstate_t));
-#endif
+	memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));
 	return (fp);
 }
 

==== //depot/projects/gdb/lib/libc/stdio/fputwc.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002 Tim J. Robbins.
+ * Copyright (c) 2002-2004 Tim J. Robbins.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/fputwc.c,v 1.8 2004/04/07 09:55:05 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/fputwc.c,v 1.9 2004/05/22 15:19:41 tjr Exp $");
 
 #include "namespace.h"
 #include <errno.h>
@@ -43,8 +43,6 @@
 wint_t
 __fputwc(wchar_t wc, FILE *fp)
 {
-	static const mbstate_t initial;
-	mbstate_t mbs;
 	char buf[MB_LEN_MAX];
 	size_t i, len;
 
@@ -57,8 +55,8 @@
 		*buf = (unsigned char)wc;
 		len = 1;
 	} else {
-		mbs = initial;
-		if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) {
+		if ((len = wcrtomb(buf, wc, &fp->_extra->mbstate)) ==
+		    (size_t)-1) {
 			fp->_flags |= __SERR;
 			return (WEOF);
 		}

==== //depot/projects/gdb/lib/libc/stdio/freopen.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)freopen.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/freopen.c,v 1.12 2003/01/26 11:45:54 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/freopen.c,v 1.13 2004/05/22 15:19:41 tjr Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -188,6 +188,7 @@
 		FREELB(fp);
 	fp->_lb._size = 0;
 	fp->_extra->orientation = 0;
+	memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));
 
 	if (f < 0) {			/* did not get it after all */
 		fp->_flags = 0;		/* set it free */

==== //depot/projects/gdb/lib/libc/stdio/fseek.c#2 (text+ko) ====

@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)fseek.c	8.3 (Berkeley) 1/2/94";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/fseek.c,v 1.40 2002/03/22 21:53:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/fseek.c,v 1.41 2004/05/22 15:19:41 tjr Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -259,6 +259,7 @@
 		if (HASUB(fp))
 			FREEUB(fp);
 		fp->_flags &= ~__SEOF;
+		memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));
 		return (0);
 	}
 
@@ -303,6 +304,7 @@
 	fp->_r = 0;
 	/* fp->_w = 0; */	/* unnecessary (I think...) */
 	fp->_flags &= ~__SEOF;
+	memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));
 	if (ltest && ret > LONG_MAX) {
 		fp->_flags |= __SERR;
 		errno = EOVERFLOW;

==== //depot/projects/gdb/lib/libc/stdio/local.h#3 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)local.h	8.3 (Berkeley) 7/3/94
- * $FreeBSD: src/lib/libc/stdio/local.h,v 1.23 2004/03/09 04:51:58 jb Exp $
+ * $FreeBSD: src/lib/libc/stdio/local.h,v 1.24 2004/05/22 15:19:41 tjr Exp $
  */
 
 #include <sys/types.h>	/* for off_t */
@@ -89,15 +89,7 @@
 	pthread_t	fl_owner;	/* current owner */
 	int		fl_count;	/* recursive lock count */
 	int		orientation;	/* orientation for fwide() */
-#ifdef notdef
-	/*
-	 * XXX These are not used yet -- they will be used to store the
-	 * multibyte conversion state for writing and reading when
-	 * stateful encodings are supported by the locale framework.
-	 */
-	mbstate_t	wstate;		/* write conversion state */
-	mbstate_t	rstate;		/* read conversion state */
-#endif
+	mbstate_t	mbstate;	/* multibyte conversion state */
 };
 
 /*
@@ -134,8 +126,7 @@
 	(fp)->_extra->fl_owner = NULL; \
 	(fp)->_extra->fl_count = 0; \
 	(fp)->_extra->orientation = 0; \
-	/* memset(&(fp)->_extra->wstate, 0, sizeof(mbstate_t)); */ \
-	/* memset(&(fp)->_extra->rstate, 0, sizeof(mbstate_t)); */ \
+	memset(&(fp)->_extra->mbstate, 0, sizeof(mbstate_t)); \
 }
 
 /*

==== //depot/projects/gdb/lib/libc/stdio/ungetwc.c#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2002 Tim J. Robbins.
+ * Copyright (c) 2002-2004 Tim J. Robbins.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/ungetwc.c,v 1.7 2004/04/07 09:55:05 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/ungetwc.c,v 1.8 2004/05/22 15:19:41 tjr Exp $");
 
 #include "namespace.h"
 #include <errno.h>
@@ -42,15 +42,12 @@
 wint_t
 __ungetwc(wint_t wc, FILE *fp)
 {
-	static const mbstate_t initial;
-	mbstate_t mbs;
 	char buf[MB_LEN_MAX];
 	size_t len;
 
 	if (wc == WEOF)
 		return (WEOF);
-	mbs = initial;
-	if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) {
+	if ((len = wcrtomb(buf, wc, &fp->_extra->mbstate)) == (size_t)-1) {
 		fp->_flags |= __SERR;
 		return (WEOF);
 	}

==== //depot/projects/gdb/sbin/geom/class/concat/gconcat.8#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/geom/class/concat/gconcat.8,v 1.2 2004/05/21 22:18:04 pjd Exp $
+.\" $FreeBSD: src/sbin/geom/class/concat/gconcat.8,v 1.3 2004/05/22 16:17:57 pjd Exp $
 .\"
 .Dd May 21, 2004
 .Dt GCONCAT 8
@@ -57,6 +57,7 @@
 .Op Ar dev2 Op Ar ...
 .Nm
 .Cm list
+.Op Ar prov Op Ar ...
 .Nm
 .Cm load
 .Op Fl v
@@ -109,7 +110,7 @@
 .It Cm clear
 Clear metadata on the given devices.
 .It Cm list
-List currently configured devices.
+List all or the given currently configured devices.
 .It Cm load
 Load
 .Pa geom_concat.ko

==== //depot/projects/gdb/sbin/geom/class/nop/gnop.8#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/geom/class/nop/gnop.8,v 1.2 2004/05/21 22:18:05 pjd Exp $
+.\" $FreeBSD: src/sbin/geom/class/nop/gnop.8,v 1.4 2004/05/22 16:17:57 pjd Exp $
 .\"
 .Dd May 21, 2004
 .Dt GNOP 8
@@ -41,15 +41,16 @@
 .Cm configure
 .Op Fl v
 .Op Fl f Ar failprob
-.Ar dev1
-.Op Ar dev2 Op Ar ...
+.Ar prov1
+.Op Ar prov2 Op Ar ...
 .Nm
 .Cm destroy
 .Op Fl fv
-.Ar dev1
-.Op Ar dev2 Op Ar ...
+.Ar prov1
+.Op Ar prov2 Op Ar ...
 .Nm
 .Cm list
+.Op Ar prov Op Ar ...
 .Nm
 .Cm load
 .Op Fl v
@@ -82,9 +83,9 @@
 .Pa geom_nop.ko
 will be loaded if it is not loaded already.
 .It Cm destroy
-Turn off transparent providers for the given devices.
+Turn off the given transparent providers.
 .It Cm list
-List currently configured providers.
+List all or the given currently configured providers.
 .It Cm load
 Load
 .Pa geom_nop.ko
@@ -107,9 +108,10 @@
 .Sh EXAMPLES
 The following example shows how to create transparent provider for disk
 .Pa /dev/da0
-with 50% failure probability.
+with 50% failure probability and destroy it.
 .Bd -literal -offset indent
-gnop create -v -f 50 /dev/da0
+gnop create -v -f 50 da0
+gnop destroy -v da0.nop
 .Ed
 .Sh DIAGNOSTICS
 Exit status is 0 on success, and 1 if the command fails.

==== //depot/projects/gdb/sbin/geom/class/stripe/gstripe.8#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/geom/class/stripe/gstripe.8,v 1.3 2004/05/21 22:35:18 pjd Exp $
+.\" $FreeBSD: src/sbin/geom/class/stripe/gstripe.8,v 1.4 2004/05/22 16:17:57 pjd Exp $
 .\"
 .Dd May 21, 2004
 .Dt GSTRIPE 8
@@ -59,6 +59,7 @@
 .Op Ar dev2 Op Ar ...
 .Nm
 .Cm list
+.Op Ar prov Op Ar ...
 .Nm
 .Cm load
 .Op Fl v
@@ -111,7 +112,7 @@
 .It Cm clear
 Clear metadata on the given devices.
 .It Cm list
-List currently configured devices.
+List all or the given currently configured devices.
 .It Cm load
 Load
 .Pa geom_stripe.ko

==== //depot/projects/gdb/sbin/geom/core/geom.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/geom/core/geom.c,v 1.1 2004/05/20 10:09:55 pjd Exp $");
+__FBSDID("$FreeBSD: src/sbin/geom/core/geom.c,v 1.2 2004/05/22 16:57:39 pjd Exp $");
 
 #include <sys/param.h>
 #include <sys/linker.h>
@@ -60,11 +60,13 @@
 static struct g_command *find_command(const char *cmdstr, int all);
 static int std_available(const char *name);
 
+static void std_help(struct gctl_req *req, unsigned flags);
 static void std_list(struct gctl_req *req, unsigned flags);
 static void std_load(struct gctl_req *req, unsigned flags);
 static void std_unload(struct gctl_req *req, unsigned flags);
 
 struct g_command std_commands[] = {
+	{ "help", 0, std_help, G_NULL_OPTS },
 	{ "list", 0, std_list, G_NULL_OPTS },
 	{ "load", G_FLAG_VERBOSE | G_FLAG_LOADKLD, std_load, G_NULL_OPTS },
 	{ "unload", G_FLAG_VERBOSE, std_unload, G_NULL_OPTS },
@@ -110,8 +112,8 @@
 {
 
 	if (class_name == NULL) {
-		errx(EXIT_FAILURE, "usage: %s <class name> <command> "
-		    "[options]", "geom");
+		errx(EXIT_FAILURE, "usage: %s <class> <command> [options]",
+		    "geom");
 	} else {
 		const char *prefix;
 		unsigned i;
@@ -597,6 +599,13 @@
 	printf("\n");
 }
 
+static void
+std_help(struct gctl_req *req __unused, unsigned flags __unused)
+{
+
+	geom_usage();
+}
+
 static int
 std_list_available(void)
 {
@@ -743,7 +752,9 @@
 std_available(const char *name)
 {
 
-	if (strcmp(name, "list") == 0)
+	if (strcmp(name, "help") == 0)
+		return (1);
+	else if (strcmp(name, "list") == 0)
 		return (std_list_available());
 	else if (strcmp(name, "load") == 0)
 		return (std_load_available());

==== //depot/projects/gdb/sbin/ggate/ggatel/Makefile#3 (text+ko) ====

@@ -1,15 +1,15 @@
-# $FreeBSD: src/sbin/ggate/ggatel/Makefile,v 1.2 2004/05/03 07:21:59 pjd Exp $
+# $FreeBSD: src/sbin/ggate/ggatel/Makefile,v 1.3 2004/05/22 10:33:18 pjd Exp $
 
-.PATH:	${.CURDIR}/../shared
+.PATH: ${.CURDIR}/../shared
 
-BINDIR=	/sbin
 PROG=	ggatel
+MAN=	ggatel.8
 SRCS=	ggatel.c ggate.c
-MAN=	ggatel.8
+
+CFLAGS+= -DLIBGEOM
+CFLAGS+= -I${.CURDIR}/../shared
+
 DPADD=	${LIBGEOM} ${LIBSBUF} ${LIBBSDXML}
 LDADD=	-lgeom -lsbuf -lbsdxml
-WARNS=	6
-CFLAGS+=-I${.CURDIR}/../shared
-CFLAGS+=-DLIBGEOM
 
 .include <bsd.prog.mk>

==== //depot/projects/gdb/sys/arm/arm/nexus.c#2 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.1 2004/05/14 11:46:42 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.2 2004/05/22 13:15:14 mux Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -135,10 +135,8 @@
 	/*
 	 * First, deal with the children we know about already
 	 */
-	printf("avant\n");
 	bus_generic_probe(dev);
 	bus_generic_attach(dev);
-	printf("nexus_attach\n");
 	
 	return 0;
 }

==== //depot/projects/gdb/sys/dev/acpica/acpivar.h#12 (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/acpica/acpivar.h,v 1.65 2004/05/18 16:53:29 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.66 2004/05/22 17:19:59 njl Exp $
  */
 
 #include "bus_if.h"
@@ -139,9 +139,62 @@
 #define ACPI_IVAR_MAGIC		0x101
 #define ACPI_IVAR_PRIVATE	0x102
 
-__BUS_ACCESSOR(acpi, handle, ACPI, HANDLE, ACPI_HANDLE);
-__BUS_ACCESSOR(acpi, magic, ACPI, MAGIC, int);
-__BUS_ACCESSOR(acpi, private, ACPI, PRIVATE, void *);
+static __inline ACPI_HANDLE
+acpi_get_handle(device_t dev)
+{
+    uintptr_t up;
+
+    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, &up))
+	return (NULL);
+    return ((ACPI_HANDLE)up);
+}
+
+static __inline int
+acpi_set_handle(device_t dev, ACPI_HANDLE h)
+{
+    uintptr_t up;
+
+    up = (uintptr_t)h;
+    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, up));
+}
+
+static __inline int
+acpi_get_magic(device_t dev)
+{
+    uintptr_t up;
+
+    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, &up))
+	return(0);
+    return ((int)up);
+}
+
+static __inline int
+acpi_set_magic(device_t dev, int m)
+{
+    uintptr_t up;
+
+    up = (uintptr_t)m;
+    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, up));
+}
+
+static __inline void *
+acpi_get_private(device_t dev)
+{
+    uintptr_t up;
+
+    if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, &up))
+	return (NULL);
+    return ((void *)up);
+}
+
+static __inline int
+acpi_set_private(device_t dev, void *p)
+{
+    uintptr_t up;
+
+    up = (uintptr_t)p;
+    return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, up));
+}
 
 static __inline ACPI_OBJECT_TYPE
 acpi_get_type(device_t dev)

==== //depot/projects/gdb/sys/dev/firewire/firewire.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.73 2004/05/21 09:12:06 dfr Exp $
+ * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.74 2004/05/22 16:14:17 dfr Exp $
  *
  */
 
@@ -108,8 +108,8 @@
 #ifdef FW_VMACCESS
 static void fw_vmaccess (struct fw_xfer *);
 #endif
-struct fw_xfer *asyreqq (struct firewire_comm *, u_int8_t, u_int8_t, u_int8_t,
-	u_int32_t, u_int32_t, void (*)(struct fw_xfer *));
+struct fw_xfer *asyreqq (struct firewire_comm *, uint8_t, uint8_t, uint8_t,
+	uint32_t, uint32_t, void (*)(struct fw_xfer *));
 static int fw_bmr (struct firewire_comm *);
 
 static device_method_t firewire_methods[] = {
@@ -686,14 +686,14 @@
 
 	newrom = malloc(CROMSIZE, M_FW, M_NOWAIT | M_ZERO);
 	src = &fc->crom_src_buf->src;
-	crom_load(src, (u_int32_t *)newrom, CROMSIZE);
+	crom_load(src, (uint32_t *)newrom, CROMSIZE);
 	if (bcmp(newrom, fc->config_rom, CROMSIZE) != 0) {
 		/* bump generation and reload */
 		src->businfo.generation ++;
 		/* generation must be between 0x2 and 0xF */
 		if (src->businfo.generation < 2)
 			src->businfo.generation ++;
-		crom_load(src, (u_int32_t *)newrom, CROMSIZE);
+		crom_load(src, (uint32_t *)newrom, CROMSIZE);
 		bcopy(newrom, (void *)fc->config_rom, CROMSIZE);
 	}
 	free(newrom, M_FW);
@@ -831,7 +831,7 @@
  * To lookup bound process from IEEE1394 address.
  */
 struct fw_bind *
-fw_bindlookup(struct firewire_comm *fc, u_int16_t dest_hi, u_int32_t dest_lo)
+fw_bindlookup(struct firewire_comm *fc, uint16_t dest_hi, uint32_t dest_lo)
 {
 	u_int64_t addr;
 	struct fw_bind *tfw;
@@ -1135,7 +1135,7 @@
  * Dump self ID. 
  */
 static void
-fw_print_sid(u_int32_t sid)
+fw_print_sid(uint32_t sid)
 {
 	union fw_self_id *s;
 	s = (union fw_self_id *) &sid;
@@ -1151,16 +1151,16 @@
 /*
  * To receive self ID. 
  */
-void fw_sidrcv(struct firewire_comm* fc, u_int32_t *sid, u_int len)
+void fw_sidrcv(struct firewire_comm* fc, uint32_t *sid, u_int len)
 {
-	u_int32_t *p;
+	uint32_t *p;
 	union fw_self_id *self_id;
 	u_int i, j, node, c_port = 0, i_branch = 0;
 
-	fc->sid_cnt = len /(sizeof(u_int32_t) * 2);
+	fc->sid_cnt = len /(sizeof(uint32_t) * 2);
 	fc->status = FWBUSINIT;
 	fc->max_node = fc->nodeid & 0x3f;
-	CSRARC(fc, NODE_IDS) = ((u_int32_t)fc->nodeid) << 16;
+	CSRARC(fc, NODE_IDS) = ((uint32_t)fc->nodeid) << 16;
 	fc->status = FWBUSCYMELECT;
 	fc->topology_map->crc_len = 2;
 	fc->topology_map->generation ++;
@@ -1220,19 +1220,19 @@
 	device_printf(fc->bdev, "%d nodes", fc->max_node + 1);
 	/* CRC */
 	fc->topology_map->crc = fw_crc16(
-			(u_int32_t *)&fc->topology_map->generation,
+			(uint32_t *)&fc->topology_map->generation,
 			fc->topology_map->crc_len * 4);
 	fc->speed_map->crc = fw_crc16(
-			(u_int32_t *)&fc->speed_map->generation,
+			(uint32_t *)&fc->speed_map->generation,
 			fc->speed_map->crc_len * 4);
 	/* byteswap and copy to CSR */
-	p = (u_int32_t *)fc->topology_map;
+	p = (uint32_t *)fc->topology_map;
 	for (i = 0; i <= fc->topology_map->crc_len; i++)
 		CSRARC(fc, TOPO_MAP + i * 4) = htonl(*p++);
-	p = (u_int32_t *)fc->speed_map;
+	p = (uint32_t *)fc->speed_map;
 	CSRARC(fc, SPED_MAP) = htonl(*p++);
 	CSRARC(fc, SPED_MAP + 4) = htonl(*p++);
-	/* don't byte-swap u_int8_t array */
+	/* don't byte-swap uint8_t array */
 	bcopy(p, &CSRARC(fc, SPED_MAP + 8), (fc->speed_map->crc_len - 1)*4);
 
 	fc->max_hop = fc->max_node - i_branch;
@@ -1319,7 +1319,7 @@
 {
 	int err = 0;
 	struct fw_device *fwdev, *pfwdev, *tfwdev;
-	u_int32_t addr;
+	uint32_t addr;
 	struct fw_xfer *xfer;
 	struct fw_pkt *fp;
 
@@ -1442,8 +1442,8 @@
 
 /* Portable Async. request read quad */
 struct fw_xfer *
-asyreqq(struct firewire_comm *fc, u_int8_t spd, u_int8_t tl, u_int8_t rt,
-	u_int32_t addr_hi, u_int32_t addr_lo,
+asyreqq(struct firewire_comm *fc, uint8_t spd, uint8_t tl, uint8_t rt,
+	uint32_t addr_hi, uint32_t addr_lo,
 	void (*hand) (struct fw_xfer*))
 {
 	struct fw_xfer *xfer;
@@ -1489,7 +1489,7 @@
 	struct csrhdr *chdr;
 	struct csrdir *csrd;
 	struct csrreg *csrreg;
-	u_int32_t offset;
+	uint32_t offset;
 
 	
 	if(xfer == NULL) {
@@ -1517,9 +1517,9 @@
 	rfp = &xfer->recv.hdr;
 #if 0
 	{
-		u_int32_t *qld;
+		uint32_t *qld;
 		int i;
-		qld = (u_int32_t *)xfer->recv.buf;
+		qld = (uint32_t *)xfer->recv.buf;
 		printf("len:%d\n", xfer->recv.len);
 		for( i = 0 ; i <= xfer->recv.len && i < 32; i+= 4){
 			printf("0x%08x ", rfp->mode.ld[i/4]);
@@ -1710,7 +1710,7 @@
 	u_int i;
 	struct tlabel *tl, *tmptl;
 	int s;
-	static u_int32_t label = 0;
+	static uint32_t label = 0;
 
 	s = splfw();
 	for( i = 0 ; i < 0x40 ; i ++){
@@ -1767,9 +1767,9 @@
 
 	/* special handling for RRESQ */
 	if (pkt->mode.hdr.tcode == FWTCODE_RRESQ &&
-	    p != NULL && res >= sizeof(u_int32_t)) {
-		*(u_int32_t *)p = pkt->mode.rresq.data;
-		rb->xfer->recv.pay_len = sizeof(u_int32_t);
+	    p != NULL && res >= sizeof(uint32_t)) {
+		*(uint32_t *)p = pkt->mode.rresq.data;
+		rb->xfer->recv.pay_len = sizeof(uint32_t);
 		return;
 	}
 
@@ -1808,9 +1808,9 @@
 	int i, len, oldstate;
 #if 0
 	{
-		u_int32_t *qld;
+		uint32_t *qld;
 		int i;
-		qld = (u_int32_t *)buf;
+		qld = (uint32_t *)buf;
 		printf("spd %d len:%d\n", spd, len);
 		for( i = 0 ; i <= len && i < 32; i+= 4){
 			printf("0x%08x ", ntohl(qld[i/4]));
@@ -2108,7 +2108,7 @@
 static void
 fw_vmaccess(struct fw_xfer *xfer){
 	struct fw_pkt *rfp, *sfp = NULL;
-	u_int32_t *ld = (u_int32_t *)xfer->recv.buf;
+	uint32_t *ld = (uint32_t *)xfer->recv.buf;
 
 	printf("vmaccess spd:%2x len:%03x data:%08x %08x %08x %08x\n",
 			xfer->spd, xfer->recv.len, ntohl(ld[0]), ntohl(ld[1]), ntohl(ld[2]), ntohl(ld[3]));
@@ -2137,7 +2137,7 @@
 			xfer->send.buf = malloc(12, M_FW, M_NOWAIT);
 			xfer->send.len = 12;
 			sfp->mode.wres.tcode = FWTCODE_WRES;
-			*((u_int32_t *)(ntohl(rfp->mode.wreqb.dest_lo))) = rfp->mode.wreqq.data;
+			*((uint32_t *)(ntohl(rfp->mode.wreqb.dest_lo))) = rfp->mode.wreqq.data;
 			sfp->mode.wres.rtcode = 0;
 			break;
 		case FWTCODE_RREQB:
@@ -2145,7 +2145,7 @@
 			xfer->send.len = 16 + ntohs(rfp->mode.rreqb.len);
 			sfp = (struct fw_pkt *)xfer->send.buf;
 			bcopy((caddr_t)ntohl(rfp->mode.rreqb.dest_lo),
-				sfp->mode.rresb.payload, (u_int16_t)ntohs(rfp->mode.rreqb.len));
+				sfp->mode.rresb.payload, (uint16_t)ntohs(rfp->mode.rreqb.len));
 			sfp->mode.rresb.tcode = FWTCODE_RRESB;
 			sfp->mode.rresb.len = rfp->mode.rreqb.len;
 			sfp->mode.rresb.rtcode = 0;
@@ -2155,7 +2155,7 @@
 			xfer->send.buf = malloc(16, M_FW, M_NOWAIT);
 			xfer->send.len = 16;
 			sfp = (struct fw_pkt *)xfer->send.buf;
-			sfp->mode.rresq.data = *(u_int32_t *)(ntohl(rfp->mode.rreqq.dest_lo));
+			sfp->mode.rresq.data = *(uint32_t *)(ntohl(rfp->mode.rreqq.dest_lo));
 			sfp->mode.wres.tcode = FWTCODE_RRESQ;
 			sfp->mode.rresb.rtcode = 0;
 			break;
@@ -2180,9 +2180,9 @@
 /*
  * CRC16 check-sum for IEEE1394 register blocks.
  */
-u_int16_t
-fw_crc16(u_int32_t *ptr, u_int32_t len){
-	u_int32_t i, sum, crc = 0;
+uint16_t
+fw_crc16(uint32_t *ptr, uint32_t len){
+	uint32_t i, sum, crc = 0;
 	int shift;
 	len = (len + 3) & ~3;
 	for(i = 0 ; i < len ; i+= 4){
@@ -2192,7 +2192,7 @@
 		}
 		crc &= 0xffff;
 	}
-	return((u_int16_t) crc);
+	return((uint16_t) crc);
 }
 
 static int
@@ -2201,7 +2201,7 @@
 	struct fw_device fwdev;
 	union fw_self_id *self_id;
 	int cmstr;
-	u_int32_t quad;
+	uint32_t quad;
 
 	/* Check to see if the current root node is cycle master capable */
 	self_id = fw_find_self_id(fc, fc->max_node);

==== //depot/projects/gdb/sys/dev/firewire/firewire.h#3 (text+ko) ====

@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/firewire.h,v 1.18 2004/03/26 23:17:10 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/firewire.h,v 1.19 2004/05/22 16:14:17 dfr Exp $
  *
  */
 
@@ -55,8 +55,8 @@
 };
 
 struct fw_addr {
-	unsigned long hi;
-	unsigned long lo;
+	uint32_t hi;
+	uint32_t lo;
 };
 
 struct fw_asybindreq {
@@ -65,8 +65,8 @@
 };
 
 struct fw_reg_req_t {
-	unsigned long addr;
-	unsigned long data;
+	uint32_t addr;
+	uint32_t data;
 };
 
 #define MAXREC(x)	(2 << (x))
@@ -106,39 +106,39 @@
 #define	FWP_TL_VALID (1 << 7)
 
 struct fw_isohdr {
-	u_int32_t hdr[1];
+	uint32_t hdr[1];
 };
 
 struct fw_asyhdr {
-	u_int32_t hdr[4];
+	uint32_t hdr[4];
 };
 
 #if BYTE_ORDER == BIG_ENDIAN
-#define BIT4x2(x,y)	 u_int8_t  x:4, y:4
-#define BIT16x2(x,y)	u_int32_t x:16, y:16
+#define BIT4x2(x,y)	 uint8_t  x:4, y:4
+#define BIT16x2(x,y)	uint32_t x:16, y:16
 #else
-#define BIT4x2(x,y)	 u_int8_t  y:4, x:4
-#define BIT16x2(x,y)	u_int32_t y:16, x:16
+#define BIT4x2(x,y)	 uint8_t  y:4, x:4
+#define BIT16x2(x,y)	uint32_t y:16, x:16
 #endif
 
 
 #if BYTE_ORDER == BIG_ENDIAN
-#define COMMON_HDR(a,b,c,d)	u_int32_t a:16,b:8,c:4,d:4
-#define COMMON_RES(a,b,c,d)	u_int32_t a:16,b:4,c:4,d:8
+#define COMMON_HDR(a,b,c,d)	uint32_t a:16,b:8,c:4,d:4
+#define COMMON_RES(a,b,c,d)	uint32_t a:16,b:4,c:4,d:8
 #else
-#define COMMON_HDR(a,b,c,d)	u_int32_t d:4,c:4,b:8,a:16
-#define COMMON_RES(a,b,c,d)	u_int32_t d:8,c:4,b:4,a:16
+#define COMMON_HDR(a,b,c,d)	uint32_t d:4,c:4,b:8,a:16
+#define COMMON_RES(a,b,c,d)	uint32_t d:8,c:4,b:4,a:16
 #endif
 
 struct fw_pkt {
 	union {
-		u_int32_t ld[0];
+		uint32_t ld[0];
 		struct {
 			COMMON_HDR(, , tcode, );
 		} common;
 		struct {
 			COMMON_HDR(len, chtag, tcode, sy);
-			u_int32_t payload[0];
+			uint32_t payload[0];
 		} stream;
 		struct {
 			COMMON_HDR(dst, tlrt, tcode, pri);
@@ -147,64 +147,64 @@
 		struct {
 			COMMON_HDR(dst, tlrt, tcode, pri);
 			BIT16x2(src, dest_hi);
-			u_int32_t dest_lo;
+			uint32_t dest_lo;
 		} rreqq;
 		struct {
 			COMMON_HDR(dst, tlrt, tcode, pri);
 			COMMON_RES(src, rtcode, , );
-			u_int32_t :32;
+			uint32_t :32;
 		} wres;
 		struct {
 			COMMON_HDR(dst, tlrt, tcode, pri);
 			BIT16x2(src, dest_hi);
-			u_int32_t dest_lo;
+			uint32_t dest_lo;
 			BIT16x2(len, extcode);
 		} rreqb;
 		struct {
 			COMMON_HDR(dst, tlrt, tcode, pri);
 			BIT16x2(src, dest_hi);

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405222223.i4MMNu8E042706>