PERFORCE change 68018 for review

Sam Leffler sam at FreeBSD.org
Fri Dec 31 11:20:43 PST 2004


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

Change 68018 by sam at sam_ebb on 2004/12/31 19:19:47

	IFC @ 68017

Affected files ...

.. //depot/projects/wifi/MAINTAINERS#3 integrate
.. //depot/projects/wifi/Makefile.inc1#10 integrate
.. //depot/projects/wifi/games/fortune/datfiles/fortunes2#3 integrate
.. //depot/projects/wifi/gnu/usr.bin/send-pr/send-pr.1#2 integrate
.. //depot/projects/wifi/lib/libarchive/archive_write_set_format_pax.c#6 integrate
.. //depot/projects/wifi/lib/libc/gen/signal.3#3 integrate
.. //depot/projects/wifi/lib/libc/gen/syslog.3#2 integrate
.. //depot/projects/wifi/lib/libc/gen/syslog.c#4 integrate
.. //depot/projects/wifi/lib/libc/net/inet6_option_space.3#2 integrate
.. //depot/projects/wifi/lib/libc/regex/engine.c#3 integrate
.. //depot/projects/wifi/lib/libc/sys/chmod.2#2 integrate
.. //depot/projects/wifi/lib/libdisk/libdisk.3#2 integrate
.. //depot/projects/wifi/lib/libipx/ipx.3#2 integrate
.. //depot/projects/wifi/lib/libstand/libstand.3#2 integrate
.. //depot/projects/wifi/lib/libutil/login_cap.3#2 integrate
.. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#8 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/early-adopter/article.sgml#2 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/common/dev.sgml#3 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/common/intro.sgml#2 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml#2 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml#2 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml#2 integrate
.. //depot/projects/wifi/release/doc/ja_JP.eucJP/share/sgml/release.dsl#2 integrate
.. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#7 integrate
.. //depot/projects/wifi/sbin/dump/optr.c#2 integrate
.. //depot/projects/wifi/sbin/geom/core/geom.c#2 integrate
.. //depot/projects/wifi/sbin/sconfig/sconfig.8#3 integrate
.. //depot/projects/wifi/share/man/man3/pthread_once.3#2 integrate
.. //depot/projects/wifi/share/man/man3/pthread_setspecific.3#2 integrate
.. //depot/projects/wifi/share/man/man3/queue.3#2 integrate
.. //depot/projects/wifi/share/man/man4/ath.4#5 integrate
.. //depot/projects/wifi/share/man/man4/bktr.4#2 integrate
.. //depot/projects/wifi/share/man/man9/swi.9#2 integrate
.. //depot/projects/wifi/share/man/man9/timeout.9#2 integrate
.. //depot/projects/wifi/sys/alpha/conf/GENERIC#4 integrate
.. //depot/projects/wifi/sys/amd64/conf/GENERIC#3 integrate
.. //depot/projects/wifi/sys/compat/ndis/subr_hal.c#2 integrate
.. //depot/projects/wifi/sys/conf/NOTES#8 integrate
.. //depot/projects/wifi/sys/conf/files#12 integrate
.. //depot/projects/wifi/sys/conf/kmod.mk#6 integrate
.. //depot/projects/wifi/sys/dev/bktr/CHANGELOG.TXT#2 integrate
.. //depot/projects/wifi/sys/dev/md/md.c#5 integrate
.. //depot/projects/wifi/sys/dev/usb/ehci.c#7 integrate
.. //depot/projects/wifi/sys/dev/usb/ehci_pci.c#2 integrate
.. //depot/projects/wifi/sys/dev/usb/ehcivar.h#3 integrate
.. //depot/projects/wifi/sys/dev/usb/ohci_pci.c#2 integrate
.. //depot/projects/wifi/sys/dev/usb/ugen.c#5 integrate
.. //depot/projects/wifi/sys/dev/usb/uhci_pci.c#2 integrate
.. //depot/projects/wifi/sys/dev/usb/usbdevs#8 integrate
.. //depot/projects/wifi/sys/geom/geom_kern.c#2 integrate
.. //depot/projects/wifi/sys/geom/mirror/g_mirror.c#6 integrate
.. //depot/projects/wifi/sys/geom/raid3/g_raid3.c#8 integrate
.. //depot/projects/wifi/sys/i386/conf/GENERIC#4 integrate
.. //depot/projects/wifi/sys/i386/i386/exception.s#2 integrate
.. //depot/projects/wifi/sys/i386/i386/sys_machdep.c#3 integrate
.. //depot/projects/wifi/sys/i386/i386/vm_machdep.c#7 integrate
.. //depot/projects/wifi/sys/kern/kern_intr.c#6 integrate
.. //depot/projects/wifi/sys/kern/kern_resource.c#2 integrate
.. //depot/projects/wifi/sys/kern/kern_synch.c#4 integrate
.. //depot/projects/wifi/sys/kern/kern_sysctl.c#3 integrate
.. //depot/projects/wifi/sys/kern/kern_umtx.c#5 integrate
.. //depot/projects/wifi/sys/kern/sched_4bsd.c#5 integrate
.. //depot/projects/wifi/sys/kern/sched_ule.c#7 integrate
.. //depot/projects/wifi/sys/kern/subr_trap.c#3 integrate
.. //depot/projects/wifi/sys/kern/subr_turnstile.c#2 integrate
.. //depot/projects/wifi/sys/kern/subr_witness.c#4 integrate
.. //depot/projects/wifi/sys/kern/sysv_msg.c#3 integrate
.. //depot/projects/wifi/sys/kern/tty.c#5 integrate
.. //depot/projects/wifi/sys/kern/vfs_cluster.c#6 integrate
.. //depot/projects/wifi/sys/modules/bktr/bktr/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/if_ppp/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/if_tun/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/io/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/mac_portacl/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/mem/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/snp/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/sound/driver/uaudio/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ti/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ubsa/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ubser/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ucom/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ucycom/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/uftdi/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ugen/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/uhid/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ukbd/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ulpt/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/umct/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/umodem/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/ums/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/uplcom/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/urio/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/usb/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/uscanner/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/uvisor/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/uvscom/Makefile#2 integrate
.. //depot/projects/wifi/sys/modules/vkbd/Makefile#2 integrate
.. //depot/projects/wifi/sys/netgraph/ng_ether.c#2 integrate
.. //depot/projects/wifi/sys/netipx/ipx_input.c#2 integrate
.. //depot/projects/wifi/sys/netipx/ipx_pcb.c#2 integrate
.. //depot/projects/wifi/sys/netipx/ipx_pcb.h#2 integrate
.. //depot/projects/wifi/sys/netipx/ipx_usrreq.c#3 integrate
.. //depot/projects/wifi/sys/netipx/ipx_var.h#2 integrate
.. //depot/projects/wifi/sys/netipx/spx_usrreq.c#3 integrate
.. //depot/projects/wifi/sys/pci/agp_ali.c#2 integrate
.. //depot/projects/wifi/sys/pci/agp_intel.c#2 integrate
.. //depot/projects/wifi/sys/pci/agp_sis.c#2 integrate
.. //depot/projects/wifi/sys/pci/agp_via.c#2 integrate
.. //depot/projects/wifi/sys/powerpc/powerpc/pmap.c#4 integrate
.. //depot/projects/wifi/sys/sparc64/conf/GENERIC#4 integrate
.. //depot/projects/wifi/sys/sys/copyright.h#2 integrate
.. //depot/projects/wifi/sys/sys/proc.h#5 integrate
.. //depot/projects/wifi/sys/sys/sched.h#2 integrate
.. //depot/projects/wifi/sys/sys/turnstile.h#2 integrate
.. //depot/projects/wifi/sys/sys/umtx.h#4 integrate
.. //depot/projects/wifi/sys/tools/usbdevs2h.awk#2 integrate
.. //depot/projects/wifi/sys/vm/vm_page.c#6 integrate
.. //depot/projects/wifi/usr.bin/chpass/Makefile#3 integrate
.. //depot/projects/wifi/usr.bin/netstat/ipx.c#2 integrate
.. //depot/projects/wifi/usr.bin/netstat/main.c#2 integrate
.. //depot/projects/wifi/usr.bin/passwd/Makefile#2 integrate
.. //depot/projects/wifi/usr.sbin/lpr/common_source/common.c#2 integrate
.. //depot/projects/wifi/usr.sbin/lpr/common_source/ctlinfo.c#2 integrate
.. //depot/projects/wifi/usr.sbin/lpr/common_source/displayq.c#2 integrate
.. //depot/projects/wifi/usr.sbin/lpr/common_source/lp.h#2 integrate
.. //depot/projects/wifi/usr.sbin/lpr/common_source/matchjobs.c#2 integrate
.. //depot/projects/wifi/usr.sbin/lpr/common_source/rmjob.c#2 integrate
.. //depot/projects/wifi/usr.sbin/syslogd/syslogd.c#5 integrate

Differences ...

==== //depot/projects/wifi/MAINTAINERS#3 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.101 2004/11/30 20:04:47 eik Exp $
+$FreeBSD: src/MAINTAINERS,v 1.102 2004/12/29 03:49:58 gad Exp $
 
 subsystem	login	notes
 -----------------------------
@@ -65,7 +65,9 @@
 lpr		gad	Pre-commit review requested, particularly for
 			lpd/recvjob.c and lpd/printjob.c.
 newsyslog(8)	gad	Heads-up appreciated.  I'm going thru the PR's for it.
-patch		gad	I have a WIP which will change the src a lot.
+pkill		gad	Heads-up appreciated.
+ps		gad	I am working on a number of changes to this.  Would
+			like advance notice of major changes planned to it.
 cvs		peter	Heads-up appreciated, try not to break it.
 ncurses		peter	Heads-up appreciated, try not to break it.
 nvi		peter	Try not to break it.

==== //depot/projects/wifi/Makefile.inc1#10 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/Makefile.inc1,v 1.471 2004/12/22 22:00:01 ru Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.472 2004/12/29 19:39:06 obrien Exp $
 #
 # Make command line options:
 #	-DNO_DYNAMICROOT do not link /bin and /sbin dynamically
@@ -467,57 +467,6 @@
 SPECIAL_INSTALLCHECKS=
 
 #
-# The following install-time check will see if the installation will
-# change the type used for time_t, and if it will, the target makes
-# sure that the user is expecting to make that change.
-#
-.if ${TARGET_ARCH} == "sparc64"
-SPECIAL_INSTALLCHECKS+=sparc64_installcheck
-
-CUR_TIMET!=	grep __time_t /usr/include/machine/_types.h | awk '{print $$2}'
-SRC_TIMET!=	grep __time_t ${.CURDIR}/sys/sparc64/include/_types.h | \
-		awk '{print $$2}'
-NEWSPARC_TIMETYPE?=${CUR_TIMET}
-
-sparc64_installcheck:
-.if ${CUR_TIMET} != ${SRC_TIMET}
-	@echo
-.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET}
-	@echo "***  ERROR: This target would change the type used for time_t!"
-.else
-	@echo "* Note: This installation changes the type used for time_t."
-.endif
-	@echo "* "
-	@echo "* This host has time_t defined as ${CUR_TIMET},"
-	@echo "* and this installation would change that to type ${SRC_TIMET}."
-.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET}
-	@echo "* "
-	@echo "* If that is *NOT* what you wanted, then you need to change the"
-	@echo "* typedef of __time_t in ${.CURDIR}/sys/sparc64/include/_types.h"
-	@echo "* from '${SRC_TIMET}' to '${CUR_TIMET}'.  After that you *MUST*"
-	@echo "* do a complete cleanworld, buildworld, buildkernel before you"
-	@echo "* retry the 'make' command.  Also read /usr/src/UPDATING.64BTT."
-	@echo "* "
-	@echo "* If that *is* what you want, then enter the commands:"
-	@echo "      NEWSPARC_TIMETYPE=${SRC_TIMET}"
-	@echo "      export NEWSPARC_TIMETYPE"
-	@echo "* and repeat your 'make' command."
-	@echo
-	false
-.endif
-	@echo
-.elif ${NEWSPARC_TIMETYPE} != ${SRC_TIMET}
-	@echo
-	@echo "***  ERROR: NEWSPARC_TIMETYPE is set to '${NEWSPARC_TIMETYPE}'"
-	@echo "***         but ${.CURDIR}/sys/sparc64/include/_types.h"
-	@echo "***         has __time_t defined as '${SRC_TIMET}'."
-	false
-.else
-	@# in sparc64_installcheck, all TIMETYPEs == '${CUR_TIMET}'
-.endif
-.endif
-
-#
 # installcheck
 #
 # Checks to be sure system is ready for installworld

==== //depot/projects/wifi/games/fortune/datfiles/fortunes2#3 (text+ko) ====

@@ -1,5 +1,5 @@
 This fortune brought to you by:
-$FreeBSD: src/games/fortune/datfiles/fortunes2,v 1.78 2004/11/12 10:15:43 schweikh Exp $
+$FreeBSD: src/games/fortune/datfiles/fortunes2,v 1.79 2004/12/30 12:18:30 schweikh Exp $
 %
 =======================================================================
 ||								     ||
@@ -51642,7 +51642,7 @@
 it is necessary not to make a decision.
 %
 When it's dark enough you can see the stars.
-		-- Ralph Waldo Emerson,
+		-- Ralph Waldo Emerson
 %
 When license fees are too high,
 users do things by hand.
@@ -51736,7 +51736,7 @@
 it less and less."
 		-- Louise Andrews Kent
 %
-When oxygen Tech played Hydrogen U.
+When Oxygen Tech played Hydrogen U.
 The Game had just begun, when Hydrogen scored two fast points
 And Oxygen still had none
 Then Oxygen scored a single goal
@@ -51832,9 +51832,6 @@
 When the bosses talk about improving productivity, they are never talking
 about themselves.
 %
-When the bosses talk about improving productivity, they are never
-talking about themselves.
-%
 When the candles are out all women are fair.
 		-- Plutarch
 %

==== //depot/projects/wifi/gnu/usr.bin/send-pr/send-pr.1#2 (text+ko) ====

@@ -22,7 +22,7 @@
 .\"
 .\" ---------------------------------------------------------------------------
 .\"
-.\" $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.1,v 1.16 2003/06/20 10:48:26 des Exp $
+.\" $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.1,v 1.17 2004/12/29 19:32:21 keramida Exp $
 .nh
 .TH SEND-PR 1 3.113 "February 1993"
 .SH NAME
@@ -102,6 +102,13 @@
 .LP
 The more precise your problem description and the more complete your
 information, the faster your support team can solve your problems.
+.LP
+.B send-pr
+depends on a correctly configured mail submission system to work correctly.
+If, for any reason, sending mail is not working, problem reports can be
+submitted over the web, through:
+.IP
+.I http://www.freebsd.org/send-pr.html
 .SH OPTIONS
 .TP
 .BI \-f " problem-report"

==== //depot/projects/wifi/lib/libarchive/archive_write_set_format_pax.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.24 2004/12/22 02:35:37 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.25 2004/12/29 23:26:18 kientzle Exp $");
 
 #include <sys/stat.h>
 #include <errno.h>
@@ -720,99 +720,191 @@
 /*
  * We need a valid name for the regular 'ustar' entry.  This routine
  * tries to hack something more-or-less reasonable.
+ *
+ * The approach here tries to preserve leading dir names.  We do so by
+ * breaking the full path into three sections:
+ *   1) "prefix" directory names,
+ *   2) "suffix" directory names,
+ *   3) filename.
+ *
+ * These three sections must satisfy the following requirements:
+ *   * Parts 1 & 2 together form an initial portion of the dir name.
+ *   * Part 3 forms an initial portion of the base filename.
+ *   * The filename must be <= 90 chars to fit the ustar 'name' field while
+ *     allowing room for the '/PaxHeader' dir element (see below)
+ *   * Parts 2 & 3 together must be <= 90 chars to fit the ustar 'name' field
+ *     while allowing room for the '/PaxHeader' dir element.
+ *   * Part 1 must be <= 155 chars to fit the ustar 'prefix' field.
+ *   * If the original name ends in a '/', the new name must also end in a '/'
+ *   * Trailing '/.' sequences may be stripped.
+ *
+ * Note: Recall that the ustar format does not store the '/' separating
+ * parts 1 & 2, but does store the '/' separating parts 2 & 3.
  */
 static char *
 build_ustar_entry_name(char *dest, const char *src)
 {
-	const char *basename, *break_point, *prefix;
-	int basename_length, dirname_length, prefix_length;
+	const char *prefix, *prefix_end;
+	const char *suffix, *suffix_end;
+	const char *filename, *filename_end;
+	char *p;
+	size_t s;
+	int need_slash = 0; /* Was there a trailing slash? */
+	size_t suffix_length = 90;
 
-	prefix = src;
-	basename = strrchr(src, '/');
-	if (basename == NULL) {
-		basename = src;
-		prefix_length = 0;
-		basename_length = strlen(basename);
-		if (basename_length > 100)
-			basename_length = 100;
-	} else {
-		basename_length = strlen(basename);
-		if (basename_length > 100)
-			basename_length = 100;
-		dirname_length = basename - src;
+	/* Step 0: Initial checks. */
+	s = strlen(src);
+	if (s < 100) {
+		strcpy(dest, src);
+		return (dest);
+	}
 
-		break_point =
-		    strchr(src + dirname_length + basename_length - 101, '/');
-		prefix_length = break_point - prefix - 1;
-		while (prefix_length > 155) {
-			prefix = strchr(prefix, '/') + 1; /* Drop 1st dir. */
-			prefix_length = break_point - prefix - 1;
+	/* Step 1: Locate filename and enforce the length restriction. */
+	filename_end = src + s;
+	/* Remove trailing '/' chars and '/.' pairs. */
+	for (;;) {
+		if (filename_end > src && filename_end[-1] == '/') {
+			filename_end --;
+			need_slash = 1; /* Remember to restore trailing '/'. */
+			continue;
+		}
+		if (filename_end > src + 1 && filename_end[-1] == '.'
+		    && filename_end[-2] == '/') {
+			filename_end -= 2;
+			continue;
 		}
+		break;
 	}
+	filename = filename_end - 1;
+	if (need_slash)
+		suffix_length--;
+	while ((filename > src) && (*filename != '/'))
+		filename --;
+	if ((*filename == '/') && (filename < filename_end - 1))
+		filename ++;
+	if (filename_end > filename + suffix_length)
+		filename_end = filename + suffix_length;
 
+	/* Step 2: Locate the "prefix" section of the dirname, including
+	 * trailing '/'. */
+	prefix = src;
+	prefix_end = prefix + 155;
+	if (prefix_end > filename)
+		prefix_end = filename;
+	while (prefix_end > prefix && *prefix_end != '/')
+		prefix_end--;
+	if ((prefix_end < filename) && (*prefix_end == '/'))
+		prefix_end++;
+
+	/* Step 3: Locate the "suffix" section of the dirname,
+	 * including trailing '/'. */
+	suffix = prefix_end;
+	suffix_end = suffix + 89 - (filename_end - filename);
+	if (suffix_end > filename)
+		suffix_end = filename;
+	if (suffix_end < suffix)
+		suffix_end = suffix;
+	while (suffix_end > suffix && *suffix_end != '/')
+		suffix_end--;
+	if ((suffix_end < filename) && (*suffix_end == '/'))
+		suffix_end++;
+
+	/* Step 4: Build the new name. */
 	/* The OpenBSD strlcpy function is safer, but less portable. */
 	/* Rather than maintain two versions, just use the strncpy version. */
-	strncpy(dest, prefix, basename - prefix + basename_length);
-	dest[basename - prefix + basename_length] = '\0';
+	p = dest;
+	if (prefix_end > prefix) {
+		strncpy(p, prefix, prefix_end - prefix);
+		p += prefix_end - prefix;
+	}
+	if (suffix_end > suffix) {
+		strncpy(p, suffix, suffix_end - suffix);
+		p += suffix_end - suffix;
+	}
+	strncpy(p, filename, filename_end - filename);
+	p += filename_end - filename;
+	if (need_slash)
+		*p++ = '/';
+	*p++ = '\0';
 
 	return (dest);
 }
 
 /*
  * The ustar header for the pax extended attributes must have a
- * reasonable name:  SUSv3 suggests 'dirname'/PaxHeaders/'basename'
+ * reasonable name:  SUSv3 suggests 'dirname'/PaxHeader/'filename'
  *
  * Joerg Schiling has argued that this is unnecessary because, in practice,
  * if the pax extended attributes get extracted as regular files, noone is
  * going to bother reading those attributes to manually restore them.
- * This is a tempting argument, but I'm not entirely convinced.
+ * Based on this, 'star' uses /tmp/PaxHeader/'basename' as the ustar header
+ * name.  This is a tempting argument, but I'm not entirely convinced.
+ * I'm also uncomfortable with the fact that "/tmp" is a Unix-ism.
  *
- * Of course, adding "PaxHeaders/" might force the name to be too big.
- * Here, I start from the (possibly already-trimmed) name used in the
- * main ustar header and delete some additional early path elements to
- * fit in the extra "PaxHeader/" part.
+ * The following routine implements the SUSv3 recommendation, and is
+ * much simpler because we do the initial processing with
+ * build_ustar_entry_name() above which results in something that is
+ * already short enough to accomodate the extra '/PaxHeader'
+ * addition.  We just need to separate dir and filename portions and
+ * handle a few pathological cases.
  */
 static char *
-build_pax_attribute_name(const char *abbreviated, /* ustar-compat name */
+build_pax_attribute_name(const char *src, /* ustar-compat name */
     struct archive_string *work)
 {
-	const char *basename, *break_point, *prefix;
-	int prefix_length, suffix_length;
+	const char *filename, *filename_end;
 
-	/*
-	 * This is much simpler because I know that "abbreviated" is
-	 * already small enough; I just need to determine if it needs
-	 * any further trimming to fit the "PaxHeader/" portion.
-	 */
+	if (*src == '\0') {
+		archive_strcpy(work, "PaxHeader/blank");
+		return (work->s);
+	}
+	if (*src == '.' && src[1] == '\0') {
+		archive_strcpy(work, "PaxHeader/dot");
+		return (work->s);
+	}
 
-	/* Identify the final prefix and suffix portions. */
-	prefix = abbreviated;	/* First guess: prefix starts at beginning */
-	if (strlen(abbreviated) > 100) {
-		break_point = strchr(prefix + strlen(prefix) - 101, '/');
-		prefix_length = break_point - prefix - 1;
-		suffix_length = strlen(break_point + 1);
-		/*
-		 * The next loop keeps trimming until "/PaxHeader/" can
-		 * be added to either the prefix or the suffix.
-		 */
-		while (prefix_length > 144 && suffix_length > 89) {
-			prefix = strchr(prefix, '/') + 1; /* Drop 1st dir. */
-			prefix_length = break_point - prefix - 1;
+	/* Prune unwanted final path elements. */
+	filename_end = src + strlen(src);
+	for (;;) {
+		if (filename_end > src && filename_end[-1] == '/') {
+			filename_end --;
+			continue;
+		}
+		if (filename_end > src + 1 && filename_end[-1] == '.'
+		    && filename_end[-2] == '/') {
+			filename_end -= 2;
+			continue;
 		}
+		break;
 	}
+	while ((filename_end > src) && (filename_end[-1] == '/'))
+		filename_end --;
 
-	archive_string_empty(work);
-	basename = strrchr(prefix, '/');
-	if (basename == NULL) {
-		archive_strcpy(work, "PaxHeader/");
-		archive_strcat(work, prefix);
-	} else {
-		basename++;
-		archive_strncpy(work, prefix, basename - prefix);
-		archive_strcat(work, "PaxHeader/");
-		archive_strcat(work, basename);
+	/* Pathological case: Entire 'src' consists of '/' characters. */
+	if (filename_end == src) {
+		archive_strcpy(work, "/PaxHeader/rootdir");
+		return (work->s);
+	}
+
+	/* Find the '/' before the filename portion. */
+	filename = filename_end - 1;
+	while ((filename > src) && (*filename != '/'))
+		filename --;
+	if (*filename == '/')
+		filename ++;
+
+	/* Pathological case: filename is '.' */
+	if (filename_end == filename + 2
+	    && filename[0] == '/' && filename[1] == '.') {
+		archive_strncpy(work, src, filename - src);
+		archive_strcat(work, "PaxHeader/dot");
+		return (work->s);
 	}
 
+	/* Build the new name. */
+	archive_strncpy(work, src, filename - src);
+	archive_strcat(work, "PaxHeader/");
+	archive_strncat(work, filename, filename_end - filename);
 	return (work->s);
 }
 

==== //depot/projects/wifi/lib/libc/gen/signal.3#3 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)signal.3	8.3 (Berkeley) 4/19/94
-.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.39 2004/12/23 02:48:20 jkoshy Exp $
+.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.40 2004/12/29 19:40:56 keramida Exp $
 .\"
 .Dd June 7, 2004
 .Dt SIGNAL 3
@@ -255,7 +255,7 @@
 An attempt is made to ignore or supply a handler for
 .Dv SIGKILL
 or
-.Ev SIGSTOP .
+.Dv SIGSTOP .
 .El
 .Sh SEE ALSO
 .Xr kill 1 ,
@@ -271,8 +271,8 @@
 .Xr siginterrupt 3 ,
 .Xr tty 4
 .Sh HISTORY
-This
-.Fn signal
+The
+.Nm
 facility appeared in
 .Bx 4.0 .
 The option to avoid the creation of child zombies through ignoring

==== //depot/projects/wifi/lib/libc/gen/syslog.3#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)syslog.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/syslog.3,v 1.23 2002/12/19 09:40:21 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/syslog.3,v 1.24 2004/12/30 13:09:34 krion Exp $
 .\"
-.Dd June 4, 1993
+.Dd December 30, 2004
 .Dt SYSLOG 3
 .Os
 .Sh NAME
@@ -206,6 +206,8 @@
 The mail system.
 .It Dv LOG_NEWS
 The network news system.
+.It Dv LOG_NTP
+The network time protocol system.
 .It Dv LOG_SECURITY
 Security subsystems, such as
 .Xr ipfw 4 .

==== //depot/projects/wifi/lib/libc/gen/syslog.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
 static char sccsid[] = "@(#)syslog.c	8.5 (Berkeley) 4/29/95";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.33 2004/12/24 09:48:44 glebius Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/syslog.c,v 1.34 2004/12/30 16:05:11 glebius Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -48,6 +48,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <paths.h>
+#include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -66,9 +67,20 @@
 static const char *LogTag = NULL;	/* string to tag the entry with */
 static int	LogFacility = LOG_USER;	/* default facility code */
 static int	LogMask = 0xff;		/* mask of priorities to be logged */
+static pthread_mutex_t	syslog_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+#define	THREAD_LOCK()							\
+	do { 								\
+		if (__isthreaded) _pthread_mutex_lock(&syslog_mutex);	\
+	} while(0)
+#define	THREAD_UNLOCK()							\
+	do {								\
+		if (__isthreaded) _pthread_mutex_unlock(&syslog_mutex);	\
+	} while(0)
 
 static void	disconnectlog(void); /* disconnect from syslogd */
 static void	connectlog(void);	/* (re)connect to syslogd */
+static void	openlog_unlocked(const char *, int, int);
 
 enum {
 	NOCONN = 0,
@@ -134,7 +146,7 @@
 	char ch, *p;
 	time_t now;
 	int fd, saved_errno;
-	char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26];
+	char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26], errstr[64];
 	FILE *fp, *fmt_fp;
 	struct bufcookie tbuf_cookie;
 	struct bufcookie fmt_cookie;
@@ -147,9 +159,13 @@
 		pri &= LOG_PRIMASK|LOG_FACMASK;
 	}
 
+	THREAD_LOCK();
+
 	/* Check priority against setlogmask values. */
-	if (!(LOG_MASK(LOG_PRI(pri)) & LogMask))
+	if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) {
+		THREAD_UNLOCK();
 		return;
+	}
 
 	saved_errno = errno;
 
@@ -161,8 +177,10 @@
 	tbuf_cookie.base = tbuf;
 	tbuf_cookie.left = sizeof(tbuf);
 	fp = fwopen(&tbuf_cookie, writehook);
-	if (fp == NULL)
+	if (fp == NULL) {
+		THREAD_UNLOCK();
 		return;
+	}
 
 	/* Build the message. */
 	(void)time(&now);
@@ -192,6 +210,7 @@
 		fmt_fp = fwopen(&fmt_cookie, writehook);
 		if (fmt_fp == NULL) {
 			fclose(fp);
+			THREAD_UNLOCK();
 			return;
 		}
 
@@ -203,7 +222,8 @@
 		for ( ; (ch = *fmt); ++fmt) {
 			if (ch == '%' && fmt[1] == 'm') {
 				++fmt;
-				fputs(strerror(saved_errno), fmt_fp);
+				strerror_r(saved_errno, errstr, sizeof(errstr));
+				fputs(errstr, fmt_fp);
 			} else if (ch == '%' && fmt[1] == '%') {
 				++fmt;
 				fputc(ch, fmt_fp);
@@ -247,7 +267,7 @@
 
 	/* Get connected, output the message to the local logger. */
 	if (!opened)
-		openlog(LogTag, LogStat | LOG_NDELAY, 0);
+		openlog_unlocked(LogTag, LogStat | LOG_NDELAY, 0);
 	connectlog();
 
 	/*
@@ -272,13 +292,17 @@
 		}
 		do {
 			usleep(1);
-			if (send(LogFile, tbuf, cnt, 0) >= 0)
+			if (send(LogFile, tbuf, cnt, 0) >= 0) {
+				THREAD_UNLOCK();
 				return;
+			}
 			if (status == CONNPRIV)
 				break;
 		} while (errno == ENOBUFS);
-	} else
+	} else {
+		THREAD_UNLOCK();
 		return;
+	}
 
 	/*
 	 * Output the message to the console; try not to block
@@ -299,7 +323,11 @@
 		(void)_writev(fd, iov, 2);
 		(void)_close(fd);
 	}
+
+	THREAD_UNLOCK();
 }
+
+/* Should be called with mutex acquired */
 static void
 disconnectlog()
 {
@@ -315,6 +343,7 @@
 	status = NOCONN;			/* retry connect */
 }
 
+/* Should be called with mutex acquired */
 static void
 connectlog()
 {
@@ -366,8 +395,8 @@
 	}
 }
 
-void
-openlog(ident, logstat, logfac)
+static void
+openlog_unlocked(ident, logstat, logfac)
 	const char *ident;
 	int logstat, logfac;
 {
@@ -384,12 +413,25 @@
 }
 
 void
+openlog(ident, logstat, logfac)
+	const char *ident;
+	int logstat, logfac;
+{
+	THREAD_LOCK();
+	openlog_unlocked(ident, logstat, logfac);
+	THREAD_UNLOCK();
+}
+
+
+void
 closelog()
 {
+	THREAD_LOCK();
 	(void)_close(LogFile);
 	LogFile = -1;
 	LogTag = NULL;
 	status = NOCONN;
+	THREAD_UNLOCK();
 }
 
 /* setlogmask -- set the log mask level */
@@ -399,8 +441,10 @@
 {
 	int omask;
 
+	THREAD_LOCK();
 	omask = LogMask;
 	if (pmask != 0)
 		LogMask = pmask;
+	THREAD_UNLOCK();
 	return (omask);
 }

==== //depot/projects/wifi/lib/libc/net/inet6_option_space.3#2 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     $Id: inet6_option_space.3,v 1.4 2000/02/05 10:32:24 jinmei Exp $
-.\" $FreeBSD: src/lib/libc/net/inet6_option_space.3,v 1.12 2003/09/10 19:24:32 ru Exp $
+.\" $FreeBSD: src/lib/libc/net/inet6_option_space.3,v 1.13 2004/12/29 02:18:24 trhodes Exp $
 .\"
 .Dd December 10, 1999
 .Dt INET6_OPTION_SPACE 3
@@ -397,7 +397,7 @@
 .Fa *tptrp
 must be set to
 .Dv NULL .
-.Pa
+.Pp
 This function starts searching for an option of the specified type
 beginning after the value of
 .Fa *tptrp .

==== //depot/projects/wifi/lib/libc/regex/engine.c#3 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.15 2004/11/21 03:14:32 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.16 2004/12/30 14:27:57 dds Exp $");
 
 /*
  * The matching engine and friends.  This file is #included by regexec.c
@@ -255,6 +255,10 @@
 	for (;;) {
 		endp = fast(m, start, stop, gf, gl);
 		if (endp == NULL) {		/* a miss */
+			if (m->pmatch != NULL)
+				free((char *)m->pmatch);
+			if (m->lastpos != NULL)
+				free((char *)m->lastpos);
 			STATETEARDOWN(m);
 			return(REG_NOMATCH);
 		}

==== //depot/projects/wifi/lib/libc/sys/chmod.2#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)chmod.2	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/chmod.2,v 1.31 2004/07/02 23:52:13 ru Exp $
+.\" $FreeBSD: src/lib/libc/sys/chmod.2,v 1.32 2004/12/29 20:00:29 trhodes Exp $
 .\"
-.Dd June 4, 1993
+.Dd December 29, 2004
 .Dt CHMOD 2
 .Os
 .Sh NAME
@@ -101,22 +101,21 @@
 
 #define S_ISUID 0004000    /* set user id on execution */
 #define S_ISGID 0002000    /* set group id on execution */
-#define S_ISVTX 0001000    /* sticky bit */
-#ifndef _POSIX_SOURCE
-#define S_ISTXT 0001000
+#ifndef __BSD_VISIBLE
+#define S_ISTXT 0001000    /* sticky bit */
 #endif
 .Ed
 .Pp
 The
 .Fx
 VM system totally ignores the sticky bit
-.Pq Dv ISVTX
+.Pq Dv ISTXT
 for executables.
 On UFS-based file systems (FFS, LFS) the sticky
 bit may only be set upon directories.
 .Pp
 If mode
-.Dv ISVTX
+.Dv ISTXT
 (the `sticky bit') is set on a directory,
 an unprivileged user may not delete or rename
 files of other users in that directory.

==== //depot/projects/wifi/lib/libdisk/libdisk.3#2 (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/lib/libdisk/libdisk.3,v 1.32 2004/07/02 23:52:15 ru Exp $
+.\" $FreeBSD: src/lib/libdisk/libdisk.3,v 1.33 2004/12/29 02:18:24 trhodes Exp $
 .\" "
 .Dd March 15, 1996
 .Dt LIBDISK 3
@@ -169,7 +169,7 @@
 .Ql whole, unknown, fat, freebsd, extended, part, unused .
 .Pp
 These are the valid
-.Ql flag
+.Ql flags
 values for a
 .Ql struct chunk .
 .Bl -tag -offset indent -width CHUNK_BSD_COMPATXX
@@ -293,9 +293,9 @@
 up to next track according to the BIOS geometry.
 .Pp
 .Fn Prev_Track_Aligned
-checks if
+rounds
 .Ql offset
-is aligned on a track according to the BIOS geometry.
+up to previous track according to the BIOS geometry.
 .Pp
 .Fn Create_Chunk_DWIM
 creates a partition inside the given parent of the given size, and

==== //depot/projects/wifi/lib/libipx/ipx.3#2 (text+ko) ====

@@ -29,7 +29,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libipx/ipx.3,v 1.14 2004/07/02 23:52:15 ru Exp $
+.\" $FreeBSD: src/lib/libipx/ipx.3,v 1.15 2004/12/29 02:18:24 trhodes Exp $
 .\"
 .Dd June 4, 1993
 .Dt IPX 3
@@ -91,7 +91,7 @@
 quantity to be zero extended in the high-network-order bytes.
 Next, the field is inspected for hyphens, in which case
 the field is assumed to be a number in decimal notation
-with hyphens separating the millenia.
+with hyphens separating the millennia.
 Next, the field is assumed to be a number:
 It is interpreted
 as hexadecimal if there is a leading

==== //depot/projects/wifi/lib/libstand/libstand.3#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/lib/libstand/libstand.3,v 1.31 2004/08/06 15:29:54 roam Exp $
+.\" $FreeBSD: src/lib/libstand/libstand.3,v 1.32 2004/12/29 02:18:24 trhodes Exp $
 .\"
 .Dd August 6, 2004
 .Dt LIBSTAND 3
@@ -580,6 +580,7 @@
 .Ft int
 .Fn devclose "struct open_file *of"
 .Xc
+.Pp
 Close the device allocated for
 .Fa of .
 The device driver itself will already have been called for the close; this call

==== //depot/projects/wifi/lib/libutil/login_cap.3#2 (text+ko) ====

@@ -17,7 +17,7 @@
 .\" 5. Modifications may be freely made to this file providing the above
 .\"    conditions are met.
 .\"
-.\" $FreeBSD: src/lib/libutil/login_cap.3,v 1.33 2004/07/03 22:30:10 ru Exp $
+.\" $FreeBSD: src/lib/libutil/login_cap.3,v 1.34 2004/12/29 02:18:24 trhodes Exp $
 .\"
 .Dd December 27, 1996
 .Os
@@ -322,7 +322,7 @@
 .Fn login_getstyle .
 .It Fn login_getpath
 This function returns a list of directories separated by colons
-.Ql &: .
+.Ql \&: .
 Capability tags for which this function is called consist of a list of
 directories separated by spaces.
 .It Fn login_getcaptime
@@ -401,7 +401,7 @@
 default to "passwd" as the authorisation list.
 .It
 If 'style' is not NULL or empty, look for it in the list of authorisation
-methods found from the pprevious step.
+methods found from the previous step.
 If 'style' is NULL or an empty string, then default to "passwd"
 authorisation.
 .It

==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#8 (text+ko) ====

@@ -29,7 +29,7 @@
 
 <sect1 id="support">
   <sect1info>
-    <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.269 2004/12/17 18:37:58 brueffer Exp $</pubdate>

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


More information about the p4-projects mailing list