Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2005 19:44:37 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 82975 for review
Message-ID:  <200509011944.j81Jibm2052016@repoman.freebsd.org>

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

Change 82975 by peter@peter_daintree on 2005/09/01 19:43:55

	IFC @82973

Affected files ...

.. //depot/projects/hammer/gnu/usr.bin/man/apropos/apropos.man#4 integrate
.. //depot/projects/hammer/include/pthread.h#11 integrate
.. //depot/projects/hammer/lib/libpthread/thread/thr_pspinlock.c#3 integrate
.. //depot/projects/hammer/lib/libpthread/thread/thr_sem.c#6 integrate
.. //depot/projects/hammer/lib/libpthread/thread/thr_sigsuspend.c#13 integrate
.. //depot/projects/hammer/lib/libpthread/thread/thr_symbols.c#2 integrate
.. //depot/projects/hammer/lib/libthr/thread/thr_create.c#17 integrate
.. //depot/projects/hammer/lib/libthr/thread/thr_sem.c#4 integrate
.. //depot/projects/hammer/lib/libthr/thread/thr_symbols.c#3 integrate
.. //depot/projects/hammer/sbin/gpt/Makefile#6 integrate
.. //depot/projects/hammer/sbin/gpt/add.c#10 integrate
.. //depot/projects/hammer/sbin/gpt/gpt.8#11 integrate
.. //depot/projects/hammer/sbin/gpt/gpt.c#9 integrate
.. //depot/projects/hammer/sbin/gpt/gpt.h#8 integrate
.. //depot/projects/hammer/sbin/gpt/label.c#1 branch
.. //depot/projects/hammer/sbin/gpt/migrate.c#11 integrate
.. //depot/projects/hammer/sbin/gpt/remove.c#5 integrate
.. //depot/projects/hammer/share/man/man9/bus_dma.9#19 integrate
.. //depot/projects/hammer/sys/dev/pci/pci.c#43 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_clntout.c#3 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_cout.c#4 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_hout.c#3 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_main.c#8 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_parse.h#2 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_sample.c#2 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_scan.h#2 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_svcout.c#4 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_tblout.c#5 integrate
.. //depot/projects/hammer/usr.bin/rpcgen/rpc_util.h#3 integrate

Differences ...

==== //depot/projects/hammer/gnu/usr.bin/man/apropos/apropos.man#4 (text+ko) ====

@@ -12,7 +12,7 @@
 .\" The University of Texas at Austin
 .\" Austin, Texas  78712
 .\"
-.\" $FreeBSD: src/gnu/usr.bin/man/apropos/apropos.man,v 1.13 2005/01/17 07:44:05 ru Exp $
+.\" $FreeBSD: src/gnu/usr.bin/man/apropos/apropos.man,v 1.14 2005/09/01 01:00:55 garys Exp $
 .Dd January 15, 1991
 .Dt APROPOS 1
 .Os
@@ -37,6 +37,19 @@
 really is an extended regular expression, please read
 .Xr grep 1
 manual page for more information about its format.
+.Sh ENVIRONMENT
+.Bl -tag -width ".Ev PAGER"
+.It Ev PATH , MANPATH , MANLOCALES
+Used in finding the
+.Nm whatis
+database files.
+See
+.Xr manpath 1 .
+.It Ev PAGER
+Command used to page the output.
+The default is
+.Ic more -s .
+.El
 .Sh EXIT STATUS
 The
 .Nm

==== //depot/projects/hammer/include/pthread.h#11 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/include/pthread.h,v 1.38 2005/08/19 21:31:41 stefanf Exp $
+ * $FreeBSD: src/include/pthread.h,v 1.39 2005/09/01 15:33:22 stefanf Exp $
  */
 #ifndef _PTHREAD_H_
 #define _PTHREAD_H_
@@ -39,20 +39,20 @@
  * Header files.
  */
 #include <sys/cdefs.h>
-#include <sys/types.h>
 #include <sys/_pthreadtypes.h>
-#include <sys/time.h>
-#include <sys/signal.h>
-#include <limits.h>
+#include <machine/_limits.h>
+#include <machine/_types.h>
+#include <sys/_sigset.h>
 #include <sched.h>
+#include <time.h>
 
 /*
  * Run-time invariant values:
  */
 #define PTHREAD_DESTRUCTOR_ITERATIONS		4
 #define PTHREAD_KEYS_MAX			256
-#define PTHREAD_STACK_MIN			MINSIGSTKSZ
-#define PTHREAD_THREADS_MAX			ULONG_MAX
+#define PTHREAD_STACK_MIN			__MINSIGSTKSZ
+#define PTHREAD_THREADS_MAX			__ULONG_MAX
 #define PTHREAD_BARRIER_SERIAL_THREAD		-1
 
 /*
@@ -220,7 +220,7 @@
 int		pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
 pthread_t	pthread_self(void);
 int		pthread_setspecific(pthread_key_t, const void *);
-int		pthread_sigmask(int, const sigset_t *, sigset_t *);
+int		pthread_sigmask(int, const __sigset_t *, __sigset_t *);
 
 int		pthread_spin_init(pthread_spinlock_t *, int);
 int		pthread_spin_destroy(pthread_spinlock_t *);

==== //depot/projects/hammer/lib/libpthread/thread/thr_pspinlock.c#3 (text+ko) ====

@@ -23,13 +23,16 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/thread/thr_pspinlock.c,v 1.2 2003/11/04 19:56:12 deischen Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_pspinlock.c,v 1.3 2005/09/01 15:16:46 stefanf Exp $
  */
 
+#include <sys/types.h>
 #include <errno.h>
+#include <pthread.h>
+#include <stdint.h>
 #include <stdlib.h>
-#include <pthread.h>
-#include <atomic_ops.h>
+
+#include "atomic_ops.h"
 #include "thr_private.h"
 
 #define SPIN_COUNT 10000

==== //depot/projects/hammer/lib/libpthread/thread/thr_sem.c#6 (text+ko) ====

@@ -26,10 +26,11 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/thread/thr_sem.c,v 1.16 2004/12/18 18:07:37 deischen Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_sem.c,v 1.17 2005/09/01 15:16:46 stefanf Exp $
  */
 
 #include "namespace.h"
+#include <sys/types.h>
 #include <sys/queue.h>
 #include <errno.h>
 #include <fcntl.h>

==== //depot/projects/hammer/lib/libpthread/thread/thr_sigsuspend.c#13 (text+ko) ====

@@ -29,13 +29,16 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/thread/thr_sigsuspend.c,v 1.26 2004/12/19 23:23:43 deischen Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_sigsuspend.c,v 1.27 2005/09/01 15:16:46 stefanf Exp $
  */
-#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/signalvar.h>
 #include <errno.h>
 #include <pthread.h>
+#include <signal.h>
 #include <string.h>
-#include <sys/signalvar.h>
+
 #include "thr_private.h"
 
 __weak_reference(__sigsuspend, sigsuspend);

==== //depot/projects/hammer/lib/libpthread/thread/thr_symbols.c#2 (text+ko) ====

@@ -29,9 +29,10 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libpthread/thread/thr_symbols.c,v 1.1 2004/08/16 03:25:07 davidxu Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_symbols.c,v 1.2 2005/09/01 15:16:46 stefanf Exp $
  */
 
+#include <sys/types.h>
 #include <stddef.h>
 #include <pthread.h>
 #include <rtld.h>

==== //depot/projects/hammer/lib/libthr/thread/thr_create.c#17 (text+ko) ====

@@ -30,15 +30,16 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.22 2005/04/23 02:48:59 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.23 2005/09/01 15:21:23 stefanf Exp $
  */
 
+#include <sys/types.h>
+#include <sys/signalvar.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stddef.h>
 #include <pthread.h>
-#include <sys/signalvar.h>
 
 #include "thr_private.h"
 

==== //depot/projects/hammer/lib/libthr/thread/thr_sem.c#4 (text+ko) ====

@@ -27,10 +27,11 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_sem.c,v 1.5 2005/04/02 01:20:00 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_sem.c,v 1.6 2005/09/01 15:21:23 stefanf Exp $
  */
 
 #include "namespace.h"
+#include <sys/types.h>
 #include <sys/queue.h>
 #include <errno.h>
 #include <fcntl.h>

==== //depot/projects/hammer/lib/libthr/thread/thr_symbols.c#3 (text+ko) ====

@@ -29,9 +29,10 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libthr/thread/thr_symbols.c,v 1.2 2005/04/12 03:00:28 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_symbols.c,v 1.3 2005/09/01 15:21:23 stefanf Exp $
  */
 
+#include <sys/types.h>
 #include <stddef.h>
 #include <pthread.h>
 #include <rtld.h>

==== //depot/projects/hammer/sbin/gpt/Makefile#6 (text+ko) ====

@@ -1,8 +1,8 @@
-# $FreeBSD: src/sbin/gpt/Makefile,v 1.6 2004/08/07 07:41:37 marcel Exp $
+# $FreeBSD: src/sbin/gpt/Makefile,v 1.7 2005/09/01 02:49:20 marcel Exp $
 
 PROG=	gpt
-SRCS=	add.c create.c destroy.c gpt.c map.c migrate.c recover.c remove.c \
-	show.c
+SRCS=	add.c create.c destroy.c gpt.c label.c map.c migrate.c recover.c \
+	remove.c show.c
 WARNS?=	4
 MAN=	gpt.8
 

==== //depot/projects/hammer/sbin/gpt/add.c#10 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.12 2005/08/31 01:47:19 marcel Exp $");
+__FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.13 2005/09/01 02:42:52 marcel Exp $");
 
 #include <sys/types.h>
 
@@ -48,7 +48,7 @@
 {
 
 	fprintf(stderr,
-	    "usage: %s [-b lba] [-i index] [-s lba] [-t uuid] device\n",
+	    "usage: %s [-b lba] [-i index] [-s lba] [-t uuid] device ...\n",
 	    getprogname());
 	exit(1);
 }

==== //depot/projects/hammer/sbin/gpt/gpt.8#11 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" (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/sbin/gpt/gpt.8,v 1.14 2005/08/31 05:56:21 marcel Exp $
+.\" $FreeBSD: src/sbin/gpt/gpt.8,v 1.15 2005/09/01 02:49:20 marcel Exp $
 .\"
-.Dd November 12, 2004
+.Dd August 31, 2005
 .Os
 .Dt GPT 8
 .Sh NAME
@@ -165,6 +165,71 @@
 option instructs
 .Nm
 to destroy the table in a way that it can be recovered.
+.\" ==== label ====
+.It Xo
+.Nm
+.Ic label
+.Op Fl a
+.Aq Fl f Ar file | Fl l Ar label
+.Ar device ...
+.Xc
+.It Xo
+.Nm
+.Ic label
+.Op Fl b Ar number
+.Op Fl i Ar index
+.Op Fl s Ar count
+.Op Fl t Ar type
+.Aq Fl f Ar file | Fl l Ar label
+.Ar device ...
+.Xc
+The
+.Ic label
+command allows the user to label any partitions that match the selection.
+At least one of the following selection options must be specified.
+.Pp
+The
+.Fl a
+option specifies that all partitions should be labeled.
+It is mutually exclusive with all other selection options.
+.Pp
+The
+.Fl b Ar number
+option selects the partition that starts at the given block number.
+.Pp
+The
+.Fl i Ar index
+option selects the partition with the given partition number.
+.Pp
+The
+.Fl s Ar count
+option selects all partitions that have the given size.
+This can cause multiple partitions to be removed.
+.Pp
+The
+.Fl t Ar type
+option selects all partitions that have the given type.
+The type is given as an UUID or by the aliases that the
+.Ic add
+command accepts.
+This can cause multiple partitions to be removed.
+.Pp
+The
+.Fl f Ar file
+or
+.Fl l Ar label
+options specify the new label to be assigned to the selected partitions.
+The
+.Fl f Ar file
+option is used to read the label from the specified file.
+Only the first line is read from the file and the trailing newline
+character is stripped.
+If the file name is the dash or minus sign (-), the label is read from
+the standard input.
+The
+.Fl l Ar label
+option is used to specify the label in the command line.
+The label is assumed to be encoded in UTF-8.
 .\" ==== migrate ====
 .It Nm Ic migrate Oo Fl fs Oc Ar device ...
 The
@@ -188,7 +253,7 @@
 disk labels into GPT partitions by creating
 the GPT equivalent of a slice.
 .\" ==== remove ====
-.It Nm Ic remove Oo Fl a Oc
+.It Nm Ic remove Oo Fl a Oc Ar device ...
 .It Xo
 .Nm
 .Ic remove
@@ -200,34 +265,14 @@
 .Xc
 The
 .Ic remove
-command allows the user to remove any partitions that match the selection.
-At least one option must be specified.
-.Pp
-The
-.Fl a
-option specifies that all partitions should be removed.
-It is mutually exclusive with all other options.
-.Pp
-The
-.Fl b Ar number
-option selects the partitions that starts at the given number.
-.Pp
-The
-.Fl i Ar index
-option selects the partition with the given partition number.
-.Pp
-The
-.Fl s Ar count
-option selects all partitions that have the given size.
-This can cause multiple partitions to be removed.
-.Pp
-The
-.Fl t Ar type
-option selects all partitions that have the given type.
-The type is given as an UUID or by the aliases that the
-.Ic add
-command accepts.
-This can cause multiple partitions to be removed.
+command allows the user to remove any and all partitions that match the
+selection.
+It uses the same selection options as the
+.Ic label
+command.
+See above for a description of these options.
+Partitions are removed by clearing the partition type.
+No other information is changed.
 .\" ==== show ====
 .It Nm Ic show Oo Fl lu Oc Ar device ...
 The

==== //depot/projects/hammer/sbin/gpt/gpt.c#9 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.12 2005/08/31 05:40:41 marcel Exp $");
+__FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.13 2005/09/01 02:49:20 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -556,6 +556,7 @@
 	{ cmd_create, "create" },
 	{ cmd_destroy, "destroy" },
 	{ NULL, "help" },
+	{ cmd_label, "label" },
 	{ cmd_migrate, "migrate" },
 	{ cmd_recover, "recover" },
 	{ cmd_remove, "remove" },
@@ -570,7 +571,7 @@
 {
 
 	fprintf(stderr,
-	    "usage: %s [-rv] [-p nparts] command [options] device\n",
+	    "usage: %s [-rv] [-p nparts] command [options] device ...\n",
 	    getprogname());
 	exit(1);
 }

==== //depot/projects/hammer/sbin/gpt/gpt.h#8 (text+ko) ====

@@ -23,7 +23,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/sbin/gpt/gpt.h,v 1.9 2005/08/31 05:40:41 marcel Exp $
+ * $FreeBSD: src/sbin/gpt/gpt.h,v 1.10 2005/09/01 02:49:20 marcel Exp $
  */
 
 #ifndef _GPT_H_
@@ -77,6 +77,7 @@
 int	cmd_add(int, char *[]);
 int	cmd_create(int, char *[]);
 int	cmd_destroy(int, char *[]);
+int	cmd_label(int, char *[]);
 int	cmd_migrate(int, char *[]);
 int	cmd_recover(int, char *[]);
 int	cmd_remove(int, char *[]);

==== //depot/projects/hammer/sbin/gpt/migrate.c#11 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.15 2005/08/31 05:40:41 marcel Exp $");
+__FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $");
 
 #include <sys/types.h>
 #include <sys/disklabel.h>
@@ -59,7 +59,7 @@
 {
 
 	fprintf(stderr,
-	    "usage: %s [-fs] device\n", getprogname());
+	    "usage: %s [-fs] device ...\n", getprogname());
 	exit(1);
 }
 

==== //depot/projects/hammer/sbin/gpt/remove.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
+__FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.8 2005/09/01 02:42:52 marcel Exp $");
 
 #include <sys/types.h>
 
@@ -49,8 +49,8 @@
 {
 
 	fprintf(stderr,
-	    "usage: %s -a device\n"
-	    "       %s [-b lba] [-i index] [-s lba] [-t uuid] device\n",
+	    "usage: %s -a device ...\n"
+	    "       %s [-b lba] [-i index] [-s lba] [-t uuid] device ...\n",
 	    getprogname(), getprogname());
 	exit(1);
 }
@@ -107,6 +107,8 @@
 		if (!uuid_is_nil(&type, NULL) &&
 		    !uuid_equal(&type, &uuid, NULL))
 			continue;
+
+		/* Remove the primary entry by clearing the partition type. */
 		uuid_create_nil(&ent->ent_type, NULL);
 
 		hdr->hdr_crc_table = htole32(crc32(tbl->map_data,
@@ -120,6 +122,8 @@
 		hdr = tpg->map_data;
 		ent = (void*)((char*)lbt->map_data + i *
 		    le32toh(hdr->hdr_entsz));
+
+		/* Remove the secundary entry. */
 		uuid_create_nil(&ent->ent_type, NULL);
 
 		hdr->hdr_crc_table = htole32(crc32(lbt->map_data,

==== //depot/projects/hammer/share/man/man9/bus_dma.9#19 (text+ko) ====

@@ -57,10 +57,10 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/bus_dma.9,v 1.27 2005/08/31 16:55:00 scottl Exp $
+.\" $FreeBSD: src/share/man/man9/bus_dma.9,v 1.28 2005/09/01 19:14:41 scottl Exp $
 .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $
 .\"
-.Dd May 28, 2003
+.Dd Aug 31, 2005
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -253,8 +253,9 @@
 where a read implies data coming from the device to the host memory, and a write
 implies data going from the host memory to the device.
 Alternately, the operations can be thought of in terms of driver operations,
-where reading a network packet or storage sector coresponds to a read operation
-in busdma.
+where reading a network packet or storage sector corresponds to a read operation
+in
+.Nm .
 .Bl -tag -width BUS_DMASYNC_POSTWRITE
 .It Dv BUS_DMASYNC_PREREAD
 Perform any synchronization required prior to an update of host memory by the

==== //depot/projects/hammer/sys/dev/pci/pci.c#43 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.292 2005/06/03 19:41:06 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.294 2005/09/01 16:41:42 jhb Exp $");
 
 #include "opt_bus.h"
 
@@ -826,9 +826,14 @@
 	 * If base is 0, then we have problems.  It is best to ignore
 	 * such entries for the moment.  These will be allocated later if
 	 * the driver specifically requests them.
+	 *
+	 * Similarly treat maps whose values is the same as the test value
+	 * read back.  These maps have had all f's written to them by the
+	 * BIOS in an attempt to disable the resources.
 	 */
-	if (base == 0)
+	if (base == 0 || map == testval)
 		return 1;
+
 	/*
 	 * This code theoretically does the right thing, but has
 	 * undesirable side effects in some cases where peripherals

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_clntout.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_clntout.c,v 1.9 2005/05/31 20:00:29 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_clntout.c,v 1.10 2005/08/31 20:45:15 stefanf Exp $");
 
 /*
  * rpc_clntout.c, Client-stub outputter for the RPC protocol compiler
@@ -45,6 +45,7 @@
 #include <string.h>
 #include <rpc/types.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
 
 extern void pdeclaration( char *, declaration *, int, char * );

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_cout.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_cout.c,v 1.12 2005/08/31 19:44:40 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_cout.c,v 1.13 2005/08/31 20:45:15 stefanf Exp $");
 
 /*
  * rpc_cout.c, XDR routine outputter for the RPC protocol compiler
@@ -45,6 +45,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
 
 static void print_header( definition * );

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_hout.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_hout.c,v 1.10 2005/05/31 20:00:29 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_hout.c,v 1.12 2005/09/01 19:16:25 stefanf Exp $");
 
 /*
  * rpc_hout.c, Header file outputter for the RPC protocol compiler
@@ -44,13 +44,14 @@
 #include <stdio.h>
 #include <ctype.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
 
 void storexdrfuncdecl( char *, int );
 static void pconstdef( definition * );
 static void pstructdef( definition * );
 static void puniondef( definition * );
-static void pprogramdef( definition * );
+static void pprogramdef( definition *, int );
 static void pstructdef( definition * );
 static void penumdef( definition * );
 static void ptypedef( definition * );
@@ -64,8 +65,7 @@
  * Print the C-version of an xdr definition
  */
 void
-print_datadef(def)
-	definition *def;
+print_datadef(definition *def, int headeronly)
 {
 
 	if (def->def_kind == DEF_PROGRAM)  /* handle data only */
@@ -88,7 +88,7 @@
 		ptypedef(def);
 		break;
 	case DEF_PROGRAM:
-		pprogramdef(def);
+		pprogramdef(def, headeronly);
 		break;
 	case DEF_CONST:
 		pconstdef(def);
@@ -104,13 +104,12 @@
 
 
 void
-print_funcdef(def)
-	definition *def;
+print_funcdef(definition *def, int headeronly)
 {
 	switch (def->def_kind) {
 	case DEF_PROGRAM:
 		f_print(fout, "\n");
-		pprogramdef(def);
+		pprogramdef(def, headeronly);
 		break;
 	default:
 		break;
@@ -315,8 +314,7 @@
 }
 
 static void
-pprogramdef(def)
-	definition *def;
+pprogramdef(definition *def, int headeronly)
 {
 	version_list *vers;
 	proc_list *proc;
@@ -344,8 +342,10 @@
 
 		if(!Cflag){
 			ext = "extern  ";
-			f_print(fout, "%s", ext);
-			pdispatch(def->def_name, vers->vers_num, 2);
+			if (headeronly) {
+				f_print(fout, "%s", ext);
+				pdispatch(def->def_name, vers->vers_num, 2);
+			}
 			for (proc = vers->procs; proc != NULL;
 			     proc = proc->next) {
 				if (!define_printed(proc,
@@ -373,8 +373,11 @@
 					ext = "extern  ";
 				}
 
-				f_print(fout, "%s", ext);
-				pdispatch(def->def_name, vers->vers_num, i);
+				if (headeronly) {
+					f_print(fout, "%s", ext);
+					pdispatch(def->def_name, vers->vers_num,
+					    i);
+				}
 				for (proc = vers->procs; proc != NULL;
 				     proc = proc->next) {
 					if (!define_printed(proc,

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_main.c#8 (text+ko) ====

@@ -36,7 +36,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_main.c,v 1.26 2005/08/31 19:44:40 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_main.c,v 1.28 2005/09/01 19:16:25 stefanf Exp $");
 
 /*
  * rpc_main.c, Top level of the RPC protocol compiler.
@@ -53,15 +53,15 @@
 #include <sys/file.h>
 #include <sys/stat.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
-#include "rpc_scan.h"
 
 extern void write_sample_svc( definition * );
 extern int write_sample_clnt( definition * );
 extern void write_sample_clnt_main( void );
 extern void add_sample_msg( void );
 static void c_output( char *, char *, int, char * );
-static void h_output( char *, char *, int, char * );
+static void h_output( char *, char *, int, char *, int );
 static void l_output( char *, char *, int, char * );
 static void t_output( char *, char *, int, char * );
 static void clnt_output( char *, char *, int, char * );
@@ -172,7 +172,8 @@
 	if (cmd.cflag) {
 		c_output(cmd.infile, "-DRPC_XDR", DONT_EXTEND, cmd.outfile);
 	} else if (cmd.hflag) {
-		h_output(cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile);
+		h_output(cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile,
+		    cmd.hflag);
 	} else if (cmd.lflag) {
 		l_output(cmd.infile, "-DRPC_CLNT", DONT_EXTEND, cmd.outfile);
 	} else if (cmd.sflag || cmd.mflag || (cmd.nflag)) {
@@ -192,7 +193,7 @@
 		/* the rescans are required, since cpp may effect input */
 		c_output(cmd.infile, "-DRPC_XDR", EXTEND, "_xdr.c");
 		reinitialize();
-		h_output(cmd.infile, "-DRPC_HDR", EXTEND, ".h");
+		h_output(cmd.infile, "-DRPC_HDR", EXTEND, ".h", cmd.hflag);
 		reinitialize();
 		l_output(cmd.infile, "-DRPC_CLNT", EXTEND, "_clnt.c");
 		reinitialize();
@@ -514,11 +515,7 @@
 
 
 static void
-h_output(infile, define, extend, outfile)
-	char *infile;
-	char *define;
-	int extend;
-	char *outfile;
+h_output(char *infile, char *define, int extend, char *outfile, int headeronly)
 {
 	definition *def;
 	char *outfilename;
@@ -558,7 +555,7 @@
 
 	/* print data definitions */
 	while ( (def = get_definition()) ) {
-		print_datadef(def);
+		print_datadef(def, headeronly);
 	}
 
 	/*
@@ -567,7 +564,7 @@
 	 *  arguments for functions
 	 */
 	for (l = defined; l != NULL; l = l->next) {
-		print_funcdef(l->val);
+		print_funcdef(l->val, headeronly);
 	}
 	/* Now  print all xdr func declarations */
 	if (xdrfunc_head != NULL){

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_parse.h#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/usr.bin/rpcgen/rpc_parse.h,v 1.5 2002/07/21 12:55:04 charnier Exp $
+ * $FreeBSD: src/usr.bin/rpcgen/rpc_parse.h,v 1.6 2005/08/31 20:45:15 stefanf Exp $
  */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -187,7 +187,7 @@
 };
 typedef struct definition definition;
 
-definition *get_definition();
+definition *get_definition(void);
 
 
 struct bas_type

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_sample.c#2 (text+ko) ====

@@ -30,7 +30,7 @@
 /* #pragma ident	"@(#)rpc_sample.c	1.9	94/04/25 SMI" */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_sample.c,v 1.6 2002/07/21 12:55:04 charnier Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_sample.c,v 1.7 2005/08/31 20:45:15 stefanf Exp $");
 
 /*
  * rpc_sample.c, Sample client-server code outputter for the RPC protocol compiler
@@ -40,6 +40,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
 
 

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_scan.h#2 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/usr.bin/rpcgen/rpc_scan.h,v 1.5 2002/07/21 12:55:04 charnier Exp $
+ * $FreeBSD: src/usr.bin/rpcgen/rpc_scan.h,v 1.6 2005/08/31 20:45:15 stefanf Exp $
  */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -127,10 +127,10 @@
 /*
  * routine interface
  */
-void scan();
-void scan2();
-void scan3();
-void scan_num();
-void peek();
-int peekscan();
-void get_token();
+void scan(tok_kind expect, token *tokp);
+void scan2(tok_kind expect1, tok_kind expect2, token *tokp);
+void scan3(tok_kind expect1, tok_kind expect2, tok_kind expect3, token *tokp);
+void scan_num(token *tokp);
+void peek(token *tokp);
+int peekscan(tok_kind expect, token *tokp);
+void get_token(token *tokp);

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_svcout.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_svcout.c,v 1.16 2005/05/31 20:00:29 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_svcout.c,v 1.17 2005/08/31 20:45:15 stefanf Exp $");
 
 /*
  * rpc_svcout.c, Server-skeleton outputter for the RPC protocol compiler
@@ -44,6 +44,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
 
 extern int tirpc_socket;

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_tblout.c#5 (text+ko) ====

@@ -35,7 +35,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_tblout.c,v 1.9 2005/05/31 20:00:29 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/rpcgen/rpc_tblout.c,v 1.10 2005/08/31 20:45:15 stefanf Exp $");
 
 /*
  * rpc_tblout.c, Dispatch table outputter for the RPC protocol compiler
@@ -45,6 +45,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "rpc_parse.h"
+#include "rpc_scan.h"
 #include "rpc_util.h"
 
 #define TABSIZE		8

==== //depot/projects/hammer/usr.bin/rpcgen/rpc_util.h#3 (text+ko) ====

@@ -1,5 +1,5 @@
 /*
- * $FreeBSD: src/usr.bin/rpcgen/rpc_util.h,v 1.7 2005/08/31 19:44:40 stefanf Exp $
+ * $FreeBSD: src/usr.bin/rpcgen/rpc_util.h,v 1.9 2005/09/01 19:16:25 stefanf Exp $
  */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -151,10 +151,10 @@
 /*
  * rpc_util routines
  */
-void reinitialize();
-void crash();
+void reinitialize(void);
+void crash(void);
 void add_type(int len, char *type);
-void storeval();
+void storeval(list **lstp, definition *val);
 void *xmalloc(size_t size);
 void *xrealloc(void *ptr, size_t size);
 char *xstrdup(const char *str);
@@ -162,56 +162,56 @@
 #define	STOREVAL(list,item)	\
 	storeval(list,item)
 
-definition *findval();
+definition *findval(list *lst, char *val, int (*cmp)(char *, char *));
 
 #define	FINDVAL(list,item,finder) \
 	findval(list, item, finder)
 
-char *fixtype();
-char *stringfix();
-char *locase();
-void pvname_svc();
-void pvname();
-void ptype();
-int isvectordef();
-int streq();
-void error();
-void expected1();
-void expected2();
-void expected3();
-void tabify();
-void record_open();
-bas_type *find_type();
+char *fixtype(char *type);
+char *stringfix(char *type);
+char *locase(char *str);
+void pvname_svc(char *pname, char *vnum);
+void pvname(char *pname, char *vnum);
+void ptype(char *prefix, char *type, int follow);
+int isvectordef(char *type, relation rel);
+int streq(char *a, char *b);
+void error(char *msg);
+void expected1(tok_kind exp1);
+void expected2(tok_kind exp1, tok_kind exp2);
+void expected3(tok_kind exp1, tok_kind exp2, tok_kind exp3);
+void tabify(FILE *f, int tab);
+void record_open(char *file);
+bas_type *find_type(char *type);
+
 /*
  * rpc_cout routines
  */
-void cprint();
-void emit();
+void emit(definition *def);
 
 /*
  * rpc_hout routines
  */
-void print_datadef();
-void print_funcdef();
-void print_xdr_func_def();
+void print_datadef(definition *def, int headeronly);
+void print_funcdef(definition *def, int headeronly);
+void print_xdr_func_def(char* name, int pointerp, int i);
 
 /*
  * rpc_svcout routines

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



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