Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2002 01:27:18 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 22701 for review
Message-ID:  <200212240927.gBO9RIa7026975@repoman.freebsd.org>

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

Change 22701 by marcel@marcel_nfs on 2002/12/24 01:26:47

	IFC @22699

Affected files ...

.. //depot/projects/ia64/UPDATING#26 integrate
.. //depot/projects/ia64/bin/ps/ps.1#13 integrate
.. //depot/projects/ia64/bin/sh/bltin/echo.c#3 integrate
.. //depot/projects/ia64/bin/sh/sh.1#17 integrate
.. //depot/projects/ia64/contrib/gcc/config/i386/i386.c#8 integrate
.. //depot/projects/ia64/etc/rc#23 integrate
.. //depot/projects/ia64/etc/rc.d/Makefile#8 integrate
.. //depot/projects/ia64/etc/rc.d/devd#3 integrate
.. //depot/projects/ia64/etc/rc.d/diskless#7 integrate
.. //depot/projects/ia64/etc/rc.d/initdiskless#6 integrate
.. //depot/projects/ia64/etc/rc.d/rcconf.sh#1 branch
.. //depot/projects/ia64/include/limits.h#4 integrate
.. //depot/projects/ia64/lib/libc/gen/setproctitle.c#4 integrate
.. //depot/projects/ia64/lib/libc/i386/stdlib/div.S#5 integrate
.. //depot/projects/ia64/lib/libc/i386/stdlib/ldiv.S#5 integrate
.. //depot/projects/ia64/lib/libc/sys/mmap.c#3 integrate
.. //depot/projects/ia64/lib/libc/sys/mprotect.2#4 integrate
.. //depot/projects/ia64/lib/libc/sys/rename.2#5 integrate
.. //depot/projects/ia64/lib/libpam/modules/pam_ssh/pam_ssh.8#4 integrate
.. //depot/projects/ia64/libexec/getty/getty.8#3 integrate
.. //depot/projects/ia64/libexec/rlogind/rlogind.8#3 integrate
.. //depot/projects/ia64/sbin/atacontrol/atacontrol.8#10 integrate
.. //depot/projects/ia64/sbin/dump/dump.8#12 integrate
.. //depot/projects/ia64/sbin/fdisk_pc98/fdisk.8#4 integrate
.. //depot/projects/ia64/sbin/ipfw/ipfw.8#14 integrate
.. //depot/projects/ia64/sbin/ipfw/ipfw.c#7 integrate
.. //depot/projects/ia64/sbin/ipfw/ipfw2.c#9 integrate
.. //depot/projects/ia64/sbin/restore/restore.8#6 integrate
.. //depot/projects/ia64/sbin/shutdown/shutdown.8#5 integrate
.. //depot/projects/ia64/sbin/slattach/slattach.8#3 integrate
.. //depot/projects/ia64/share/man/man4/man4.i386/rdp.4#3 integrate
.. //depot/projects/ia64/share/man/man4/tcp.4#9 integrate
.. //depot/projects/ia64/share/man/man4/trm.4#3 integrate
.. //depot/projects/ia64/share/man/man5/make.conf.5#26 integrate
.. //depot/projects/ia64/share/man/man5/rc.conf.5#21 integrate
.. //depot/projects/ia64/share/man/man7/Makefile#8 integrate
.. //depot/projects/ia64/share/man/man7/development.7#1 branch
.. //depot/projects/ia64/share/man/man7/tuning.7#16 integrate
.. //depot/projects/ia64/share/man/man8/adding_user.8#3 integrate
.. //depot/projects/ia64/share/man/man8/diskless.8#7 integrate
.. //depot/projects/ia64/sys/alpha/include/limits.h#4 integrate
.. //depot/projects/ia64/sys/arm/include/limits.h#3 integrate
.. //depot/projects/ia64/sys/compat/linprocfs/linprocfs.c#13 integrate
.. //depot/projects/ia64/sys/compat/linux/linux_ioctl.c#15 integrate
.. //depot/projects/ia64/sys/compat/svr4/svr4_sockio.c#5 integrate
.. //depot/projects/ia64/sys/contrib/ipfilter/netinet/fil.c#8 integrate
.. //depot/projects/ia64/sys/dev/acpica/acpi_resource.c#7 integrate
.. //depot/projects/ia64/sys/dev/em/README#5 integrate
.. //depot/projects/ia64/sys/dev/em/if_em.c#15 integrate
.. //depot/projects/ia64/sys/dev/em/if_em.h#11 integrate
.. //depot/projects/ia64/sys/dev/em/if_em_hw.c#6 integrate
.. //depot/projects/ia64/sys/dev/em/if_em_hw.h#6 integrate
.. //depot/projects/ia64/sys/dev/em/if_em_osdep.h#9 integrate
.. //depot/projects/ia64/sys/dev/sio/sio_pccard.c#7 integrate
.. //depot/projects/ia64/sys/dev/streams/streams.c#5 integrate
.. //depot/projects/ia64/sys/dev/usb/umass.c#15 integrate
.. //depot/projects/ia64/sys/i386/i386/pmap.c#28 integrate
.. //depot/projects/ia64/sys/i386/include/limits.h#4 integrate
.. //depot/projects/ia64/sys/i386/pci/pci_bus.c#12 integrate
.. //depot/projects/ia64/sys/ia64/include/limits.h#4 integrate
.. //depot/projects/ia64/sys/kern/kern_descrip.c#38 integrate
.. //depot/projects/ia64/sys/kern/kern_event.c#10 integrate
.. //depot/projects/ia64/sys/kern/kern_uuid.c#7 integrate
.. //depot/projects/ia64/sys/kern/subr_witness.c#24 integrate
.. //depot/projects/ia64/sys/kern/sys_pipe.c#24 integrate
.. //depot/projects/ia64/sys/kern/sys_socket.c#12 integrate
.. //depot/projects/ia64/sys/kern/uipc_socket.c#22 integrate
.. //depot/projects/ia64/sys/kern/uipc_syscalls.c#22 integrate
.. //depot/projects/ia64/sys/kern/vfs_bio.c#29 integrate
.. //depot/projects/ia64/sys/kern/vfs_export.c#7 integrate
.. //depot/projects/ia64/sys/kern/vfs_vnops.c#21 integrate
.. //depot/projects/ia64/sys/modules/netgraph/fec/Makefile#2 integrate
.. //depot/projects/ia64/sys/net/bridge.c#14 integrate
.. //depot/projects/ia64/sys/net/if.c#16 integrate
.. //depot/projects/ia64/sys/net/if_ef.c#6 integrate
.. //depot/projects/ia64/sys/net/if_var.h#14 integrate
.. //depot/projects/ia64/sys/net/radix.c#7 integrate
.. //depot/projects/ia64/sys/net/radix.h#4 integrate
.. //depot/projects/ia64/sys/net/route.c#7 integrate
.. //depot/projects/ia64/sys/net/rtsock.c#15 integrate
.. //depot/projects/ia64/sys/netatm/atm_if.c#7 integrate
.. //depot/projects/ia64/sys/netatm/atm_usrreq.c#5 integrate
.. //depot/projects/ia64/sys/netgraph/ng_ether.c#7 integrate
.. //depot/projects/ia64/sys/netgraph/ng_fec.c#3 integrate
.. //depot/projects/ia64/sys/netgraph/ng_gif.c#3 integrate
.. //depot/projects/ia64/sys/netgraph/ng_source.c#4 integrate
.. //depot/projects/ia64/sys/netinet/in_rmx.c#3 integrate
.. //depot/projects/ia64/sys/netinet/tcp_syncache.c#15 integrate
.. //depot/projects/ia64/sys/netinet6/icmp6.c#10 integrate
.. //depot/projects/ia64/sys/netinet6/in6.c#6 integrate
.. //depot/projects/ia64/sys/netinet6/in6_ifattach.c#3 integrate
.. //depot/projects/ia64/sys/netinet6/in6_rmx.c#3 integrate
.. //depot/projects/ia64/sys/netinet6/nd6_rtr.c#4 integrate
.. //depot/projects/ia64/sys/netipsec/xform_ipip.c#2 integrate
.. //depot/projects/ia64/sys/nfsclient/bootp_subr.c#9 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_diskless.c#2 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_vfsops.c#15 integrate
.. //depot/projects/ia64/sys/nfsclient/nfs_vnops.c#10 integrate
.. //depot/projects/ia64/sys/pci/agp.c#10 integrate
.. //depot/projects/ia64/sys/pci/if_ste.c#11 integrate
.. //depot/projects/ia64/sys/pci/if_stereg.h#4 integrate
.. //depot/projects/ia64/sys/powerpc/include/limits.h#4 integrate
.. //depot/projects/ia64/sys/sparc64/include/limits.h#4 integrate
.. //depot/projects/ia64/sys/sparc64/include/pmap.h#13 integrate
.. //depot/projects/ia64/sys/sparc64/include/smp.h#8 integrate
.. //depot/projects/ia64/sys/sparc64/include/tlb.h#10 integrate
.. //depot/projects/ia64/sys/sparc64/include/tte.h#7 integrate
.. //depot/projects/ia64/sys/sparc64/include/vmparam.h#7 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/cache.c#7 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/exception.S#8 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/genassym.c#16 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/mp_machdep.c#13 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/pmap.c#27 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/tlb.c#5 integrate
.. //depot/projects/ia64/sys/sparc64/sparc64/tsb.c#11 integrate
.. //depot/projects/ia64/sys/sys/_types.h#8 integrate
.. //depot/projects/ia64/sys/sys/file.h#13 integrate
.. //depot/projects/ia64/sys/sys/socketvar.h#23 integrate
.. //depot/projects/ia64/sys/sys/types.h#21 integrate
.. //depot/projects/ia64/sys/vm/vm_contig.c#9 integrate
.. //depot/projects/ia64/sys/vm/vm_glue.c#20 integrate
.. //depot/projects/ia64/sys/vm/vm_kern.c#16 integrate
.. //depot/projects/ia64/sys/vm/vm_meter.c#8 integrate
.. //depot/projects/ia64/sys/vm/vm_object.c#32 integrate
.. //depot/projects/ia64/sys/x86_64/include/limits.h#3 integrate
.. //depot/projects/ia64/usr.bin/chpass/chpass.1#4 integrate
.. //depot/projects/ia64/usr.bin/colcrt/colcrt.1#3 integrate
.. //depot/projects/ia64/usr.bin/gencat/genlib.c#4 integrate
.. //depot/projects/ia64/usr.bin/leave/leave.1#3 integrate
.. //depot/projects/ia64/usr.bin/make/make.1#11 integrate
.. //depot/projects/ia64/usr.bin/paste/paste.1#5 integrate
.. //depot/projects/ia64/usr.bin/soelim/soelim.1#3 integrate
.. //depot/projects/ia64/usr.bin/unifdef/unifdef.1#8 integrate
.. //depot/projects/ia64/usr.bin/uuencode/uuencode.1#7 integrate
.. //depot/projects/ia64/usr.bin/xargs/xargs.1#10 integrate
.. //depot/projects/ia64/usr.sbin/ancontrol/ancontrol.8#5 integrate
.. //depot/projects/ia64/usr.sbin/newsyslog/newsyslog.c#12 integrate
.. //depot/projects/ia64/usr.sbin/sysinstall/menus.c#21 integrate
.. //depot/projects/ia64/usr.sbin/syslogd/syslog.conf.5#7 integrate

Differences ...

==== //depot/projects/ia64/UPDATING#26 (text+ko) ====

@@ -17,6 +17,15 @@
 	developers choose to disable these features on build machines
 	to maximize performance.
 
+20021222:
+ 	For a period after the GCC 3.2.1 import (from 12/04 to 12/22), GCC
+ 	used an incompatible form of ABI for returning structures and unions
+ 	which FreeBSD's GCC maintainers were not aware of relative to previous
+ 	versions of FreeBSD.  We have gone back to the ABI for now, and any
+ 	code compiled which is required to interoperate with other code (not
+ 	built at the same time) returning structs or unions should be 
+	rebuilt.
+
 20021216:
 	A name change in /etc/netconfig has been reverted to stay
 	compatible with with suns TIRPC and also with NetBSD. You need
@@ -1162,4 +1171,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.230 2002/12/16 22:24:24 mbr Exp $
+$FreeBSD: src/UPDATING,v 1.232 2002/12/22 07:08:14 kan Exp $

==== //depot/projects/ia64/bin/ps/ps.1#13 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)ps.1	8.3 (Berkeley) 4/18/94
-.\" $FreeBSD: src/bin/ps/ps.1,v 1.59 2002/10/24 00:00:57 rwatson Exp $
+.\" $FreeBSD: src/bin/ps/ps.1,v 1.60 2002/12/23 16:04:49 ru Exp $
 .\"
 .Dd April 18, 1994
 .Dt PS 1
@@ -269,7 +269,7 @@
 Marks a process which is in
 .Xr jail 2 .
 The hostname of the prison can be found in
-.Ql Li /proc/<pid>/status .
+.Ql /proc/<pid>/status .
 .It L
 Marks a process that is waiting to acquire a lock.
 .It R

==== //depot/projects/ia64/bin/sh/bltin/echo.c#3 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)echo.c	8.2 (Berkeley) 5/4/95
- * $FreeBSD: src/bin/sh/bltin/echo.c,v 1.11 2002/02/02 06:50:55 imp Exp $
+ * $FreeBSD: src/bin/sh/bltin/echo.c,v 1.12 2002/12/22 21:35:14 dwmalone Exp $
  */
 
 /*
@@ -80,7 +80,7 @@
 				case 'a':  c = '\a';  break;
 				case 'b':  c = '\b';  break;
 				case 'c':  return 0;		/* exit */
-				case 'e':  c = '\e';  break;
+				case 'e':  c = '\033';  break;
 				case 'f':  c = '\f';  break;
 				case 'n':  c = '\n';  break;
 				case 'r':  c = '\r';  break;

==== //depot/projects/ia64/bin/sh/sh.1#17 (text+ko) ====

@@ -33,7 +33,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
-.\" $FreeBSD: src/bin/sh/sh.1,v 1.81 2002/12/17 20:27:48 trhodes Exp $
+.\" $FreeBSD: src/bin/sh/sh.1,v 1.82 2002/12/23 15:21:38 ru Exp $
 .\"
 .Dd May 5, 1995
 .Dt SH 1
@@ -1792,7 +1792,7 @@
 is received.
 The signals are specified by name or number.
 In addition, the pseudo-signal
-.Ic EXIT
+.Cm EXIT
 may be used to specify an action that is performed when the shell terminates.
 The
 .Ar action

==== //depot/projects/ia64/contrib/gcc/config/i386/i386.c#8 (text+ko) ====

@@ -20,7 +20,7 @@
 Boston, MA 02111-1307, USA.  */
 
 
-/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.14 2002/12/04 16:04:26 obrien Exp $ */
+/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.15 2002/12/22 05:57:53 kan Exp $ */
 
 
 #include "config.h"
@@ -1244,7 +1244,6 @@
      specifying them, we will set the defaults in override_options.  */
   if (optimize >= 1)
     flag_omit_frame_pointer = 2;
-  flag_pcc_struct_return = 2;
   flag_asynchronous_unwind_tables = 2;
 }
 

==== //depot/projects/ia64/etc/rc#23 (text+ko) ====

@@ -25,7 +25,7 @@
 # SUCH DAMAGE.
 #
 #	@(#)rc	5.27 (Berkeley) 6/5/91
-# $FreeBSD: src/etc/rc,v 1.324 2002/12/18 07:21:30 mckusick Exp $
+# $FreeBSD: src/etc/rc,v 1.326 2002/12/23 07:09:44 dillon Exp $
 #
 
 # System startup script run by init on autoboot
@@ -50,30 +50,49 @@
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export HOME PATH
 
-# If there is a global system configuration file, suck it in.
-# XXX - The only purpose of duplicating it here is to catch rc_ng="YES"
+# check_rcng() is run in a subshell solely to determine the
+# RCNG mode.  We do not want to pollute our variable space
+# too soon so the procedure must be run in a subshell.  An
+# exit code of 3 indicates RCNG is enabled.
 #
-if [ -r /etc/defaults/rc.conf ]; then
-	. /etc/defaults/rc.conf
-	source_rc_confs
-elif [ -r /etc/rc.conf ]; then
-	. /etc/rc.conf
+check_rcng()
+{
+	if [ -r /etc/defaults/rc.conf ]; then
+		. /etc/defaults/rc.conf
+		source_rc_confs
+	elif [ -r /etc/rc.conf ]; then
+		. /etc/rc.conf
+	fi
+
+	# Diskless setups have to depend on a different mechanism since
+	# their config files haven't been retargeted yet.
+	#
+	[ -e /.rcng_yes ] && rc_ng="YES"
+	case ${rc_ng} in
+	[Yy][Ee][Ss])
+		exit 3
+		;;
+	*)
+		exit 0
+		;;
+	esac
+}
+
+( check_rcng )
+if [ $? = 3 ]; then
+    rc_ng=YES
+else
+    rc_ng=NO
 fi
 
-# Diskless setups have to depend on a different mechanism since
-# their config files haven't been retargeted yet.
-#
-[ -e /.rcng_yes ] && rc_ng="YES"
-
 case ${rc_ng} in
-[Yy][Ee][Ss])
+YES)
 	. /etc/rc.subr
 
-	# Load system configuration files. The 'XXX' is there because
-	# the function requires an argument that we don't need to use.
+	# Note: the system configuration files are loaded as part of
+	# the RCNG system (rc.d/rccond).  Do not load them here as it may
+	# interfere with diskless booting.
 	#
-	load_rc_config 'XXX'
-
 	if [ "$1" = autoboot ]; then
 		autoboot=yes
 		_boot="faststart"
@@ -88,13 +107,6 @@
 
 	for _rc_elem in ${files}; do
 		run_rc_script ${_rc_elem} ${_boot}
-		# Local FreeBSD hack to reload the rc.conf on
-		# a return status of 2
-		if [ $? -eq 2 ]; then
-			unset _rc_conf_loaded
-			load_rc_config 'XXX'
-			echo "Reloading rc.conf."
-		fi
 	done
 
 	echo ''

==== //depot/projects/ia64/etc/rc.d/Makefile#8 (text+ko) ====

@@ -1,5 +1,5 @@
 # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
-# $FreeBSD: src/etc/rc.d/Makefile,v 1.9 2002/11/09 07:45:53 imp Exp $
+# $FreeBSD: src/etc/rc.d/Makefile,v 1.10 2002/12/22 22:25:53 dillon Exp $
 
 .include <bsd.own.mk>
 
@@ -12,7 +12,7 @@
 	mountd moused mroute6d mrouted msgs named network1 network2 \
 	network3 network_ipv6 nfsclient nfsd nfslocking nfsserver ntpd \
 	ntpdate othermta pccard pcvt ppp-user pppoed pwcheck quota random \
-	rarpd root route6d routed rpcbind rtadvd rwho savecore \
+	rarpd rcconf.sh root route6d routed rpcbind rtadvd rwho savecore \
 	securelevel sendmail serial sppp sshd swap1 syscons sysctl \
 	syslogd timed ttys usbd vinum virecover ypbind yppasswdd ypserv \
 	ypset ypupdated ypxfrd

==== //depot/projects/ia64/etc/rc.d/devd#3 (text+ko) ====

@@ -1,8 +1,9 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/devd,v 1.2 2002/11/30 00:40:53 imp Exp $
+# $FreeBSD: src/etc/rc.d/devd,v 1.3 2002/12/22 22:18:41 dillon Exp $
 #
 
+# REQUIRE: rcconf
 # PROVIDE: devd
 # BEFORE: disks
 # KEYWORD: FreeBSD

==== //depot/projects/ia64/etc/rc.d/diskless#7 (text+ko) ====

@@ -24,11 +24,11 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.d/diskless,v 1.23 2002/10/12 10:31:31 schweikh Exp $
+# $FreeBSD: src/etc/rc.d/diskless,v 1.24 2002/12/22 22:18:41 dillon Exp $
 #
 
 # PROVIDE: diskless
-# REQUIRE: initdiskless mountcritlocal
+# REQUIRE: initdiskless rcconf mountcritlocal
 # BEFORE: addswap random
 # KEYWORD: FreeBSD
 
@@ -42,14 +42,12 @@
 # as close as possible between 5-current and 4-stable.
 #   $1 = size
 #   $2 = mount point
-#   $3 = md unit number (ignored in pre 5.0 systems)
-#   $4 = (optional) bytes-per-inode
-mount_md()
-{
-	if [ -n "$4" ]; then
-		bpi="-i $4"
+#   $3 = (optional) bytes-per-inode
+mount_md() {
+	if [ -n "$3" ]; then
+		bpi="-i $3"
 	fi
-	/sbin/mdmfs $bpi -s $1 -M md$3 $2
+	/sbin/mdmfs $bpi -s $1 -M md $2
 }
 
 # If there is a global system configuration file, suck it in.
@@ -64,16 +62,36 @@
 	. /etc/rc.conf
 fi
 
-echo "+++ mount_md of /var"
-mount_md ${varsize:=32m} /var 1
+# If we do not have a writable /var, create a memory
+# filesystem for /var.  We don't have /usr yet so
+# use mkdir instead of touch to test.  We want mount
+# to record its mounts so we have to make sure /var/db
+# exists before doing the mount -a.
+#
+if (/bin/mkdir /var/.diskless 2> /dev/null); then
+        rmdir /var/.diskless
+else
+	echo "+++ mount_md of /var"
+	mount_md ${varsize:=32m} /var
+fi
+
+if [ ! -d /var/db ]; then
+	mkdir /var/db
+fi
+
+# Now we need the rest of our mounts, particularly /usr
+#
+mount -a       # chown and chgrp are in /usr
 
+# Populate /var
+#
 echo "+++ populate /var using /etc/mtree/BSD.var.dist"
-/usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var
+/usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null
 case ${sendmail_enable} in
 [Nn][Oo][Nn][Ee])
 	;;
 *)
-	/usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p /
+	/usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / > /dev/null
 	;;
 esac
 
@@ -86,34 +104,62 @@
 echo "+++ create lastlog"
 /usr/bin/touch /var/log/lastlog
 
-mount -a       # chown and chgrp are in /usr
+# Make sure our aliases database is uptodate, the aliases may have
+# been overriden in /conf.
+#
+/usr/bin/newaliases
 
-# Since we are starting with a very fresh /etc on an MFS:
-if [ -d /conf/default/etc ]; then
-	newaliases
-fi
-
-#
 # XXX make sure to create one dir for each printer as requested by lpd
 #
-
-# If /tmp is a symlink, assume it points to somewhere writable, like
-# /var/tmp, otherwise, use a small memory filesystem for /tmp.
+# If we do not have a writable /tmp, create a memory
+# filesystem for /tmp.  If /tmp is a symlink (e.g. to /var/tmp,
+# then it should already be writable).
 #
-# XXX: mtree runs too early to create any directories needed in /tmp,
-# so if /var/tmp == /tmp, then you don't get a vi.recover.
-#
-if [ ! -L /tmp ]; then
-	mount_md ${tmpsize:=64m} /tmp 2
-	chmod 01777 /tmp
+if (/bin/mkdir /tmp/.diskless 2> /dev/null); then
+	rmdir /tmp/.diskless
+else
+	if [ -h /tmp ]; then
+		echo "*** /tmp is a symlink to a non-writable area!"
+		echo "dropping into shell, ^D to continue anyway."
+		/bin/sh
+	else
+		mount_md ${tmpsize:=20480} /tmp
+		chmod 01777 /tmp
+	fi
 fi
 
-if sysctl vfs.devfs.generation > /dev/null 2>&1; then
+if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
 	# we have DEVFS, no worries...
 	true
+elif (/bin/mkdir /dev/.diskless 2> /dev/null); then
+	# if /dev is writable assume it has already been populated
+	# via rc.diskless1
+	#
+	rmdir /dev/.diskless
 else
-	# extract a list of device entries, then copy them to a writable fs
 	(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp
-	mount_md 4096 /dev 3 512
+	mount_md 4096 /dev 512
 	(cd /; cpio -i -H newc -d < /tmp/dev.tmp)
+	rm -f /tmp/dev.tmp
+fi
+
+# generate our hostname
+#
+if [ -z "`hostname -s`" ]; then
+        hostname=`/usr/bin/kenv dhcp.host-name`
+        hostname $hostname
+	echo "Hostname is $hostname"
 fi
+
+# if the info is available via dhcp/kenv
+# build the resolv.conf
+#
+if [ ! -e /etc/resolv.conf ]; then
+        echo domain `/usr/bin/kenv dhcp.domain-name` > /etc/resolv.conf
+
+        set `/usr/bin/kenv dhcp.domain-name-servers`
+        for ns in `IFS=','; echo $*`; do
+                echo nameserver $ns >> /etc/resolv.conf;
+        done
+fi
+

==== //depot/projects/ia64/etc/rc.d/initdiskless#6 (text+ko) ====

@@ -24,27 +24,64 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.d/initdiskless,v 1.21 2002/10/12 10:31:31 schweikh Exp $
+# $FreeBSD: src/etc/rc.d/initdiskless,v 1.22 2002/12/22 22:18:41 dillon Exp $
 #
-
 # PROVIDE: initdiskless
 # KEYWORD: FreeBSD
 
+ 
+# On entry to this script the entire system consists of a read-only root
+# mounted via NFS.  We use the contents of /conf to create and populate
+# memory filesystems.  The kernel has run BOOTP and configured an interface
+# (otherwise it would not have been able to mount the NFS root!)
+#
+# The following directories are scanned.  Each sucessive directory overrides
+# (is merged into) the previous one.
+#
+#	/conf/base		universal base
+#	/conf/default		modified by a secondary universal base
+#	/conf/${ipba}		modified based on the assigned broadcast IP
+#	/conf/${ip}		modified based on the machine's assigned IP
+#
+# Each of these directories may contain any number of subdirectories which
+# represent directories in / on the diskless machine.  The existance of
+# these subdirectories causes this script to create a MEMORY FILESYSTEM for
+# /<sub_directory_name>.  For example, if /conf/base/etc exists then a
+# memory filesystem will be created for /etc.
+#
+# If a subdirectory contains the file 'diskless_remount' the contents of
+# the file is used to remount the subdirectory prior to it being copied to
+# the memory filesystem.  For example, if /conf/base/etc/diskless_remount
+# contains the string 'my.server.com:/etc' then my.server.com:/etc will be
+# mounted in place of the subdirectory.  This allows you to avoid making
+# duplicates of system directories in /conf.
+#
+# If a subdirectory contains the file 'md_size', the contents of the
+# file is used to determine the size of the memory filesystem, in 512
+# byte sectors.  The default is 8192 (4MB).  You only have to specify an
+# md_size if the default doesn't work for you (i.e. if it is too big or
+# too small).  Note that in -current the default is 4096 (2MB).  For
+# example, /conf/base/etc/md_size might contain '16384'.
+#
+# If /conf/<special_dir>/SUBDIR.cpio.gz exists, the file is cpio'd into
+# the specified /SUBDIR (and a memory filesystem is created for /SUBDIR
+# if necessary).
+#
+# If /conf/<special_dir>/SUBDIR.remove exists, the file contains a list
+# of paths which are rm -rf'd relative to /SUBDIR.
+#
+# You will almost universally want to create a /conf/base/etc containing
+# a diskless_remount and possibly an md_size file.  You will then almost
+# universally want to override rc.conf, rc.local, and fstab by creating
+# /conf/default/etc/{rc.conf,rc.local,fstab}.  Your fstab should be sure
+# to mount a /usr... typically an NFS readonly /usr.
+#
+# NOTE!  rc.diskless2 will create /var, /tmp, and /dev.  Those filesystems
+# should not be specified in /conf.  At least not yet.
+
 dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
 [ ${dlv:=0} -eq 0 ] && exit 0
 
-#
-# BOOTP has mounted / for us.  Assume a read-only mount.  We must then
-# - figure out our IP by querying the interface
-# - mount /etc as an MFS
-# - populate /etc from /conf/default version
-# - override files in /etc with files from /conf/*/etc where
-#   '*' is default, netmask of client, ip-address of client
-#
-# The operator is in charge of setting /conf/*/etc/* things as appropriate.
-# Typically rc.conf and fstab need to be changed, but possibly also other
-# files such as inetd.conf etc.
-
 # chkerr:
 #
 # Routine to check for error
@@ -52,22 +89,37 @@
 #	checks error code and drops into shell on failure.
 #	if shell exits, terminates script as well as /etc/rc.
 #
-chkerr()
-{
-	case $1 in
-	0)
-		;;
-	*)
-		echo "$2 failed: dropping into /bin/sh"
-		/bin/sh
-		# RESUME
-		;;
-	esac
+chkerr() {
+    case $1 in
+    0)
+	;;
+    *)
+	echo "$2 failed: dropping into /bin/sh"
+	/bin/sh
+	# RESUME
+	;;
+    esac
+}
+
+# Create a generic memory disk
+#
+mount_md() {
+    /sbin/mdmfs -i 4096 -s $1 -M md $2
 }
 
-mount_md()
-{
-	/sbin/mdmfs -i 4096 -s $1 -M md$3 $2
+# Create the memory filesystem if it has not already been created
+#
+create_md() {
+    if [ "x`eval echo \\$md_created_$1`" = "x" ]; then
+	if [ "x`eval echo \$md_size_$1`" = "x" ]; then
+	    md_size=4096
+	else
+	    md_size=`eval echo \\$md_size_$1`
+	fi
+	mount_md $md_size /$1
+	/bin/chmod 755 /$1
+	eval md_created_$1=created
+    fi
 }
 
 # DEBUGGING
@@ -81,62 +133,91 @@
 bootp_ipbca=""
 iflist=`ifconfig -l`
 for i in ${iflist} ; do
-	set `ifconfig ${i}`
-	while [ $# -ge 1 ] ; do
-		if [ "${bootp_ifc}" = "" -a "$1" = "inet" ]; then
-			bootp_ifc=${i} ; bootp_ipa=${2} ; shift
-		fi
-		if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ]; then
-			bootp_ipbca=$2; shift
-		fi
-		shift
-	done
-	if [ "${bootp_ifc}" != "" ]; then
-		break
-	fi
+    set `ifconfig ${i}`
+    while [ $# -ge 1 ] ; do
+        if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then
+            bootp_ifc=${i} ; bootp_ipa=${2} ; shift
+        fi
+        if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then
+            bootp_ipbca=$2; shift
+        fi
+        shift
+    done
+    if [ "${bootp_ifc}" != "" ] ; then
+        break
+    fi
 done
 echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"
 
-if [ -z "`hostname -s`" ]; then
-	hostname=`kenv dhcp.host-name`
-	hostname $hostname
-	echo "Hostname is $hostname"
-fi
-
-if [ -d /conf/default/etc ]; then
-	mount_md 4096 /etc 0
-	chkerr $? "MFS mount on /etc"
-	/bin/chmod 755 /etc
-
-	/bin/cp -Rp /conf/default/etc/* /etc
-	chkerr $? "cp /conf/default/etc to /etc MFS"
-fi
-
-# Allow for override files to replace files in /etc.  Use /conf/*/etc to find
-# the override files.  First choice is default files that # always override,
-# then files that from the directory that matches the client's broadcast
-# address, finally followed by overrides that match the client's IP address.
+# Resolve templates in /conf/base, /conf/default, /conf/${bootp_ipbca},
+# and /conf/${bootp_ipa}.  For each subdirectory found within these 
+# directories:
+#
+# - calculate memory filesystem sizes.  If the subdirectory (prior to
+#   NFS remounting) contains the file 'md_size', the contents specified
+#   in 512 byte sectors will be used to size the memory filesystem.  Otherwise
+#   8192 sectors (4MB) is used.
+#
+# - handle NFS remounts.  If the subdirectory contains the file
+#   diskless_remount, the contents of the file is NFS mounted over
+#   the directory.  For example /conf/base/etc/diskless_remount
+#   might contain 'myserver:/etc'.  NFS remounts allow you to avoid
+#   having to dup your system directories in /conf.  Your server must
+#   be sure to export those filesystems -alldirs, however.
 #
-# This way we have some flexibility to handle clusters of machines on
-# separate subnets.
+for i in base default ${bootp_ipbca} ${bootp_ipa} ; do
+    for j in /conf/$i/* ; do
+	# memory filesystem size specification
+	#
+	subdir=${j##*/}
+	if [ -d $j -a -f $j/md_size ]; then
+	    eval md_size_$subdir=`cat $j/md_size`
+	fi
 
-for i in ${bootp_ipbca} ${bootp_ipa} ${hostname} ; do
-	if [ -d /conf/${i}/etc ]; then
-		cp -Rp /conf/${i}/etc/* /etc
+	# NFS remount
+	#
+	if [ -d $j -a -f $j/diskless_remount ]; then
+	    nfspt=`/bin/cat $j/diskless_remount`
+	    mount_nfs $nfspt $j
+	    chkerr $? "mount_nfs $nfspt $j"
 	fi
+    done
 done
 
+# - Create all required MFS filesystems and populate them from
+#   our templates.  Support both a direct template and a dir.cpio.gz
+#   archive.  Support dir.remove files containing a list of relative
+#   paths to remove.
 #
-# if the info is available via dhcp/kenv
-# build the resolv.conf
-#
-if [ ! -e /etc/resolv.conf ]; then
-	echo domain `kenv dhcp.domain-name` > /etc/resolv.conf
+# TODO:
+#   + find a way to assign a 'group' identifier to a machine
+#	so we can use group-specific configurations;
 
-	set `kenv dhcp.domain-name-servers`
-	for ns in `IFS=','; echo $*`; do
-		echo nameserver $ns >> /etc/resolv.conf;
-	done
-fi
+for i in base default ${bootp_ipbca} ${bootp_ipa} ; do
+    for j in /conf/$i/* ; do
+	subdir=${j##*/}
+	if [ -d $j ]; then
+	    create_md $subdir
+	    cp -Rp $j/* /$subdir
+	fi
+    done
+    for j in /conf/$i/*.cpio.gz ; do
+	subdir=${j%*.cpio.gz}
+	subdir=${subdir##*/}
+	if [ -f $j ]; then
+	    create_md $subdir
+	    echo "Loading /$subdir from cpio archive $j"
+	    (cd / ; /stand/gzip -d < $j | /stand/cpio --extract -d )
+	fi
+    done
+    for j in /conf/$i/*.remove ; do
+	subdir=${j%*.remove}
+	subdir=${subdir##*/}
+	if [ -f $j ]; then
+	    # doubly sure it is a memory disk before rm -rf'ing
+	    create_md $subdir
+	    (cd /$subdir; rm -rf `/bin/cat $j`)
+	fi
+    done
+done
 
-exit 2		# Tell /etc/rc to re-source rc.conf

==== //depot/projects/ia64/include/limits.h#4 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)limits.h	8.2 (Berkeley) 1/4/94
- * $FreeBSD: src/include/limits.h,v 1.14 2002/10/27 18:03:02 wollman Exp $
+ * $FreeBSD: src/include/limits.h,v 1.15 2002/12/22 06:38:44 tjr Exp $
  */
 
 #ifndef _LIMITS_H_
@@ -123,6 +123,8 @@
 #define	NL_TEXTMAX		2048
 #endif
 
+#define	MB_LEN_MAX		6	/* 31-bit UTF-8 */
+
 #include <machine/limits.h>
 
 #if __POSIX_VISIBLE

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

@@ -16,7 +16,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/setproctitle.c,v 1.16 2002/03/29 22:43:41 markm Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/setproctitle.c,v 1.17 2002/12/21 22:04:50 bbraun Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -62,11 +62,11 @@
 setproctitle(const char *fmt, ...)
 {
 	static struct ps_strings *ps_strings;
-	static char buf[SPT_BUFSIZE];
-	static char obuf[SPT_BUFSIZE];
+	static char *buf = NULL;
+	static char *obuf = NULL;
 	static char **oargv, *kbuf;
 	static int oargc = -1;
-	static char *nargv[2] = { buf, NULL };
+	static char *nargv[2] = { NULL, NULL };
 	char **nargvp;
 	int nargc;
 	int i;
@@ -75,10 +75,23 @@
 	unsigned long ul_ps_strings;
 	int oid[4];
 
+	if (buf == NULL) {
+		buf = malloc(SPT_BUFSIZE);
+		if (buf == NULL) 
+			return;
+		nargv[0] = buf;
+	}
+
+	if (obuf == NULL ) {
+		obuf = malloc(SPT_BUFSIZE);
+		if (obuf == NULL)
+			return;
+	}
+
 	va_start(ap, fmt);
 
 	if (fmt) {
-		buf[sizeof(buf) - 1] = '\0';
+		buf[SPT_BUFSIZE - 1] = '\0';
 
 		if (fmt[0] == '-') {
 			/* skip program name prefix */
@@ -86,12 +99,12 @@
 			len = 0;
 		} else {
 			/* print program name heading for grep */
-			(void)snprintf(buf, sizeof(buf), "%s: ", _getprogname());
+			(void)snprintf(buf, SPT_BUFSIZE, "%s: ", _getprogname());
 			len = strlen(buf);
 		}
 
 		/* print the argument string */
-		(void) vsnprintf(buf + len, sizeof(buf) - len, fmt, ap);
+		(void) vsnprintf(buf + len, SPT_BUFSIZE - len, fmt, ap);
 
 		nargvp = nargv;
 		nargc = 1;
@@ -140,12 +153,12 @@
 					oargc = i;
 					break;
 				}
-				snprintf(obuf + len, sizeof(obuf) - len, "%s%s",
+				snprintf(obuf + len, SPT_BUFSIZE - len, "%s%s",
 				    len ? " " : "", oargv[i]);
 				if (len)
 					len++;
 				len += strlen(oargv[i]);
-				if (len >= sizeof(obuf))
+				if (len >= SPT_BUFSIZE)
 					break;
 			}
 		}
@@ -155,7 +168,7 @@
 		/* style #2 - we can only restore our first arg :-( */
 		if (*obuf == '\0')
 			strncpy(obuf, OLD_PS_STRINGS->old_ps_argvstr,
-			    sizeof(obuf) - 1);
+			    SPT_BUFSIZE - 1);
 		OLD_PS_STRINGS->old_ps_nargvstr = 1;
 		OLD_PS_STRINGS->old_ps_argvstr = nargvp[0];
 	}

==== //depot/projects/ia64/lib/libc/i386/stdlib/div.S#5 (text+ko) ====

@@ -1,19 +1,41 @@
 /*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
+ * Copyright (c) 1993 Winning Strategies, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Winning Strategies, Inc.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/i386/stdlib/div.S,v 1.9 2002/12/21 05:11:39 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/i386/stdlib/div.S,v 1.10 2002/12/22 06:41:09 kan Exp $");
 
 ENTRY(div)
-	pushl	%ebx
-	movl	8(%esp),%ebx
-	movl	12(%esp),%eax
-	movl	16(%esp),%ecx
-	cdq
-	idiv	%ecx
-	movl	%eax,(%ebx)
-	movl	%edx,4(%ebx)
-	popl	%ebx
-	ret	$4
+        movl    4(%esp),%eax
+        movl    8(%esp),%ecx
+        cdq
+        idiv    %ecx
+        movl    %eax,4(%esp)
+        movl    %edx,8(%esp)
+        ret

==== //depot/projects/ia64/lib/libc/i386/stdlib/ldiv.S#5 (text+ko) ====

@@ -1,19 +1,41 @@
 /*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
+ * Copyright (c) 1993 Winning Strategies, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.

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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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