PERFORCE change 123620 for review

Xin LI delphij at FreeBSD.org
Tue Jul 17 05:25:39 UTC 2007


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

Change 123620 by delphij at delphij_odin on 2007/07/17 05:25:15

	IFC

Affected files ...

.. //depot/projects/delphij_fork/ObsoleteFiles.inc#4 integrate
.. //depot/projects/delphij_fork/etc/mtree/BSD.include.dist#3 integrate
.. //depot/projects/delphij_fork/etc/mtree/BSD.usr.dist#2 integrate
.. //depot/projects/delphij_fork/include/Makefile#3 integrate
.. //depot/projects/delphij_fork/lib/Makefile#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/Makefile#4 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_entry.3#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_entry.c#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_entry.h#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_read_support_format_tar.c#3 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_read_support_format_zip.c#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_string.c#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_string_sprintf.c#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/archive_write_disk.c#2 integrate
.. //depot/projects/delphij_fork/lib/libarchive/test/main.c#4 integrate
.. //depot/projects/delphij_fork/lib/libarchive/test/test.h#4 integrate
.. //depot/projects/delphij_fork/lib/libarchive/test/test_read_format_gtar_sparse.c#4 integrate
.. //depot/projects/delphij_fork/lib/libarchive/test/test_tar_filenames.c#3 integrate
.. //depot/projects/delphij_fork/lib/libarchive/test/test_write_disk_perms.c#3 integrate
.. //depot/projects/delphij_fork/lib/libc/sys/ioctl.2#2 integrate
.. //depot/projects/delphij_fork/libexec/rtld-elf/powerpc/reloc.c#2 integrate
.. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/relnotes/article.sgml#4 integrate
.. //depot/projects/delphij_fork/rescue/rescue/Makefile#2 integrate
.. //depot/projects/delphij_fork/sbin/atm/Makefile#2 integrate
.. //depot/projects/delphij_fork/share/examples/Makefile#2 integrate
.. //depot/projects/delphij_fork/share/man/man4/ipmi.4#2 integrate
.. //depot/projects/delphij_fork/share/man/man4/snd_hda.4#2 integrate
.. //depot/projects/delphij_fork/share/man/man7/ports.7#2 integrate
.. //depot/projects/delphij_fork/sys/conf/NOTES#4 integrate
.. //depot/projects/delphij_fork/sys/conf/files#4 integrate
.. //depot/projects/delphij_fork/sys/conf/options#4 integrate
.. //depot/projects/delphij_fork/sys/dev/firewire/firewire.c#3 integrate
.. //depot/projects/delphij_fork/sys/dev/firewire/firewirereg.h#2 integrate
.. //depot/projects/delphij_fork/sys/dev/ipmi/ipmi_isa.c#2 integrate
.. //depot/projects/delphij_fork/sys/gnu/fs/ext2fs/ext2_vfsops.c#2 integrate
.. //depot/projects/delphij_fork/sys/ia64/ia64/syscall.S#2 integrate
.. //depot/projects/delphij_fork/sys/kern/kern_event.c#2 integrate
.. //depot/projects/delphij_fork/sys/kern/kern_resource.c#3 integrate
.. //depot/projects/delphij_fork/sys/kern/vfs_mount.c#2 integrate
.. //depot/projects/delphij_fork/sys/modules/Makefile#2 integrate
.. //depot/projects/delphij_fork/sys/modules/netgraph/atm/Makefile#2 integrate
.. //depot/projects/delphij_fork/sys/netatm/atm_proto.c#2 integrate
.. //depot/projects/delphij_fork/sys/vm/vm_page.c#3 integrate
.. //depot/projects/delphij_fork/sys/vm/vm_phys.c#2 integrate
.. //depot/projects/delphij_fork/sys/vm/vm_phys.h#2 integrate
.. //depot/projects/delphij_fork/sys/vm/vm_zeroidle.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/kdump/mkioctls#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/atalk.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/bpf.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/if.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/inet.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/inet6.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/ipsec.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/ipx.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/main.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/mbuf.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/mcast.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/mroute.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/mroute6.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/netgraph.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/netstat.h#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/pfkey.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/route.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/sctp.c#2 integrate
.. //depot/projects/delphij_fork/usr.bin/netstat/unix.c#2 integrate
.. //depot/projects/delphij_fork/usr.sbin/Makefile#2 integrate

Differences ...

==== //depot/projects/delphij_fork/ObsoleteFiles.inc#4 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.105 2007/07/12 00:02:12 dougb Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.106 2007/07/15 22:47:33 rwatson Exp $
 #
 # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
 # directories (OLD_DIRS) which should get removed at an update. Recently
@@ -14,6 +14,79 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20070715: netatm temporarily disconnected
+OLD_FILES+=rescue/atm
+OLD_FILES+=rescue/fore_dnld
+OLD_FILES+=rescue/ilmid
+OLD_FILES+=sbin/atm
+OLD_FILES+=sbin/fore_dnld
+OLD_FILES+=sbin/ilmid
+OLD_FILES+=usr/include/libatm.h
+OLD_FILES+=usr/include/netatm/atm.h
+OLD_FILES+=usr/include/netatm/atm_cm.h
+OLD_FILES+=usr/include/netatm/atm_if.h
+OLD_FILES+=usr/include/netatm/atm_ioctl.h
+OLD_FILES+=usr/include/netatm/atm_pcb.h
+OLD_FILES+=usr/include/netatm/atm_sap.h
+OLD_FILES+=usr/include/netatm/atm_sigmgr.h
+OLD_FILES+=usr/include/netatm/atm_stack.h
+OLD_FILES+=usr/include/netatm/atm_sys.h
+OLD_FILES+=usr/include/netatm/atm_var.h
+OLD_FILES+=usr/include/netatm/atm_vc.h
+OLD_FILES+=usr/include/netatm/ipatm/ipatm.h
+OLD_FILES+=usr/include/netatm/ipatm/ipatm_serv.h
+OLD_FILES+=usr/include/netatm/ipatm/ipatm_var.h
+OLD_FILES+=usr/include/netatm/port.h
+OLD_FILES+=usr/include/netatm/queue.h
+OLD_FILES+=usr/include/netatm/sigpvc/sigpvc_var.h
+OLD_FILES+=usr/include/netatm/spans/spans_cls.h
+OLD_FILES+=usr/include/netatm/spans/spans_kxdr.h
+OLD_FILES+=usr/include/netatm/spans/spans_var.h
+OLD_FILES+=usr/include/netatm/uni/sscf_uni.h
+OLD_FILES+=usr/include/netatm/uni/sscf_uni_var.h
+OLD_FILES+=usr/include/netatm/uni/sscop.h
+OLD_FILES+=usr/include/netatm/uni/sscop_misc.h
+OLD_FILES+=usr/include/netatm/uni/sscop_pdu.h
+OLD_FILES+=usr/include/netatm/uni/sscop_var.h
+OLD_FILES+=usr/include/netatm/uni/uni.h
+OLD_FILES+=usr/include/netatm/uni/uniip_var.h
+OLD_FILES+=usr/include/netatm/uni/unisig.h
+OLD_FILES+=usr/include/netatm/uni/unisig_decode.h
+OLD_FILES+=usr/include/netatm/uni/unisig_mbuf.h
+OLD_FILES+=usr/include/netatm/uni/unisig_msg.h
+OLD_FILES+=usr/include/netatm/uni/unisig_print.h
+OLD_FILES+=usr/include/netatm/uni/unisig_var.h
+OLD_FILES+=usr/lib/libatm.a
+OLD_FILES+=usr/lib/libatm_p.a
+OLD_FILES+=usr/sbin/atmarpd
+OLD_FILES+=usr/sbin/scspd
+OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atm.8.gz
+OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atmarpd.8.gz
+OLD_FILES+=usr/share/man/en.ISO8859-1/man8/fore_dnld.8.gz
+OLD_FILES+=usr/share/man/en.ISO8859-1/man8/ilmid.8.gz
+OLD_FILES+=usr/share/man/en.ISO8859-1/man8/scspd.8.gz
+OLD_FILES+=usr/share/man/man8/atm.8.gz
+OLD_FILES+=usr/share/man/man8/atmarpd.8.gz
+OLD_FILES+=usr/share/man/man8/fore_dnld.8.gz
+OLD_FILES+=usr/share/man/man8/ilmid.8.gz
+OLD_FILES+=usr/share/man/man8/scspd.8.gz
+OLD_FILES+=usr/share/examples/atm/NOTES
+OLD_FILES+=usr/share/examples/atm/README
+OLD_FILES+=usr/share/examples/atm/Startup
+OLD_FILES+=usr/share/examples/atm/atm-config.sh
+OLD_FILES+=usr/share/examples/atm/atm-sockets.txt
+OLD_FILES+=usr/share/examples/atm/cpcs-design.txt
+OLD_FILES+=usr/share/examples/atm/fore-microcode.txt
+OLD_FILES+=usr/share/examples/atm/sscf-design.txt
+OLD_FILES+=usr/share/examples/atm/sscop-design.txt
+OLD_LIBS+=lib/libatm.so.5
+OLD_LIBS+=usr/lib/libatm.so
+OLD_DIRS+=usr/include/netatm/sigpvc
+OLD_DIRS+=usr/include/netatm/spans
+OLD_DIRS+=usr/include/netatm/ipatm
+OLD_DIRS+=usr/include/netatm/uni
+OLD_DIRS+=usr/include/netatm
+OLD_DIRS+=usr/share/examples/atm
 # 20070705: I4B headers repo-copied to include/i4b/
 .if ${TARGET_ARCH} == "i386"
 OLD_FILES+=usr/include/machine/i4b_cause.h

==== //depot/projects/delphij_fork/etc/mtree/BSD.include.dist#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.117 2007/07/06 07:20:59 bz Exp $
+# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.118 2007/07/14 21:49:21 rwatson Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -205,16 +205,17 @@
     ..
     netatalk
     ..
-    netatm
-        ipatm
-        ..
-        sigpvc
-        ..
-        spans
-        ..
-        uni
-        ..
-    ..
+# Disabled in 7.0 as netatm is not MPSAFE.
+#    netatm
+#        ipatm
+#        ..
+#        sigpvc
+#        ..
+#        spans
+#        ..
+#        uni
+#        ..
+#    ..
     netgraph
         atm
         ..

==== //depot/projects/delphij_fork/etc/mtree/BSD.usr.dist#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.326 2007/03/02 14:56:14 flz Exp $
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.327 2007/07/14 21:49:21 rwatson Exp $
 #
 # Please see the file src/etc/mtree/README before making changes to this file.
 #
@@ -187,8 +187,9 @@
             ..
             IPv6
             ..
-            atm
-            ..
+# Disabled in 7.0 as netatm is not MPSAFE.
+#            atm
+#            ..
             bc
             ..
             bootforth

==== //depot/projects/delphij_fork/include/Makefile#3 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.2 (Berkeley) 1/4/94
-# $FreeBSD: src/include/Makefile,v 1.273 2007/07/06 07:20:59 bz Exp $
+# $FreeBSD: src/include/Makefile,v 1.274 2007/07/14 21:49:22 rwatson Exp $
 #
 # Doing a "make install" builds /usr/include.
 
@@ -36,10 +36,11 @@
 LHDRS=	aio.h errno.h fcntl.h linker_set.h poll.h stdint.h syslog.h \
 	termios.h ucontext.h
 
-LDIRS=	bsm cam geom net net80211 netatalk netatm netgraph netinet netinet6 \
+LDIRS=	bsm cam geom net net80211 netatalk netgraph netinet netinet6 \
 	netipsec ${_netipx} netnatm ${_netncp} netsmb \
 	nfs nfsclient nfsserver \
 	pccard sys vm
+#LDIRS+=	netatm
 
 LSUBDIRS=	cam/scsi \
 	dev/acpica dev/an dev/bktr dev/firewire dev/hwpmc \
@@ -49,12 +50,12 @@
 	${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \
 	geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \
 	geom/mirror geom/nop geom/raid3 geom/shsec geom/stripe \
-	netatm/ipatm netatm/sigpvc netatm/spans netatm/uni \
 	netgraph/atm netgraph/netflow \
 	security/audit \
 	security/mac_biba security/mac_bsdextended security/mac_lomac \
 	security/mac_mls security/mac_partition \
 	ufs/ffs ufs/ufs
+#LSUBDIRS+=	netatm/ipatm netatm/sigpvc netatm/spans netatm/uni
 
 .if ${MACHINE_ARCH} == "powerpc"
 _dev_powermac_nvram=	dev/powermac_nvram

==== //depot/projects/delphij_fork/lib/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/lib/Makefile,v 1.221 2007/05/19 04:55:14 kan Exp $
+# $FreeBSD: src/lib/Makefile,v 1.222 2007/07/14 21:49:22 rwatson Exp $
 
 .include <bsd.own.mk>
 
@@ -48,7 +48,8 @@
 .endif
 
 .if ${MK_ATM} != "no"
-_libatm=	libatm
+# Disabled in 7.0 as netatm is not MPSAFE.
+#_libatm=	libatm
 _libngatm=	libngatm
 .endif
 

==== //depot/projects/delphij_fork/lib/libarchive/Makefile#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libarchive/Makefile,v 1.76 2007/07/12 15:00:28 cperciva Exp $
+# $FreeBSD: src/lib/libarchive/Makefile,v 1.77 2007/07/15 19:10:34 kientzle Exp $
 
 LIB=	archive
 DPADD=	${LIBBZ2} ${LIBZ}
@@ -121,11 +121,13 @@
 MLINKS+=	archive_entry.3 archive_entry_clear.3
 MLINKS+=	archive_entry.3 archive_entry_clone.3
 MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
+MLINKS+=	archive_entry.3 archive_entry_copy_gname.3
 MLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
 MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
 MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
 MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
 MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
+MLINKS+=	archive_entry.3 archive_entry_copy_uname.3
 MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
 MLINKS+=	archive_entry.3 archive_entry_dev.3
 MLINKS+=	archive_entry.3 archive_entry_devmajor.3

==== //depot/projects/delphij_fork/lib/libarchive/archive_entry.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/libarchive/archive_entry.3,v 1.14 2007/05/29 01:00:18 kientzle Exp $
+.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.15 2007/07/15 19:10:34 kientzle Exp $
 .\"
 .Dd December 15, 2003
 .Dt archive_entry 3
@@ -41,6 +41,7 @@
 .Nm archive_entry_clear ,
 .Nm archive_entry_clone ,
 .Nm archive_entry_copy_fflags_text_w ,
+.Nm archive_entry_copy_gname ,
 .Nm archive_entry_copy_gname_w ,
 .Nm archive_entry_copy_hardlink ,
 .Nm archive_entry_copy_hardlink_w ,
@@ -48,6 +49,7 @@
 .Nm archive_entry_copy_stat ,
 .Nm archive_entry_copy_symlink ,
 .Nm archive_entry_copy_symlink_w ,
+.Nm archive_entry_copy_uname ,
 .Nm archive_entry_copy_uname_w ,
 .Nm archive_entry_dev ,
 .Nm archive_entry_devmajor ,
@@ -125,6 +127,8 @@
 .Ft const wchar_t *
 .Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const wchar_t *"
 .Ft void
+.Fn archive_entry_copy_gname "struct archive_entry *" "const char *"
+.Ft void
 .Fn archive_entry_copy_gname_w "struct archive_entry *" "const wchar_t *"
 .Ft void
 .Fn archive_entry_copy_hardlink "struct archive_entry *" "const char *"
@@ -139,6 +143,8 @@
 .Ft void
 .Fn archive_entry_copy_symlink_w "struct archive_entry *" "const wchar_t *"
 .Ft void
+.Fn archive_entry_copy_uname "struct archive_entry *" "const char *"
+.Ft void
 .Fn archive_entry_copy_uname_w "struct archive_entry *" "const wchar_t *"
 .Ft dev_t
 .Fn archive_entry_dev "struct archive_entry *"

==== //depot/projects/delphij_fork/lib/libarchive/archive_entry.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.43 2007/05/29 01:00:18 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.44 2007/07/15 19:10:34 kientzle Exp $");
 
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
@@ -652,6 +652,12 @@
 }
 
 void
+archive_entry_copy_gname(struct archive_entry *entry, const char *name)
+{
+	aes_copy_mbs(&entry->ae_gname, name);
+}
+
+void
 archive_entry_copy_gname_w(struct archive_entry *entry, const wchar_t *name)
 {
 	aes_copy_wcs(&entry->ae_gname, name);
@@ -836,6 +842,12 @@
 }
 
 void
+archive_entry_copy_uname(struct archive_entry *entry, const char *name)
+{
+	aes_copy_mbs(&entry->ae_uname, name);
+}
+
+void
 archive_entry_copy_uname_w(struct archive_entry *entry, const wchar_t *name)
 {
 	aes_copy_wcs(&entry->ae_uname, name);

==== //depot/projects/delphij_fork/lib/libarchive/archive_entry.h#2 (text+ko) ====

@@ -22,7 +22,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/libarchive/archive_entry.h,v 1.22 2007/05/29 01:00:18 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.23 2007/07/15 19:10:34 kientzle Exp $
  */
 
 #ifndef ARCHIVE_ENTRY_H_INCLUDED
@@ -135,6 +135,7 @@
 	    const wchar_t *);
 void	archive_entry_set_gid(struct archive_entry *, gid_t);
 void	archive_entry_set_gname(struct archive_entry *, const char *);
+void	archive_entry_copy_gname(struct archive_entry *, const char *);
 void	archive_entry_copy_gname_w(struct archive_entry *, const wchar_t *);
 void	archive_entry_set_hardlink(struct archive_entry *, const char *);
 void	archive_entry_copy_hardlink(struct archive_entry *, const char *);
@@ -156,6 +157,7 @@
 void	archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *);
 void	archive_entry_set_uid(struct archive_entry *, uid_t);
 void	archive_entry_set_uname(struct archive_entry *, const char *);
+void	archive_entry_copy_uname(struct archive_entry *, const char *);
 void	archive_entry_copy_uname_w(struct archive_entry *, const wchar_t *);
 
 /*

==== //depot/projects/delphij_fork/lib/libarchive/archive_read_support_format_tar.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.59 2007/07/14 05:53:51 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.60 2007/07/15 19:13:59 kientzle Exp $");
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -895,8 +895,14 @@
 		return (ARCHIVE_FATAL);
 	}
 
+	/* Fail if we can't make our buffer big enough. */
+	if (archive_string_ensure(as, size+1) == NULL) {
+		archive_set_error(&a->archive, ENOMEM,
+		    "No memory");
+		return (ARCHIVE_FATAL);
+	}
+
 	/* Read the body into the string. */
-	archive_string_ensure(as, size+1);
 	padded_size = (size + 511) & ~ 511;
 	dest = as->s;
 	while (padded_size > 0) {
@@ -2020,7 +2026,11 @@
 	}
 	/* Otherwise, we need to accumulate in a line buffer. */
 	for (;;) {
-		archive_string_ensure(&tar->line, total_size + bytes_read);
+		if (archive_string_ensure(&tar->line, total_size + bytes_read) == NULL) {
+			archive_set_error(&a->archive, ENOMEM,
+			    "Can't allocate working buffer");
+			return (ARCHIVE_FATAL);
+		}
 		memcpy(tar->line.s + total_size, t, bytes_read);
 		(a->decompressor->consume)(a, bytes_read);
 		total_size += bytes_read;

==== //depot/projects/delphij_fork/lib/libarchive/archive_read_support_format_zip.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.13 2007/05/29 01:00:19 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.14 2007/07/15 19:13:59 kientzle Exp $");
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -302,7 +302,8 @@
 		    "Truncated ZIP file header");
 		return (ARCHIVE_FATAL);
 	}
-	archive_string_ensure(&zip->pathname, zip->filename_length);
+	if (archive_string_ensure(&zip->pathname, zip->filename_length) == NULL)
+		__archive_errx(1, "Out of memory");
 	archive_strncpy(&zip->pathname, (const char *)h, zip->filename_length);
 	(a->decompressor->consume)(a, zip->filename_length);
 	archive_entry_set_pathname(entry, zip->pathname.s);

==== //depot/projects/delphij_fork/lib/libarchive/archive_string.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_string.c,v 1.10 2007/05/29 01:00:19 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_string.c,v 1.11 2007/07/15 19:13:59 kientzle Exp $");
 
 /*
  * Basic resizable string support, to simplify manipulating arbitrary-sized
@@ -44,7 +44,8 @@
 struct archive_string *
 __archive_string_append(struct archive_string *as, const char *p, size_t s)
 {
-	__archive_string_ensure(as, as->length + s + 1);
+	if (__archive_string_ensure(as, as->length + s + 1) == NULL)
+		__archive_errx(1, "Out of memory");
 	memcpy(as->s + as->length, p, s);
 	as->s[as->length + s] = 0;
 	as->length += s;
@@ -54,7 +55,8 @@
 void
 __archive_string_copy(struct archive_string *dest, struct archive_string *src)
 {
-	__archive_string_ensure(dest, src->length + 1);
+	if (__archive_string_ensure(dest, src->length + 1) == NULL)
+		__archive_errx(1, "Out of memory");
 	memcpy(dest->s, src->s, src->length);
 	dest->length = src->length;
 	dest->s[dest->length] = 0;
@@ -69,6 +71,7 @@
 		free(as->s);
 }
 
+/* Returns NULL on any allocation failure. */
 struct archive_string *
 __archive_string_ensure(struct archive_string *as, size_t s)
 {
@@ -80,10 +83,8 @@
 	while (as->buffer_length < s)
 		as->buffer_length *= 2;
 	as->s = (char *)realloc(as->s, as->buffer_length);
-	/* TODO: Return null instead and fix up all of our callers to
-	 * handle this correctly. */
 	if (as->s == NULL)
-		__archive_errx(1, "Out of memory");
+		return (NULL);
 	return (as);
 }
 

==== //depot/projects/delphij_fork/lib/libarchive/archive_string_sprintf.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_string_sprintf.c,v 1.8 2007/01/09 08:05:55 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_string_sprintf.c,v 1.9 2007/07/15 19:13:59 kientzle Exp $");
 
 /*
  * The use of printf()-family functions can be troublesome
@@ -42,6 +42,7 @@
 #include <stdio.h>
 
 #include "archive_string.h"
+#include "archive_private.h"
 
 /*
  * Like 'vsprintf', but ensures the target is big enough, resizing if
@@ -56,7 +57,8 @@
 	uintmax_t u; /* Unsigned integer temp. */
 	const char *p, *p2;
 
-	__archive_string_ensure(as, 64);
+	if (__archive_string_ensure(as, 64) == NULL)
+		__archive_errx(1, "Out of memory");
 
 	if (fmt == NULL) {
 		as->s[0] = 0;

==== //depot/projects/delphij_fork/lib/libarchive/archive_write_disk.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.12 2007/05/29 01:00:19 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.13 2007/07/15 19:13:59 kientzle Exp $");
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -610,7 +610,10 @@
 	a->lookup_uid = trivial_lookup_uid;
 	a->lookup_gid = trivial_lookup_gid;
 	a->user_uid = geteuid();
-	archive_string_ensure(&a->path_safe, 64);
+	if (archive_string_ensure(&a->path_safe, 512) == NULL) {
+		free(a);
+		return (NULL);
+	}
 	return (&a->archive);
 }
 

==== //depot/projects/delphij_fork/lib/libarchive/test/main.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
 #include <time.h>
 
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.6 2007/07/13 15:09:07 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.7 2007/07/14 17:52:01 kientzle Exp $");
 
 /* Default is to crash and try to force a core dump on failure. */
 static int dump_on_failure = 1;
@@ -60,12 +60,59 @@
  */
 static char msg[4096];
 
+/*
+ * For each test source file, we remember how many times each
+ * failure was reported.
+ */
+static const char *failed_filename;
+static struct line {
+	int line;
+	int count;
+}  failed_lines[1000];
+
 
+/* Count this failure; return the number of previous failures. */
+static int
+previous_failures(const char *filename, int line)
+{
+	int i;
+	int count;
+
+	if (failed_filename == NULL || strcmp(failed_filename, filename) != 0)
+		memset(failed_lines, 0, sizeof(failed_lines));
+	failed_filename = filename;
+
+	for (i = 0; i < sizeof(failed_lines)/sizeof(failed_lines[0]); i++) {
+		if (failed_lines[i].line == line) {
+			count = failed_lines[i].count;
+			failed_lines[i].count++;
+			return (count);
+		}
+		if (failed_lines[i].line == 0) {
+			failed_lines[i].line = line;
+			failed_lines[i].count = 1;
+			return (0);
+		}
+	}
+}
+
 /* Inform user that we're skipping a test. */
+static const char *skipped_filename;
+static int skipped_line;
+void skipping_setup(const char *filename, int line)
+{
+	skipped_line = line;
+}
 void
-skipping(const char *fmt, ...)
+test_skipping(const char *fmt, ...)
 {
+	int i;
+	int line = skipped_line;
 	va_list ap;
+
+	if (previous_failures(skipped_filename, skipped_line))
+		return;
+
 	va_start(ap, fmt);
 	fprintf(stderr, " *** SKIPPING: ");
 	vfprintf(stderr, fmt, ap);
@@ -76,8 +123,10 @@
 
 /* Common handling of failed tests. */
 static void
-test_failed(struct archive *a)
+test_failed(struct archive *a, int line)
 {
+	int i;
+
 	failures ++;
 
 	if (msg[0] != '\0') {
@@ -95,6 +144,39 @@
 	}
 }
 
+/* Summarize repeated failures in the just-completed test file. */
+int
+summarize_comparator(const void *a0, const void *b0)
+{
+	const struct line *a = a0, *b = b0;
+	if (a->line == 0 && b->line == 0)
+		return (0);
+	if (a->line == 0)
+		return (1);
+	if (b->line == 0)
+		return (-1);
+	return (a->line - b->line);
+}
+
+void
+summarize(const char *filename)
+{
+	int i;
+
+	qsort(failed_lines, sizeof(failed_lines)/sizeof(failed_lines[0]),
+	    sizeof(failed_lines[0]), summarize_comparator);
+	for (i = 0; i < sizeof(failed_lines)/sizeof(failed_lines[0]); i++) {
+		if (failed_lines[i].line == 0)
+			break;
+		if (failed_lines[i].count > 1)
+			fprintf(stderr, "%s:%d: Failed %d times\n",
+			    failed_filename, failed_lines[i].line,
+			    failed_lines[i].count);
+	}
+	/* Clear the failure history for the next file. */
+	memset(failed_lines, 0, sizeof(failed_lines));
+}
+
 /* Set up a message to display only after a test fails. */
 void
 failure(const char *fmt, ...)
@@ -113,9 +195,11 @@
 		msg[0] = '\0';
 		return;
 	}
+	if (previous_failures(file, line))
+		return;
 	fprintf(stderr, "%s:%d: Assertion failed\n", file, line);
 	fprintf(stderr, "   Condition: %s\n", condition);
-	test_failed(a);
+	test_failed(a, line);
 }
 
 /* assertEqualInt() displays the values of the two integers. */
@@ -127,11 +211,13 @@
 		msg[0] = '\0';
 		return;
 	}
+	if (previous_failures(file, line))
+		return;
 	fprintf(stderr, "%s:%d: Assertion failed: Ints not equal\n",
 	    file, line);
 	fprintf(stderr, "      %s=%d\n", e1, v1);
 	fprintf(stderr, "      %s=%d\n", e2, v2);
-	test_failed(a);
+	test_failed(a, line);
 }
 
 /* assertEqualString() displays the values of the two strings. */
@@ -150,11 +236,13 @@
 		msg[0] = '\0';
 		return;
 	}
+	if (previous_failures(file, line))
+		return;
 	fprintf(stderr, "%s:%d: Assertion failed: Strings not equal\n",
 	    file, line);
 	fprintf(stderr, "      %s = \"%s\"\n", e1, v1);
 	fprintf(stderr, "      %s = \"%s\"\n", e2, v2);
-	test_failed(a);
+	test_failed(a, line);
 }
 
 /* assertEqualWString() displays the values of the two strings. */
@@ -168,11 +256,13 @@
 		msg[0] = '\0';
 		return;
 	}
+	if (previous_failures(file, line))
+		return;
 	fprintf(stderr, "%s:%d: Assertion failed: Unicode strings not equal\n",
 	    file, line);
 	fwprintf(stderr, L"      %s = \"%ls\"\n", e1, v1);
 	fwprintf(stderr, L"      %s = \"%ls\"\n", e2, v2);
-	test_failed(a);
+	test_failed(a, line);
 }
 
 /*
@@ -217,6 +307,7 @@
 		exit(1);
 	}
 	(*tests[i].func)();
+	summarize(tests[i].name);
 	return (failures == failures_before ? 0 : 1);
 }
 

==== //depot/projects/delphij_fork/lib/libarchive/test/test.h#4 (text+ko) ====

@@ -22,7 +22,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/libarchive/test/test.h,v 1.5 2007/07/13 15:12:52 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/test/test.h,v 1.6 2007/07/14 17:52:01 kientzle Exp $
  */
 
 /* Every test program should #include "test.h" as the first thing. */
@@ -116,9 +116,19 @@
 #define assertEqualWString(v1,v2)   \
   test_assert_equal_wstring(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL)
 
+/*
+ * This would be simple with C99 variadic macros, but I don't want to
+ * require that.  Instead, I insert a function call before each
+ * skipping() call to pass the file and line information down.  Crude,
+ * but effective.
+ */
+#define skipping	\
+  skipping_setup(__FILE__, __LINE__);test_skipping
+
 /* Function declarations.  These are defined in test_utility.c. */
 void failure(const char *fmt, ...);
-void skipping(const char *fmt, ...);
+void skipping_setup(const char *, int);
+void test_skipping(const char *fmt, ...);
 void test_assert(const char *, int, int, const char *, struct archive *);
 void test_assert_equal_int(const char *, int, int, const char *, int, const char *, struct archive *);
 void test_assert_equal_string(const char *, int, const char *v1, const char *, const char *v2, const char *, struct archive *);

==== //depot/projects/delphij_fork/lib/libarchive/test/test_read_format_gtar_sparse.c#4 (text+ko) ====

@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.3 2007/07/13 15:16:26 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_gtar_sparse.c,v 1.4 2007/07/14 17:54:14 kientzle Exp $");
 
 /*
  * Each of the following is an archive of a single sparse file
@@ -91,7 +91,12 @@
 164,'I',243,147,'H','$',18,227,240,1,'Q',127,'c',137,0,14,0,0};
 
 /* GNU tar "1.0" posix format, as written by GNU tar 1.16.1. */
-#if 1
+/*
+ * Uncompressed, as that exercises some of the code better
+ * than compressed does.  (The uncompression layers try to work with
+ * large blocks and the parsing code here has sections that have
+ * to work harder if reads return small pieces of data.)
+ */
 static unsigned char archive_1_0[] = {
 '.','/','P','a','x','H','e','a','d','e','r','s','.','7','2','6','6','8','/',
 's','p','a','r','s','e',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -229,25 +234,6 @@
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 
-#else
-static unsigned char archive_1_0[] = {
-31,139,8,0,210,221,'l','F',0,3,237,148,207,'N',195,'0',12,198,'s',206,'S',
-244,9,210,216,206,159,238,208,'+',236,132,144,16,15,16,'A',14,'E',219,'@',
-201,'&','M','<','=','i','G','Q',133,'4','v','`','l',170,240,239,'b',235,'s',
-20,'9','q',190,168,250,'>',236,151,'1','<',199,148,149,'G',231,154,':',191,
-133,148,163,'8',31,186,224,140,233,'#','x',171,167,'q',0,193,10,208,142,8,
-172,'3',30,133,6,178,218,139,'j',127,198,30,142,178,203,219,144,'J','+',191,
-221,231,243,',','_','q','&',' ','V',183,'w',143,234,'0','s',181,14,'/',175,
-169,5,249,'M',237,'6','E',213,18,221,'T',221,132,'u','l',15,185,'$',152,'V',
-'R',12,171,220,189,199,150,192,'X',143,141,'D',']',133,'m','W',150,3,'4',
-'`','i',225,200,244,218,211,'T','3',206,202,'k','_',198,'?','D',213,'e','p',
-15,195,220,'n',186,'U',252,147,'/',224,132,255,169,183,203,232,127,4,'(',
-254,183,224,181,168,'.','b',162,209,255,229,'-',254,184,238,'T','}',166,254,
-'\'',185,'(',144,147,22,'P','B','I',27,143,'C','>','z','W',179,'+',153,227,
-132,'k','7',192,204,26,'~','?',12,195,'0',12,'s','y','>',0,244,'|','e',9,
-0,18,0,0};
-#endif
-
 #endif
 
 #define min(a,b) ((a) < (b) ? (a) : (b))

==== //depot/projects/delphij_fork/lib/libarchive/test/test_tar_filenames.c#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_tar_filenames.c,v 1.6 2007/07/06 15:43:11 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_tar_filenames.c,v 1.7 2007/07/14 17:52:01 kientzle Exp $");
 
 /*
  * Exercise various lengths of filenames in tar archives,
@@ -42,9 +42,6 @@
 	size_t used;
 	size_t prefix_length = 0;
 	int i = 0;
-#if ARCHIVE_VERSION_STAMP < 1009000
-	static int bug_reported_1 = 0, bug_reported_2 = 0, bug_reported_3 = 0;
-#endif
 
 	if (prefix) {
 		strcpy(filename, prefix);
@@ -118,10 +115,7 @@
 	/* Read the file and check the filename. */
 	assertA(0 == archive_read_next_header(a, &ae));
 #if ARCHIVE_VERSION_STAMP < 1009000
-	if (!bug_reported_3) {
-		skipping("Leading '/' preserved on long filenames");
-		++bug_reported_3;
-	}
+	skipping("Leading '/' preserved on long filenames");
 #else
 	assertEqualString(filename, archive_entry_pathname(ae));
 #endif
@@ -137,10 +131,7 @@
 	 */
 	assertA(0 == archive_read_next_header(a, &ae));
 #if ARCHIVE_VERSION_STAMP < 1009000
-	if (!bug_reported_2) {
-		skipping("Trailing '/' preserved on dirnames");
-		++bug_reported_2;
-	}
+	skipping("Trailing '/' preserved on dirnames");
 #else
 	assertEqualString(dirname, archive_entry_pathname(ae));
 #endif
@@ -148,10 +139,7 @@
 
 	assertA(0 == archive_read_next_header(a, &ae));
 #if ARCHIVE_VERSION_STAMP < 1009000
-	if (!bug_reported_1) {
-		skipping("Trailing '/' added to dir names");
-		++bug_reported_1;
-	}
+	skipping("Trailing '/' added to dir names");
 #else
 	assertEqualString(dirname, archive_entry_pathname(ae));
 #endif

==== //depot/projects/delphij_fork/lib/libarchive/test/test_write_disk_perms.c#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_perms.c,v 1.5 2007/07/06 15:43:11 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_perms.c,v 1.6 2007/07/15 17:16:42 kientzle Exp $");
 
 #if ARCHIVE_VERSION_STAMP >= 1009000
 
@@ -235,7 +235,7 @@
 	archive_entry_set_uid(ae, getuid() + 1);
 	archive_write_disk_set_options(a, ARCHIVE_EXTRACT_PERM);
 	assertA(0 == archive_write_header(a, ae));
-	assertA(ARCHIVE_WARN == archive_write_finish_entry(a));
+	assertEqualInt(ARCHIVE_WARN, archive_write_finish_entry(a));
 
 	/* Write a regular file with ARCHIVE_EXTRACT_PERM & SGID bit */
 	assert(archive_entry_clear(ae) != NULL);

==== //depot/projects/delphij_fork/lib/libc/sys/ioctl.2#2 (text+ko) ====

@@ -27,9 +27,9 @@
 .\"
 .\"     @(#)ioctl.2	8.2 (Berkeley) 12/11/93
 .\"
-.\" $FreeBSD: src/lib/libc/sys/ioctl.2,v 1.27 2007/01/09 00:28:14 imp Exp $
+.\" $FreeBSD: src/lib/libc/sys/ioctl.2,v 1.28 2007/07/14 19:23:29 brueffer Exp $
 .\"
-.Dd December 11, 1993
+.Dd July 14, 2007
 .Dt IOCTL 2
 .Os
 .Sh NAME
@@ -59,9 +59,7 @@
 is traditionally named
 .Va "char *argp" .
 Most uses of
-.Fn ioctl
-in
-.Fx 3.0 ,
+.Fn ioctl ,
 however, require the third argument to be a
 .Vt caddr_t
 or an

==== //depot/projects/delphij_fork/libexec/rtld-elf/powerpc/reloc.c#2 (text+ko) ====

@@ -26,7 +26,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/libexec/rtld-elf/powerpc/reloc.c,v 1.7 2006/09/01 06:08:50 marcel Exp $
+ * $FreeBSD: src/libexec/rtld-elf/powerpc/reloc.c,v 1.8 2007/07/15 22:52:15 marcel Exp $
  */
 
 #include <sys/param.h>
@@ -286,8 +286,12 @@
 	 * The dynamic loader may be called from a thread, we have
 	 * limited amounts of stack available so we cannot use alloca().
 	 */
-	cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
-	if (cache == MAP_FAILED)
+	if (obj != obj_rtld) {
+		cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON,
+		    -1, 0);
+		if (cache == MAP_FAILED)
+			cache = NULL;
+	} else
 		cache = NULL;
 
 	/*

==== //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/relnotes/article.sgml#4 (text+ko) ====

@@ -30,7 +30,7 @@
 
   <corpauthor>The &os; Project</corpauthor>
 
-  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1050 2007/07/13 17:31:32 bmah Exp $</pubdate>
+  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1051 2007/07/15 01:59:35 delphij Exp $</pubdate>

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


More information about the p4-projects mailing list