Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jun 2007 01:42:03 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 122174 for review
Message-ID:  <200706230142.l5N1g3Km082738@repoman.freebsd.org>

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

Change 122174 by kmacy@kmacy_vt-x:opentoe_init on 2007/06/23 01:41:43

	IFC opentoe

Affected files ...

.. //depot/projects/opentoe/contrib/less/NEWS#3 integrate
.. //depot/projects/opentoe/contrib/less/README#3 integrate
.. //depot/projects/opentoe/contrib/less/cmdbuf.c#3 integrate
.. //depot/projects/opentoe/contrib/less/command.c#3 integrate
.. //depot/projects/opentoe/contrib/less/forwback.c#3 integrate
.. //depot/projects/opentoe/contrib/less/less.man#3 integrate
.. //depot/projects/opentoe/contrib/less/less.nro#3 integrate
.. //depot/projects/opentoe/contrib/less/lessecho.man#3 integrate
.. //depot/projects/opentoe/contrib/less/lessecho.nro#3 integrate
.. //depot/projects/opentoe/contrib/less/lesskey.man#3 integrate
.. //depot/projects/opentoe/contrib/less/lesskey.nro#3 integrate
.. //depot/projects/opentoe/contrib/less/main.c#3 integrate
.. //depot/projects/opentoe/contrib/less/optfunc.c#3 integrate
.. //depot/projects/opentoe/contrib/less/screen.c#3 integrate
.. //depot/projects/opentoe/contrib/less/version.c#3 integrate
.. //depot/projects/opentoe/etc/devd.conf#3 integrate
.. //depot/projects/opentoe/etc/rc.resume#2 integrate
.. //depot/projects/opentoe/etc/rc.suspend#2 integrate
.. //depot/projects/opentoe/lib/libarchive/Makefile#6 integrate
.. //depot/projects/opentoe/lib/libarchive/archive.h.in#6 integrate
.. //depot/projects/opentoe/lib/libarchive/archive_write_set_format.c#2 integrate
.. //depot/projects/opentoe/lib/libarchive/archive_write_set_format_by_name.c#3 integrate
.. //depot/projects/opentoe/lib/libarchive/archive_write_set_format_cpio_newc.c#1 branch
.. //depot/projects/opentoe/lib/libarchive/test/Makefile#5 integrate
.. //depot/projects/opentoe/lib/libarchive/test/test_write_format_cpio.c#1 branch
.. //depot/projects/opentoe/lib/libc/net/sctp_sys_calls.c#4 integrate
.. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/relnotes/article.sgml#10 integrate
.. //depot/projects/opentoe/share/man/man9/lock.9#3 integrate
.. //depot/projects/opentoe/share/man/man9/locking.9#4 integrate
.. //depot/projects/opentoe/sys/dev/acpica/acpi.c#8 integrate
.. //depot/projects/opentoe/sys/dev/acpica/acpiio.h#2 integrate
.. //depot/projects/opentoe/sys/dev/acpica/acpivar.h#5 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/common/jhash.h#2 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/cxgb_l2t.c#5 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/cxgb_l2t.h#7 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.c#10 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.h#9 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/sys/mbufq.h#3 integrate
.. //depot/projects/opentoe/sys/dev/cxgb/t3fw-4.0.0.bin.gz.uu#3 delete
.. //depot/projects/opentoe/sys/dev/cxgb/ulp/toecore/toedev.h#4 integrate
.. //depot/projects/opentoe/sys/dev/sym/sym_hipd.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/ehci_pci.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/if_aue.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/if_rum.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/if_ural.c#8 integrate
.. //depot/projects/opentoe/sys/dev/usb/ohci_pci.c#2 integrate
.. //depot/projects/opentoe/sys/dev/usb/ubsa.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/ubser.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/ucycom.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/udbp.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/ufm.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/ufoma.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/uftdi.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/uhci_pci.c#2 integrate
.. //depot/projects/opentoe/sys/dev/usb/uhid.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/uhub.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/uipaq.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/ukbd.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/ulpt.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/umass.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/umodem.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/ums.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/urio.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/usb_port.h#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/usb_quirks.c#4 integrate
.. //depot/projects/opentoe/sys/dev/usb/usb_quirks.h#2 integrate
.. //depot/projects/opentoe/sys/dev/usb/usbdevs#7 integrate
.. //depot/projects/opentoe/sys/dev/usb/uscanner.c#3 integrate
.. //depot/projects/opentoe/sys/dev/usb/uvisor.c#3 integrate
.. //depot/projects/opentoe/sys/i386/acpica/acpi_machdep.c#4 integrate
.. //depot/projects/opentoe/sys/net/bridgestp.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/atm_cm.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/ipatm/ipatm_event.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/spans/spans_proto.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/uni/sscf_uni_lower.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/uni/uniarp.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/uni/uniarp_timer.c#2 integrate
.. //depot/projects/opentoe/sys/netatm/uni/unisig_decode.h#2 integrate
.. //depot/projects/opentoe/sys/netatm/uni/unisig_proto.c#2 integrate
.. //depot/projects/opentoe/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#2 integrate
.. //depot/projects/opentoe/sys/netgraph/ng_parse.c#2 integrate
.. //depot/projects/opentoe/sys/netinet/sctp_indata.c#12 integrate
.. //depot/projects/opentoe/sys/netinet/sctp_indata.h#5 integrate
.. //depot/projects/opentoe/sys/netinet/sctp_input.c#12 integrate
.. //depot/projects/opentoe/sys/netinet/sctp_uio.h#10 integrate
.. //depot/projects/opentoe/sys/netinet/sctputil.c#12 integrate
.. //depot/projects/opentoe/sys/powerpc/powerpc/busdma_machdep.c#3 integrate
.. //depot/projects/opentoe/sys/ufs/ffs/ffs_softdep.c#6 integrate
.. //depot/projects/opentoe/sys/ufs/ufs/ufs_inode.c#2 integrate
.. //depot/projects/opentoe/usr.sbin/acpi/acpiconf/acpiconf.c#2 integrate
.. //depot/projects/opentoe/usr.sbin/periodic/periodic.8#2 integrate
.. //depot/projects/opentoe/usr.sbin/periodic/periodic.sh#2 integrate

Differences ...

==== //depot/projects/opentoe/contrib/less/NEWS#3 (text+ko) ====

@@ -13,7 +13,7 @@
 ======================================================================
 
 
-	Major changes between "less" versions 394 and 403
+	Major changes between "less" versions 394 and 406
 
 * Allow decimal point in number for % (percent) command.
 

==== //depot/projects/opentoe/contrib/less/README#3 (text+ko) ====

@@ -1,7 +1,7 @@
 
-                            Less, version 403
+                            Less, version 406
 
-    This is the distribution of less, version 403, released 25 May 2007.
+    This is the distribution of less, version 406, released 19 Jun 2007.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or

==== //depot/projects/opentoe/contrib/less/cmdbuf.c#3 (text+ko) ====

@@ -1390,11 +1390,14 @@
 		}
 		if (strcmp(line, HISTFILE_SEARCH_SECTION) == 0)
 			ml = &mlist_search;
+		else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
+		{
 #if SHELL_ESCAPE || PIPEC
-		else if (strcmp(line, HISTFILE_SHELL_SECTION) == 0)
 			ml = &mlist_shell;
+#else
+			ml = NULL;
 #endif
-		else if (*line == '"')
+		} else if (*line == '"')
 		{
 			if (ml != NULL)
 				cmd_addhist(ml, line+1);
@@ -1444,11 +1447,18 @@
 #if CMD_HISTORY
 	char *filename;
 	FILE *f;
+	int modified = 0;
 
 	filename = histfile_name();
 	if (filename == NULL)
 		return;
-	if (!mlist_search.modified && !mlist_shell.modified)
+	if (mlist_search.modified)
+		modified = 1;
+#if SHELL_ESCAPE || PIPEC
+	if (mlist_shell.modified)
+		modified = 1;
+#endif
+	if (!modified)
 		return;
 	f = fopen(filename, "w");
 	free(filename);

==== //depot/projects/opentoe/contrib/less/command.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/less/command.c,v 1.7 2007/06/04 01:43:11 delphij Exp $ */
+/* $FreeBSD: src/contrib/less/command.c,v 1.8 2007/06/21 10:44:50 delphij Exp $ */
 /*
  * Copyright (C) 1984-2007  Mark Nudelman
  *
@@ -87,7 +87,7 @@
 cmd_exec()
 {
 	clear_attn();
-	line_left();
+	clear_bot();
 	flush();
 }
 

==== //depot/projects/opentoe/contrib/less/forwback.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/less/forwback.c,v 1.6 2007/06/04 01:43:11 delphij Exp $ */
+/* $FreeBSD: src/contrib/less/forwback.c,v 1.7 2007/06/21 10:44:50 delphij Exp $ */
 /*
  * Copyright (C) 1984-2007  Mark Nudelman
  *
@@ -142,9 +142,6 @@
 				clear();
 				home();
 			}
-		} else
-		{
-			clear_bot();
 		}
 
 		if (pos != position(BOTTOM_PLUS_ONE) || empty_screen())

==== //depot/projects/opentoe/contrib/less/less.man#3 (text+ko) ====

@@ -1544,4 +1544,4 @@
 
 
 
-                           Version 403: 25 May 2007                    LESS(1)
+                           Version 406: 19 Jun 2007                    LESS(1)

==== //depot/projects/opentoe/contrib/less/less.nro#3 (text+ko) ====

@@ -1,4 +1,4 @@
-.TH LESS 1 "Version 403: 25 May 2007"
+.TH LESS 1 "Version 406: 19 Jun 2007"
 .SH NAME
 less \- opposite of more
 .SH SYNOPSIS

==== //depot/projects/opentoe/contrib/less/lessecho.man#3 (text+ko) ====

@@ -46,4 +46,4 @@
 
 
 
-                           Version 403: 25 May 2007                LESSECHO(1)
+                           Version 406: 19 Jun 2007                LESSECHO(1)

==== //depot/projects/opentoe/contrib/less/lessecho.nro#3 (text+ko) ====

@@ -1,4 +1,4 @@
-.TH LESSECHO 1 "Version 403: 25 May 2007"
+.TH LESSECHO 1 "Version 406: 19 Jun 2007"
 .SH NAME
 lessecho \- expand metacharacters
 .SH SYNOPSIS

==== //depot/projects/opentoe/contrib/less/lesskey.man#3 (text+ko) ====

@@ -357,4 +357,4 @@
 
 
 
-                           Version 403: 25 May 2007                 LESSKEY(1)
+                           Version 406: 19 Jun 2007                 LESSKEY(1)

==== //depot/projects/opentoe/contrib/less/lesskey.nro#3 (text+ko) ====

@@ -1,4 +1,4 @@
-.TH LESSKEY 1 "Version 403: 25 May 2007"
+.TH LESSKEY 1 "Version 406: 19 Jun 2007"
 .SH NAME
 lesskey \- specify key bindings for less
 .SH SYNOPSIS

==== //depot/projects/opentoe/contrib/less/main.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/less/main.c,v 1.7 2007/06/16 02:43:44 delphij Exp $ */
+/* $FreeBSD: src/contrib/less/main.c,v 1.8 2007/06/21 10:39:24 delphij Exp $ */
 /*
  * Copyright (C) 1984-2007  Mark Nudelman
  *
@@ -142,7 +142,8 @@
 	if (s != NULL)
 		scan_option(save(s));
 
-#define	isoptstring(s)	(((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0')
+#define	isoptstring(s)	less_is_more   ? (((s)[0] == '-') && (s)[1] != '\0') : \
+			(((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0')
 	while (argc > 0 && (isoptstring(*argv) || isoptpending()))
 	{
 		s = *argv++;

==== //depot/projects/opentoe/contrib/less/optfunc.c#3 (text+ko) ====

@@ -45,6 +45,9 @@
 extern char *wproto;
 extern IFILE curr_ifile;
 extern char version[];
+extern int jump_sline;
+extern int jump_sline_fraction;
+extern int less_is_more;
 #if LOGFILE
 extern char *namelogfile;
 extern int force_logfile;
@@ -53,9 +56,6 @@
 #if TAGS
 public char *tagoption = NULL;
 extern char *tags;
-extern int jump_sline;
-extern int jump_sline_fraction;
-extern int less_is_more;
 #endif
 #if MSDOS_COMPILER
 extern int nm_fg_color, nm_bg_color;

==== //depot/projects/opentoe/contrib/less/screen.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/less/screen.c,v 1.6 2007/06/04 01:43:11 delphij Exp $ */
+/* $FreeBSD: src/contrib/less/screen.c,v 1.7 2007/06/21 10:44:50 delphij Exp $ */
 /*
  * Copyright (C) 1984-2007  Mark Nudelman
  *
@@ -626,7 +626,25 @@
 	char *capname;
 {
 	char name[16];
+	char *s;
 
+	s = lgetenv("LESS_TERMCAP_DEBUG");
+	if (s != NULL && *s != '\0')
+	{
+		struct env { struct env *next; char *name; char *value; };
+		static struct env *envs = NULL;
+		struct env *p;
+		for (p = envs;  p != NULL;  p = p->next)
+			if (strcmp(p->name, capname) == 0)
+				return p->value;
+		p = (struct env *) ecalloc(1, sizeof(struct env));
+		p->name = save(capname);
+		p->value = (char *) ecalloc(strlen(capname)+3, sizeof(char));
+		sprintf(p->value, "<%s>", capname);
+		p->next = envs;
+		envs = p;
+		return p->value;
+	}
 	strcpy(name, "LESS_TERMCAP_");
 	strcat(name, capname);
 	return (lgetenv(name));

==== //depot/projects/opentoe/contrib/less/version.c#3 (text+ko) ====

@@ -690,6 +690,9 @@
 v402  3/30/07	Fix autoconf bug when memcpy etc are inline;
 		fix bug in terminating number following -j option.
 v403  5/25/07	Fix Windows build.
+v404  6/5/07	Fix display bug with F command and long lines.
+v405  6/17/07	Fix display bug when using -w option.
+v406  6/17/07	Fix secure build.
 */
 
-char version[] = "403";
+char version[] = "406";

==== //depot/projects/opentoe/etc/devd.conf#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/devd.conf,v 1.37 2007/04/08 16:05:23 pjd Exp $
+# $FreeBSD: src/etc/devd.conf,v 1.38 2007/06/21 22:50:36 njl Exp $
 #
 # Refer to devd.conf(5) and devd(8) man pages for the details on how to
 # run and configure devd.
@@ -239,6 +239,19 @@
 	action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
 };
 
+# User requested suspend, so perform preparation steps and then execute
+# the actual suspend process.
+notify 10 {
+	match "system"		"ACPI";
+	match "subsystem"	"Suspend";
+	action "/etc/rc.suspend acpi $notify";
+};
+notify 10 {
+	match "system"		"ACPI";
+	match "subsystem"	"Resume";
+	action "/etc/rc.resume acpi $notify";
+};
+
 /* EXAMPLES TO END OF FILE
 
 # The following might be an example of something that a vendor might
@@ -277,6 +290,7 @@
 # Button:	Button pressed (0 for power, 1 for sleep)
 # CMBAT:	ACPI battery events
 # Lid:		Lid state (0 is closed, 1 is open)
+# Suspend, Resume: Suspend and resume notification
 # Thermal:	ACPI thermal zone events
 #
 # This example calls a script when the AC state changes, passing the

==== //depot/projects/opentoe/etc/rc.resume#2 (text+ko) ====

@@ -24,13 +24,13 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.resume,v 1.7 2003/12/30 17:30:39 njl Exp $
+# $FreeBSD: src/etc/rc.resume,v 1.8 2007/06/21 22:50:36 njl Exp $
 #
 
 # sample run command file for APM Resume Event
 
 if [ $# -ne 2 ]; then
-	echo "Usage: $0 [apm|acpi] [standby,suspend|1-5]"
+	echo "Usage: $0 [apm|acpi] [standby,suspend|1-4]"
 	exit 1
 fi
 
@@ -48,9 +48,13 @@
 # pccardq | awk -F '~' '$5 == "inactive" \
 #	{ printf("pccardc power %d 1", $1); }' | sh
 
-# UHCI has trouble resuming so we just load/unload it.  You
-# should add any other kernel modules you want reloaded here.
-# kldload usb
+# If a device driver has problems resuming, try unloading it before
+# suspend and reloading it on resume.  Example:
+# kldunload usb
+
+# wpa_supplicant(8) doesn't seem to reassociate during resume.  Uncomment
+# the following to signal it to reassociate.
+# /usr/sbin/wpa_cli reassociate
 
 logger -t $subsystem resumed at `date +'%Y%m%d %H:%M:%S'`
 sync && sync && sync

==== //depot/projects/opentoe/etc/rc.suspend#2 (text+ko) ====

@@ -24,13 +24,13 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.suspend,v 1.6 2004/01/21 03:03:40 njl Exp $
+# $FreeBSD: src/etc/rc.suspend,v 1.7 2007/06/21 22:50:36 njl Exp $
 #
 
 # sample run command file for APM Suspend Event
 
 if [ $# -ne 2 ]; then
-	echo "Usage: $0 [apm|acpi] [standby,suspend|1-5]"
+	echo "Usage: $0 [apm|acpi] [standby,suspend|1-4]"
 	exit 1
 fi
 
@@ -48,15 +48,20 @@
 # pccardq | awk -F '~' '$5 == "filled" && $4 ~ /sio/ \
 #	{ printf("pccardc power %d 0", $1); }' | sh
 
-# UHCI has trouble resuming so we just load/unload it.  You
-# should add any other kernel modules you want unloaded here.
+# If a device driver has problems suspending, try unloading it before
+# suspend and reloading it on resume.  Example:
 # kldunload usb
 
 logger -t $subsystem suspend at `date +'%Y%m%d %H:%M:%S'`
 sync && sync && sync
-[ $subsystem = "apm" ] && sleep 3
+sleep 3
 
 rm -f /var/run/rc.suspend.pid
-[ $subsystem = "apm" ] && zzz
+if [ $subsystem = "apm" ]; then
+	/usr/sbin/zzz
+else
+	# Notify the kernel to continue the suspend process
+	/usr/sbin/acpiconf -k 0
+fi
 
 exit 0

==== //depot/projects/opentoe/lib/libarchive/Makefile#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libarchive/Makefile,v 1.72 2007/05/29 01:00:18 kientzle Exp $
+# $FreeBSD: src/lib/libarchive/Makefile,v 1.73 2007/06/22 05:47:00 kientzle Exp $
 
 LIB=	archive
 DPADD=	${LIBBZ2} ${LIBZ}
@@ -87,6 +87,7 @@
 	archive_write_set_format_ar.c			\
 	archive_write_set_format_by_name.c		\
 	archive_write_set_format_cpio.c			\
+	archive_write_set_format_cpio_newc.c		\
 	archive_write_set_format_pax.c			\
 	archive_write_set_format_shar.c			\
 	archive_write_set_format_ustar.c		\

==== //depot/projects/opentoe/lib/libarchive/archive.h.in#6 (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.h.in,v 1.44 2007/05/29 01:00:18 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.45 2007/06/22 05:47:00 kientzle Exp $
  */
 
 #ifndef ARCHIVE_H_INCLUDED
@@ -390,6 +390,7 @@
 int		 archive_write_set_format_ar_bsd(struct archive *);
 int		 archive_write_set_format_ar_svr4(struct archive *);
 int		 archive_write_set_format_cpio(struct archive *);
+int		 archive_write_set_format_cpio_newc(struct archive *);
 /* TODO: int archive_write_set_format_old_tar(struct archive *); */
 int		 archive_write_set_format_pax(struct archive *);
 int		 archive_write_set_format_pax_restricted(struct archive *);

==== //depot/projects/opentoe/lib/libarchive/archive_write_set_format.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format.c,v 1.4 2007/01/09 08:05:56 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format.c,v 1.5 2007/06/22 05:47:00 kientzle Exp $");
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -42,6 +42,7 @@
 struct { int code; int (*setter)(struct archive *); } codes[] =
 {
 	{ ARCHIVE_FORMAT_CPIO,		archive_write_set_format_cpio },
+	{ ARCHIVE_FORMAT_CPIO_SVR4_NOCRC,	archive_write_set_format_cpio_newc },
 	{ ARCHIVE_FORMAT_CPIO_POSIX,	archive_write_set_format_cpio },
 	{ ARCHIVE_FORMAT_SHAR,		archive_write_set_format_shar },
 	{ ARCHIVE_FORMAT_SHAR_BASE,	archive_write_set_format_shar },

==== //depot/projects/opentoe/lib/libarchive/archive_write_set_format_by_name.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_by_name.c,v 1.6 2007/04/14 22:34:10 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_by_name.c,v 1.7 2007/06/22 05:47:00 kientzle Exp $");
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -49,6 +49,8 @@
 	{ "argnu",	archive_write_set_format_ar_svr4 },
 	{ "arsvr4",	archive_write_set_format_ar_svr4 },
 	{ "cpio",	archive_write_set_format_cpio },
+	{ "newc",	archive_write_set_format_cpio_newc },
+	{ "odc",	archive_write_set_format_cpio },
 	{ "pax",	archive_write_set_format_pax },
 	{ "posix",	archive_write_set_format_pax },
 	{ "shar",	archive_write_set_format_shar },

==== //depot/projects/opentoe/lib/libarchive/test/Makefile#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.7 2007/06/13 03:35:37 kientzle Exp $
+# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.9 2007/06/22 05:49:13 kientzle Exp $
 
 TESTS= \
 	test_acl_basic.c			\
@@ -37,6 +37,7 @@
 	test_write_disk_perms.c			\
 	test_write_disk_secure.c		\
 	test_write_format_ar.c			\
+	test_write_format_cpio.c		\
 	test_write_format_cpio_empty.c		\
 	test_write_format_shar_empty.c		\
 	test_write_format_tar.c			\

==== //depot/projects/opentoe/lib/libc/net/sctp_sys_calls.c#4 (text+ko) ====

@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/sctp_sys_calls.c,v 1.8 2007/06/11 21:05:29 rrs Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/sctp_sys_calls.c,v 1.9 2007/06/22 13:59:54 rrs Exp $");
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
@@ -152,14 +152,14 @@
 	sd = socket(AF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP);
 #endif
 	if (sd == -1) {
-		return (errno);
+		return (-1);
 	}
 	error = getsockopt(sd, IPPROTO_SCTP, SCTP_GET_ADDR_LEN, &av, &siz);
 	close(sd);
 	if (error == 0) {
 		return ((int)av.assoc_value);
 	} else {
-		return (error);
+		return (-1);
 	}
 }
 
@@ -256,8 +256,8 @@
 	for (i = 0; i < addrcnt; i++) {
 		sz = sa->sa_len;
 		fam = sa->sa_family;
-		((struct sockaddr_in *)&addrs[i])->sin_port = ((struct sockaddr_in *)sa)->sin_port;
 		if ((fam != AF_INET) && (fam != AF_INET6)) {
+			free(gaddrs);
 			errno = EINVAL;
 			return (-1);
 		}

==== //depot/projects/opentoe/release/doc/en_US.ISO8859-1/relnotes/article.sgml#10 (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.1044 2007/06/19 15:56:32 rrs Exp $</pubdate>
+  <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1045 2007/06/21 20:27:23 bmah Exp $</pubdate>
 
   <copyright>
     <year>2000</year>
@@ -2177,7 +2177,7 @@
       4.1.8 to 4.1.23.</para>
 
     <para><application>less</application> has been updated from v381
-      to v403.</para>
+      to v406.</para>
 
     <para><application>libpcap</application> has been updated from
       0.9.1 to 0.9.4. &merged;</para>

==== //depot/projects/opentoe/share/man/man9/lock.9#3 (text+ko) ====

@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 .\" DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/lock.9,v 1.16 2007/03/30 18:07:26 julian Exp $
+.\" $FreeBSD: src/share/man/man9/lock.9,v 1.17 2007/06/21 16:39:25 brueffer Exp $
 .\"
 .Dd June 20, 2006
 .Dt LOCK 9
@@ -273,7 +273,6 @@
 will be the result of trying.
 .Sh SEE ALSO
 .Xr condvar 9 ,
-.Xr mutex 9 ,
 .Xr locking 9 ,
 .Xr mutex 9 ,
 .Xr rwlock 9 ,

==== //depot/projects/opentoe/share/man/man9/locking.9#4 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/locking.9,v 1.9 2007/06/01 03:11:47 delphij Exp $
+.\" $FreeBSD: src/share/man/man9/locking.9,v 1.10 2007/06/21 16:39:25 brueffer Exp $
 .\"
 .Dd March 14, 2007
 .Dt LOCKING 9
@@ -300,14 +300,14 @@
 .El
 .Sh SEE ALSO
 .Xr condvar 9 ,
-.Xr lock 9
+.Xr lock 9 ,
 .Xr mtx_pool 9 ,
 .Xr rwlock 9 ,
 .Xr sema 9 ,
 .Xr sleep 9 ,
-.Xr sx 9
+.Xr sx 9 ,
 .Xr LOCK_PROFILING 9 ,
-.Xr WITNESS 9 ,
+.Xr WITNESS 9
 .Sh HISTORY
 These
 functions appeared in

==== //depot/projects/opentoe/sys/dev/acpica/acpi.c#8 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.239 2007/06/15 18:02:33 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.240 2007/06/21 22:50:37 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -136,6 +136,7 @@
 static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level,
 		    void *context, void **status);
 static BOOLEAN	acpi_MatchHid(ACPI_HANDLE h, const char *hid);
+static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, int state);
 static void	acpi_shutdown_final(void *arg, int howto);
 static void	acpi_enable_fixed_events(struct acpi_softc *sc);
 static int	acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate);
@@ -410,6 +411,7 @@
 
     sc = device_get_softc(dev);
     sc->acpi_dev = dev;
+    callout_init(&sc->susp_force_to, TRUE);
 
     error = ENXIO;
 
@@ -592,7 +594,7 @@
 
     /* Pick the first valid sleep state for the sleep button default. */
     sc->acpi_sleep_button_sx = ACPI_S_STATES_MAX + 1;
-    for (state = ACPI_STATE_S1; state < ACPI_STATE_S5; state++)
+    for (state = ACPI_STATE_S1; state <= ACPI_STATE_S4; state++)
 	if (ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) {
 	    sc->acpi_sleep_button_sx = state;
 	    break;
@@ -2118,7 +2120,151 @@
     return (acpi_SetInteger(ACPI_ROOT_OBJECT, "_PIC", model));
 }
 
+/*
+ * DEPRECATED.  This interface has serious deficiencies and will be
+ * removed.
+ *
+ * Immediately enter the sleep state.  In the old model, acpiconf(8) ran
+ * rc.suspend and rc.resume so we don't have to notify devd(8) to do this.
+ */
+ACPI_STATUS
+acpi_SetSleepState(struct acpi_softc *sc, int state)
+{
+    static int once;
+
+    if (!once) {
+	printf(
+"warning: acpi_SetSleepState() deprecated, need to update your software\n");
+	once = 1;
+    }
+    return (acpi_EnterSleepState(sc, state));
+}
+
 static void
+acpi_sleep_force(void *arg)
+{
+    struct acpi_softc *sc;
+
+    printf("acpi: suspend request timed out, forcing sleep now\n");
+    sc = arg;
+    if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)))
+	printf("acpi: force sleep state S%d failed\n", sc->acpi_next_sstate);
+}
+
+/*
+ * Request that the system enter the given suspend state.  All /dev/apm
+ * devices and devd(8) will be notified.  Userland then has a chance to
+ * save state and acknowledge the request.  The system sleeps once all
+ * acks are in.
+ */
+int
+acpi_ReqSleepState(struct acpi_softc *sc, int state)
+{
+    struct apm_clone_data *clone;
+
+    if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5)
+	return (EINVAL);
+
+    /* S5 (soft-off) should be entered directly with no waiting. */
+    if (state == ACPI_STATE_S5) {
+	if (ACPI_SUCCESS(acpi_EnterSleepState(sc, state)))
+	    return (0);
+	else
+	    return (ENXIO);
+    }
+
+    /* If a suspend request is already in progress, just return. */
+    ACPI_LOCK(acpi);
+    if (sc->acpi_next_sstate != 0) {
+    	ACPI_UNLOCK(acpi);
+	return (0);
+    }
+
+    /* Record the pending state and notify all apm devices. */
+    sc->acpi_next_sstate = state;
+    STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) {
+	clone->notify_status = APM_EV_NONE;
+	if ((clone->flags & ACPI_EVF_DEVD) == 0) {
+	    selwakeuppri(&clone->sel_read, PZERO);
+	    KNOTE_UNLOCKED(&clone->sel_read.si_note, 0);
+	}
+    }
+
+    /* Now notify devd(8) also. */
+    acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state);
+
+    /*
+     * Set a timeout to fire if userland doesn't ack the suspend request
+     * in time.  This way we still eventually go to sleep if we were
+     * overheating or running low on battery, even if userland is hung.
+     * We cancel this timeout once all userland acks are in or the
+     * suspend request is aborted.
+     */
+    callout_reset(&sc->susp_force_to, 10 * hz, acpi_sleep_force, sc);
+    ACPI_UNLOCK(acpi);
+    return (0);
+}
+
+/*
+ * Acknowledge (or reject) a pending sleep state.  The caller has
+ * prepared for suspend and is now ready for it to proceed.  If the
+ * error argument is non-zero, it indicates suspend should be cancelled
+ * and gives an errno value describing why.  Once all votes are in,
+ * we suspend the system.
+ */
+int
+acpi_AckSleepState(struct apm_clone_data *clone, int error)
+{
+    struct acpi_softc *sc;
+    int ret, sleeping;
+
+    /* If no pending sleep state, return an error. */
+    ACPI_LOCK(acpi);
+    sc = clone->acpi_sc;
+    if (sc->acpi_next_sstate == 0) {
+    	ACPI_UNLOCK(acpi);
+	return (ENXIO);
+    }
+
+    /* Caller wants to abort suspend process. */
+    if (error) {
+	sc->acpi_next_sstate = 0;
+	callout_stop(&sc->susp_force_to);
+	printf("acpi: listener on %s cancelled the pending suspend\n",
+	    devtoname(clone->cdev));
+    	ACPI_UNLOCK(acpi);
+	return (0);
+    }
+
+    /*
+     * Mark this device as acking the suspend request.  Then, walk through
+     * all devices, seeing if they agree yet.  We only count devices that
+     * are writable since read-only devices couldn't ack the request.
+     */
+    clone->notify_status = APM_EV_ACKED;
+    sleeping = TRUE;
+    STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) {
+	if ((clone->flags & ACPI_EVF_WRITE) != 0 &&
+	    clone->notify_status != APM_EV_ACKED) {
+	    sleeping = FALSE;
+	    break;
+	}
+    }
+
+    /* If all devices have voted "yes", we will suspend now. */
+    if (sleeping)
+	callout_stop(&sc->susp_force_to);
+    ACPI_UNLOCK(acpi);
+    ret = 0;
+    if (sleeping) {
+	if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)))
+		ret = ENODEV;
+    }
+
+    return (ret);
+}
+
+static void
 acpi_sleep_enable(void *arg)
 {
 
@@ -2134,12 +2280,12 @@
 };
 
 /*
- * Set the system sleep state
+ * Enter the desired system sleep state.
  *
  * Currently we support S1-S5 but S4 is only S4BIOS
  */
-ACPI_STATUS
-acpi_SetSleepState(struct acpi_softc *sc, int state)
+static ACPI_STATUS
+acpi_EnterSleepState(struct acpi_softc *sc, int state)
 {
     ACPI_STATUS	status;
     UINT8	TypeA;
@@ -2148,14 +2294,13 @@
 
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state);
 
+    /* Re-entry once we're suspending is not allowed. */
     status = AE_OK;
     ACPI_LOCK(acpi);
     if (sc->acpi_sleep_disabled) {
-	if (sc->acpi_sstate != ACPI_STATE_S0)
-	    status = AE_ERROR;
 	ACPI_UNLOCK(acpi);
 	printf("acpi: suspend request ignored (not ready yet)\n");
-	return (status);
+	return (AE_ERROR);
     }
     sc->acpi_sleep_disabled = 1;
     ACPI_UNLOCK(acpi);
@@ -2251,6 +2396,7 @@
      * Back out state according to how far along we got in the suspend
      * process.  This handles both the error and success cases.
      */
+    sc->acpi_next_sstate = 0;
     if (slp_state >= ACPI_SS_GPE_SET) {
 	acpi_wake_prep_walk(state);
 	sc->acpi_sstate = ACPI_STATE_S0;
@@ -2264,7 +2410,10 @@
 
     /* Allow another sleep request after a while. */
     if (state != ACPI_STATE_S5)
-	timeout(acpi_sleep_enable, (caddr_t)sc, hz * ACPI_MINIMUM_AWAKETIME);
+	timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME);
+
+    /* Run /etc/rc.resume after we are back. */
+    acpi_UserNotify("Resume", ACPI_ROOT_OBJECT, state);
 
     mtx_unlock(&Giant);
     return_ACPI_STATUS (status);
@@ -2574,11 +2723,15 @@
 static void
 acpi_system_eventhandler_sleep(void *arg, int state)
 {
+    int ret;
 
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state);
 
-    if (state >= ACPI_STATE_S0 && state <= ACPI_S_STATES_MAX)
-	acpi_SetSleepState((struct acpi_softc *)arg, state);
+    /* Request that the system prepare to enter the given suspend state. */
+    ret = acpi_ReqSleepState((struct acpi_softc *)arg, state);
+    if (ret != 0)
+	printf("acpi: request to enter state S%d failed (err %d)\n",
+	    state, ret);
 
     return_VOID;
 }
@@ -2840,7 +2993,20 @@
 
     /* Core system ioctls. */
     switch (cmd) {
-    case ACPIIO_SETSLPSTATE:
+    case ACPIIO_REQSLPSTATE:
+	state = *(int *)addr;
+	if (state != ACPI_STATE_S5)
+	    error = acpi_ReqSleepState(sc, state);
+	else {
+	    printf("power off via acpi ioctl not supported\n");
+	    error = ENXIO;
+	}
+	break;
+    case ACPIIO_ACKSLPSTATE:
+	error = *(int *)addr;
+	error = acpi_AckSleepState(sc->acpi_clone, error);
+	break;
+    case ACPIIO_SETSLPSTATE:	/* DEPRECATED */
 	error = EINVAL;
 	state = *(int *)addr;
 	if (state >= ACPI_STATE_S0 && state <= ACPI_S_STATES_MAX)
@@ -3171,7 +3337,8 @@
 			goto out;
 		}
 
-		acpi_SetSleepState(sc, acpi_state);
+		if (ACPI_FAILURE(acpi_EnterSleepState(sc, acpi_state)))
+			error = ENXIO;
 		break;
 	default:
 		error = EINVAL;

==== //depot/projects/opentoe/sys/dev/acpica/acpiio.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpica/acpiio.h,v 1.16 2005/10/23 00:16:41 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpiio.h,v 1.17 2007/06/21 22:50:37 njl Exp $
  */
 
 #ifndef _ACPIIO_H_
@@ -33,7 +33,13 @@
 /*
  * Core ACPI subsystem ioctls
  */
-#define ACPIIO_SETSLPSTATE	_IOW('P', 3, int)
+#define ACPIIO_SETSLPSTATE	_IOW('P', 3, int) /* DEPRECATED */
+
+/* Request S1-5 sleep state. User is notified and then sleep proceeds. */
+#define ACPIIO_REQSLPSTATE	_IOW('P', 4, int)
+
+/* Allow suspend to continue (0) or abort it (errno). */
+#define ACPIIO_ACKSLPSTATE	_IOW('P', 5, int)
 
 struct acpi_battinfo {
     int	 cap;				/* percent */

==== //depot/projects/opentoe/sys/dev/acpica/acpivar.h#5 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.106 2007/06/15 18:02:34 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.107 2007/06/21 22:50:37 njl Exp $
  */
 
 #ifndef _ACPIVAR_H_

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



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