Date: Sat, 21 Dec 2002 12:14:38 -0800 (PST) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 22594 for review Message-ID: <200212212014.gBLKEcSI017249@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=22594 Change 22594 by marcel@marcel_vaio on 2002/12/21 12:14:08 IFC @22593 Affected files ... .. //depot/projects/ia64/crypto/openssh/auth2-pam-freebsd.c#7 integrate .. //depot/projects/ia64/etc/rc.diskless1#5 integrate .. //depot/projects/ia64/lib/libc/gen/basename.c#3 integrate .. //depot/projects/ia64/lib/libc/gen/dirname.c#3 integrate .. //depot/projects/ia64/lib/libc/i386/stdlib/div.S#4 integrate .. //depot/projects/ia64/lib/libc/i386/stdlib/ldiv.S#4 integrate .. //depot/projects/ia64/lib/libc/stdio/printf.3#16 integrate .. //depot/projects/ia64/lib/libc/stdio/scanf.3#9 integrate .. //depot/projects/ia64/lib/libc/stdlib/malloc.3#11 integrate .. //depot/projects/ia64/lib/libc/string/strerror.c#7 integrate .. //depot/projects/ia64/lib/libstand/zalloc.c#2 integrate .. //depot/projects/ia64/share/examples/IPv6/USAGE#3 integrate .. //depot/projects/ia64/share/man/man4/mac_biba.4#6 integrate .. //depot/projects/ia64/share/man/man4/mac_mls.4#5 integrate .. //depot/projects/ia64/share/man/man4/mac_partition.4#2 integrate .. //depot/projects/ia64/share/man/man4/pst.4#3 integrate .. //depot/projects/ia64/share/man/man4/vga.4#2 integrate .. //depot/projects/ia64/sys/boot/i386/boot2/Makefile#10 integrate .. //depot/projects/ia64/sys/boot/i386/boot2/boot2.c#14 integrate .. //depot/projects/ia64/sys/boot/sparc64/loader/Makefile#11 integrate .. //depot/projects/ia64/sys/dev/pst/pst-pci.c#2 integrate .. //depot/projects/ia64/sys/dev/usb/ohci.c#14 integrate .. //depot/projects/ia64/sys/dev/usb/umass.c#14 integrate .. //depot/projects/ia64/sys/kern/imgact_elf.c#25 integrate .. //depot/projects/ia64/sys/kern/kern_jail.c#11 integrate .. //depot/projects/ia64/sys/kern/kern_subr.c#13 integrate .. //depot/projects/ia64/sys/kern/kern_time.c#13 integrate .. //depot/projects/ia64/sys/net/rtsock.c#14 integrate .. //depot/projects/ia64/sys/netinet/ip_icmp.c#9 integrate .. //depot/projects/ia64/sys/netinet/tcp_input.c#29 integrate .. //depot/projects/ia64/sys/netinet/tcp_syncache.c#14 integrate .. //depot/projects/ia64/sys/netinet6/icmp6.c#9 integrate .. //depot/projects/ia64/sys/sparc64/include/atomic.h#3 integrate .. //depot/projects/ia64/sys/sparc64/include/pmap.h#12 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/pmap.c#26 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/tsb.c#10 integrate .. //depot/projects/ia64/sys/sys/time.h#11 integrate .. //depot/projects/ia64/sys/vm/vm_kern.c#15 integrate .. //depot/projects/ia64/sys/vm/vm_object.c#31 integrate .. //depot/projects/ia64/sys/vm/vm_object.h#12 integrate .. //depot/projects/ia64/usr.bin/chpass/chpass.1#3 integrate .. //depot/projects/ia64/usr.bin/mklocale/mklocale.1#5 integrate .. //depot/projects/ia64/usr.bin/mklocale/yacc.y#7 integrate .. //depot/projects/ia64/usr.bin/who/who.c#10 integrate .. //depot/projects/ia64/usr.bin/xargs/xargs.1#9 integrate .. //depot/projects/ia64/usr.bin/xargs/xargs.c#20 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/sysinstall.8#7 integrate Differences ... ==== //depot/projects/ia64/crypto/openssh/auth2-pam-freebsd.c#7 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include "includes.h" -RCSID("$FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.7 2002/12/14 13:52:39 des Exp $"); +RCSID("$FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.8 2002/12/21 15:09:58 des Exp $"); #ifdef USE_PAM #include <security/pam_appl.h> @@ -294,6 +294,8 @@ xfree(ctxt); return (NULL); } + ctxt->pam_psock = socks[0]; + ctxt->pam_csock = socks[1]; if (pthread_create(&ctxt->pam_thread, NULL, pam_thread, ctxt) == -1) { error("PAM: failed to start authentication thread: %s", strerror(errno)); @@ -302,8 +304,6 @@ xfree(ctxt); return (NULL); } - ctxt->pam_psock = socks[0]; - ctxt->pam_csock = socks[1]; fatal_add_cleanup(pam_thread_cleanup, ctxt); return (ctxt); } ==== //depot/projects/ia64/etc/rc.diskless1#5 (text+ko) ==== @@ -1,43 +1,58 @@ -# Copyright (c) 1999 Matt Dillion -# All rights reserved. +# Copyright (c) 1999-2002 Matt Dillion. Terms and conditions based on +# the FreeBSD copyright as found at the base of the source distribution. +# +# $FreeBSD: src/etc/rc.diskless1,v 1.18 2002/12/21 00:30:08 dillon Exp $ +# +# /etc/rc.diskless1 - general BOOTP startup +# +# 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 # -# 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. +# 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. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +# 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. # -# $FreeBSD: src/etc/rc.diskless1,v 1.17 2002/07/28 03:41:53 dd Exp $ +# 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). # -# /etc/rc.diskless1 - general BOOTP startup +# If /conf/<special_dir>/SUBDIR.remove exists, the file contains a list +# of paths which are rm -rf'd relative to /SUBDIR. # -# 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 +# 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. # -# 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. +# NOTE! rc.diskless2 will create /var, /tmp, and /dev. Those filesystems +# should not be specified in /conf. At least not yet. # chkerr: # @@ -47,22 +62,39 @@ # 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 + case $1 in + 0) + ;; + *) + echo "$2 failed: dropping into /bin/sh" + /bin/sh + # RESUME + ;; + esac } +# Create a generic memory disk +# mount_md() { - /sbin/mdconfig -a -t malloc -s $1 -u $3 - /sbin/disklabel -r -w md$3 auto - /sbin/newfs -i 4096 /dev/md$3c - /sbin/mount /dev/md$3c $2 + /sbin/mdconfig -a -t malloc -s $1 -u $3 + /sbin/disklabel -r -w md$3 auto + /sbin/newfs -i 4096 /dev/md$3c + /sbin/mount /dev/md$3c $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 0 + /bin/chmod 755 /$1 + eval md_created_$1=created + fi } # DEBUGGING @@ -92,36 +124,83 @@ 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 +# 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. +# +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 -if [ -d /conf/default/etc ]; then - mount_md 4096 /etc 0 - chkerr $? "MFS mount on /etc" - /bin/chmod 755 /etc + # NFS remount + # + if [ -d $j -a -f $j/diskless_remount ]; then + mount_nfs `/bin/cat $j/diskless_remount` $j + chkerr $? "mount_nfs `/bin/cat $j/diskless_remount` $j" + fi + done +done - /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. +# - 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. # -# This way we have some flexibility to handle clusters of machines on -# separate subnets. +# TODO: +# + find a way to assign a 'group' identifier to a machine +# so we can use group-specific configurations; -for i in ${bootp_ipbca} ${bootp_ipa} ${hostname} ; do - if [ -d /conf/${i}/etc ]; then - cp -Rp /conf/${i}/etc/* /etc +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 -# +if [ -z "`hostname -s`" ]; then + hostname=`kenv dhcp.host-name` + hostname $hostname + echo "Hostname is $hostname" +fi + # if the info is available via dhcp/kenv # build the resolv.conf # @@ -142,3 +221,4 @@ # want to run the standard system /etc/rc.diskless2 diskless_mount="/etc/rc.diskless2" + ==== //depot/projects/ia64/lib/libc/gen/basename.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/gen/basename.c,v 1.5 2002/02/01 01:08:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/basename.c,v 1.6 2002/12/21 07:12:35 bbraun Exp $"); #include <errno.h> #include <libgen.h> @@ -42,9 +42,15 @@ basename(path) const char *path; { - static char bname[MAXPATHLEN]; + static char *bname = NULL; const char *endp, *startp; + if (bname == NULL) { + bname = (char *)malloc(MAXPATHLEN); + if (bname == NULL) + return(NULL); + } + /* Empty or NULL string gets treated as "." */ if (path == NULL || *path == '\0') { (void)strcpy(bname, "."); @@ -67,7 +73,7 @@ while (startp > path && *(startp - 1) != '/') startp--; - if (endp - startp + 2 > sizeof(bname)) { + if (endp - startp + 2 > MAXPATHLEN) { errno = ENAMETOOLONG; return(NULL); } ==== //depot/projects/ia64/lib/libc/gen/dirname.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/gen/dirname.c,v 1.5 2002/02/01 01:08:48 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/dirname.c,v 1.6 2002/12/21 07:12:35 bbraun Exp $"); #include <errno.h> #include <libgen.h> @@ -42,9 +42,15 @@ dirname(path) const char *path; { - static char bname[MAXPATHLEN]; + static char *bname = NULL; const char *endp; + if (bname == NULL) { + bname = (char *)malloc(MAXPATHLEN); + if (bname == NULL) + return(NULL); + } + /* Empty or NULL string gets treated as "." */ if (path == NULL || *path == '\0') { (void)strcpy(bname, "."); @@ -70,7 +76,7 @@ } while (endp > path && *endp == '/'); } - if (endp - path + 2 > sizeof(bname)) { + if (endp - path + 2 > MAXPATHLEN) { errno = ENAMETOOLONG; return(NULL); } ==== //depot/projects/ia64/lib/libc/i386/stdlib/div.S#4 (text+ko) ==== @@ -1,41 +1,19 @@ /* - * 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. + * Written by J.T. Conklin <jtc@netbsd.org>. + * Public domain. */ #include <machine/asm.h> -__FBSDID("$FreeBSD: src/lib/libc/i386/stdlib/div.S,v 1.8 2002/06/02 20:05:25 schweikh Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/i386/stdlib/div.S,v 1.9 2002/12/21 05:11:39 tjr Exp $"); ENTRY(div) - movl 4(%esp),%eax - movl 8(%esp),%ecx - cdq - idiv %ecx - movl %eax,4(%esp) - movl %edx,8(%esp) - ret + 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 ==== //depot/projects/ia64/lib/libc/i386/stdlib/ldiv.S#4 (text+ko) ==== @@ -1,41 +1,19 @@ /* - * 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. + * Written by J.T. Conklin <jtc@netbsd.org>. + * Public domain. */ #include <machine/asm.h> -__FBSDID("$FreeBSD: src/lib/libc/i386/stdlib/ldiv.S,v 1.8 2002/06/02 20:05:25 schweikh Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/i386/stdlib/ldiv.S,v 1.9 2002/12/21 05:11:39 tjr Exp $"); ENTRY(ldiv) - movl 4(%esp),%eax - movl 8(%esp),%ecx - cdq - idiv %ecx - movl %eax,4(%esp) - movl %edx,8(%esp) - ret + 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 ==== //depot/projects/ia64/lib/libc/stdio/printf.3#16 (text+ko) ==== @@ -34,9 +34,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdio/printf.3,v 1.53 2002/12/18 12:45:10 ru Exp $ +.\" $FreeBSD: src/lib/libc/stdio/printf.3,v 1.54 2002/12/20 08:28:10 tjr Exp $ .\" -.Dd November 8, 2001 +.Dd December 20, 2002 .Dt PRINTF 3 .Os .Sh NAME @@ -111,7 +111,7 @@ These functions return the number of characters printed (not including the trailing .Ql \e0 -used to end output to strings), +used to end output to strings) or a negative value if an output error occurs, except for .Fn snprintf and @@ -767,6 +767,18 @@ Always use the proper secure idiom: .Pp .Dl "snprintf(buffer, sizeof(buffer), \*q%s\*q, string);" +.Sh ERRORS +In addition to the errors documented for the +.Xr write 2 +system call, the +.Fn printf +family of functions may fail if: +.Bl -tag -width Er +.It Bq Er EILSEQ +An invalid wide character code was encountered. +.It Bq Er ENOMEM +Insufficient storage space is available. +.El .Sh SEE ALSO .Xr printf 1 , .Xr fmtcheck 3 , ==== //depot/projects/ia64/lib/libc/stdio/scanf.3#9 (text+ko) ==== @@ -34,9 +34,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)scanf.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/stdio/scanf.3,v 1.21 2002/12/04 18:57:45 ru Exp $ +.\" $FreeBSD: src/lib/libc/stdio/scanf.3,v 1.22 2002/12/20 07:46:01 tjr Exp $ .\" -.Dd December 11, 1993 +.Dd December 20, 2002 .Dt SCANF 3 .Os .Sh NAME @@ -486,8 +486,11 @@ The functions .Fn fscanf , .Fn scanf , +.Fn sscanf , +.Fn vfscanf , +.Fn vscanf and -.Fn sscanf +.Fn vsscanf conform to .St -isoC-99 . .Sh BUGS ==== //depot/projects/ia64/lib/libc/stdlib/malloc.3#11 (text+ko) ==== @@ -34,7 +34,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.58 2002/12/18 13:33:03 ru Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.59 2002/12/20 01:01:24 trhodes Exp $ .\" .Dd August 27, 1996 .Dt MALLOC 3 @@ -304,14 +304,17 @@ to the allocated memory if successful; otherwise a .Dv NULL -pointer is returned, in which case the -memory referenced by -.Fa ptr -is still available and intact. -In the case of memory allocation failure, +pointer is returned, and .Va errno is set to -.Er ENOMEM . +.Er ENOMEM +if the error was the result of an allocation failure. +The +.Fn realloc +function always leaves the original buffer intact +when an error occurs, whereas +.Fn reallocf +deallocates it in this case. .Pp The .Fn free ==== //depot/projects/ia64/lib/libc/string/strerror.c#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -35,26 +35,30 @@ static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/string/strerror.c,v 1.9 2002/12/18 16:53:31 mike Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/string/strerror.c,v 1.10 2002/12/20 05:26:10 mike Exp $"); #include <errno.h> #include <stdio.h> #include <string.h> #define UPREFIX "Unknown error: " + /* * Define a buffer size big enough to describe a 64-bit signed integer * converted to ASCII decimal (19 bytes), with an optional leading sign - * (1 byte), finally we get the prefix and a trailing NUL from UPREFIX. + * (1 byte); finally, we get the prefix and a trailing NUL from UPREFIX. */ #define EBUFSIZE (20 + sizeof(UPREFIX)) -/* Don't link to stdio(3) to avoid bloat for statically linked binaries. */ +/* + * Doing this by hand instead of linking with stdio(3) avoids bloat for + * statically linked binaries. + */ static void errstr(int num, char *buf, size_t len) { + char *p, *t; unsigned int uerr; - char *p, *t; char tmp[EBUFSIZE]; if (strlcpy(buf, UPREFIX, len) >= len) @@ -66,7 +70,7 @@ } while (uerr /= 10); if (num < 0) *t++ = '-'; - for (p = buf + strlen(UPREFIX); t > tmp && p < buf + len - 1;) + for (p = buf + sizeof(UPREFIX) - 1; t > tmp && p < buf + len - 1;) *p++ = *--t; *p = '\0'; } @@ -74,15 +78,14 @@ int strerror_r(int errnum, char *strerrbuf, size_t buflen) { - int retval; - retval = 0; if (errnum < 1 || errnum >= sys_nerr) { errstr(errnum, strerrbuf, buflen); - retval = EINVAL; - } else if (strlcpy(strerrbuf, sys_errlist[errnum], buflen) >= buflen) - retval = ERANGE; - return (retval); + return (EINVAL); + } + if (strlcpy(strerrbuf, sys_errlist[errnum], buflen) >= buflen) + return (ERANGE); + return (0); } char * ==== //depot/projects/ia64/lib/libstand/zalloc.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libstand/zalloc.c,v 1.6 2001/09/30 22:28:01 dillon Exp $"); +__FBSDID("$FreeBSD: src/lib/libstand/zalloc.c,v 1.7 2002/12/19 23:23:20 dillon Exp $"); /* * LIB/MEMORY/ZALLOC.C - self contained low-overhead memory pool/allocation @@ -247,22 +247,22 @@ mp->mp_Base = base; mp->mp_Used = bytes; mp->mp_End = (char *)base + bytes; + mp->mp_Size = bytes; } else { void *pend = (char *)mp->mp_Base + mp->mp_Size; if (base < mp->mp_Base) { - /* mp->mp_Size += (char *)mp->mp_Base - (char *)base; */ + mp->mp_Size += (char *)mp->mp_Base - (char *)base; mp->mp_Used += (char *)mp->mp_Base - (char *)base; mp->mp_Base = base; } base = (char *)base + bytes; if (base > pend) { - /* mp->mp_Size += (char *)base - (char *)pend; */ + mp->mp_Size += (char *)base - (char *)pend; mp->mp_Used += (char *)base - (char *)pend; mp->mp_End = (char *)base; } } - mp->mp_Size += bytes; } #ifdef ZALLOCDEBUG ==== //depot/projects/ia64/share/examples/IPv6/USAGE#3 (text+ko) ==== @@ -1,9 +1,9 @@ USAGE KAME Project $KAME: USAGE,v 1.33 2000/11/22 10:22:57 itojun Exp $ - $FreeBSD: src/share/examples/IPv6/USAGE,v 1.4 2002/05/11 05:55:05 dd Exp $ + $FreeBSD: src/share/examples/IPv6/USAGE,v 1.5 2002/12/19 22:56:20 trhodes Exp $ -This is a introduction of how to use the commands provided in the KAME +This is an introduction of how to use the commands provided in the KAME kit. For more information, please refer to each man page. ==== //depot/projects/ia64/share/man/man4/mac_biba.4#6 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/mac_biba.4,v 1.6 2002/12/16 21:13:25 trhodes Exp $ +.\" $FreeBSD: src/share/man/man4/mac_biba.4,v 1.7 2002/12/20 00:17:10 chris Exp $ .Dd NOVEMBER 18, 2002 .Os .Dt MAC_BIBA 4 @@ -182,6 +182,7 @@ .Xr mac_partition 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , +.Xr maclabel 7 , .Xr mac 9 .Sh HISTORY The ==== //depot/projects/ia64/share/man/man4/mac_mls.4#5 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/mac_mls.4,v 1.6 2002/12/12 22:47:08 chris Exp $ +.\" $FreeBSD: src/share/man/man4/mac_mls.4,v 1.7 2002/12/19 23:47:59 chris Exp $ .Dd DECEMBER 1, 2002 .Os .Dt MAC_MLS 4 @@ -52,7 +52,7 @@ The .Nm policy module implements the Multi-Level Security, or MLS model, -which controls accesses between subjects and objects based on their +which controls access between subjects and objects based on their confidentiality by means of a strict information flow policy. Each subject and object in the system has an MLS label associated with it; each subject's MLS label contains information on its clearance level, @@ -66,7 +66,7 @@ The sensitivity level is expressed as a value between 0 and 65535, with higher values reflecting higher sensitivity levels. The compartment field is expressed as a set of up to 256 components, -numbered from 0 to 255. +numbered from 1 to 256. A complete label consists of both sensitivity and compartment elements. .Pp @@ -132,7 +132,7 @@ For example: .Pp .Bd -literal -offset indent -mls/10:2+3+6 +mls/10:2+3+6++10 mls/low .Ed .Pp @@ -191,7 +191,7 @@ .Sh AUTHORS This software was contributed to the .Fx -Project by Network Associates Labs, +Project by Network Associates Laboratories, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. ==== //depot/projects/ia64/share/man/man4/mac_partition.4#2 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/mac_partition.4,v 1.2 2002/12/11 01:10:20 chris Exp $ +.\" $FreeBSD: src/share/man/man4/mac_partition.4,v 1.3 2002/12/20 00:17:10 chris Exp $ .Dd DECEMBER 9, 2002 .Os .Dt MAC_PARTITION 4 @@ -88,6 +88,7 @@ .Xr mac_none 4 , .Xr mac_seeotheruids 4 , .Xr mac_test 4 , +.Xr maclabel 7 , .Xr mac 9 .Sh HISTORY The ==== //depot/projects/ia64/share/man/man4/pst.4#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/pst.4,v 1.2 2002/12/10 14:21:55 ru Exp $ +.\" $FreeBSD: src/share/man/man4/pst.4,v 1.3 2002/12/20 12:41:26 ru Exp $ .\" .Dd November 21, 2001 .Dt PST 4 @@ -37,15 +37,15 @@ This driver is for the Promise Supertrak SX6000 ATA hardware RAID controller. It supports (in hardware) RAID levels 0, 1, 0+1, 3, 5 and JBOD on up to 6 ATA disk drives, including automatic rebuild and hotswap, and supports -signalling disk status on LED's on Promise Superswap disk enclosures. -The Supertrak lines of controllers does not support non-disk devices. +signalling disk status on LEDs on Promise Superswap disk enclosures. +The Supertrak line of controllers does not support non-disk devices. .Sh NOTES The .Nm -driver does not support manipulating the RAID from the OS, RAID's need -to be setup from the onboard BIOS. -However hot swap, hot spare, and -automatic rebuilds are supported without reboot. +driver does not support manipulating the RAID from the OS, RAIDs need +to be set up from the onboard BIOS. +However, hot swap, hot spare, and +automatic rebuilds are supported without a reboot. .Sh HISTORY The .Nm ==== //depot/projects/ia64/share/man/man4/vga.4#2 (text+ko) ==== @@ -24,7 +24,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/share/man/man4/vga.4,v 1.19 2001/10/13 09:08:30 yokota Exp $ +.\" $FreeBSD: src/share/man/man4/vga.4,v 1.20 2002/12/20 04:56:52 trhodes Exp $ .\" .Dd June 30, 1999 .Dt VGA 4 @@ -55,11 +55,6 @@ .Nm driver to manipulate video hardware (changing video modes, loading font, etc). .Pp -The keyword -.Dv conflicts -is required, as the video card may use I/O ports in the same range -as other drivers. -.Pp The .Nm driver supports the standard video cards: MDA, CGA, EGA and VGA. ==== //depot/projects/ia64/sys/boot/i386/boot2/Makefile#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.43 2002/12/18 07:13:53 imp Exp $ +# $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.44 2002/12/21 02:03:31 obrien Exp $ PROG= boot2 NOMAN= @@ -36,6 +36,7 @@ CFLAGS= -elf -ffreestanding -Os -fno-builtin \ -fno-guess-branch-probability -fomit-frame-pointer\ + -mno-align-long-strings \ -mrtd \ -D${BOOT2_UFS} \ -I${.CURDIR}/../../common \ ==== //depot/projects/ia64/sys/boot/i386/boot2/boot2.c#14 (text+ko) ==== @@ -14,7 +14,7 @@ */ /* - * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.59 2002/12/17 22:00:06 imp Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.60 2002/12/20 05:49:40 imp Exp $ */ #include <sys/param.h> @@ -133,7 +133,7 @@ strcmp(const char *s1, const char *s2) { for (; *s1 == *s2 && *s1; s1++, s2++); - return *s1 - *s2; + return (unsigned char)*s1 - (unsigned char)*s2; } #include "ufsread.c" ==== //depot/projects/ia64/sys/boot/sparc64/loader/Makefile#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.14 2002/11/10 19:17:36 jake Exp $ +# $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.15 2002/12/20 04:32:10 jake Exp $ BASE= loader PROG= ${BASE} @@ -16,7 +16,6 @@ LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes -LOADER_ZIP_SUPPORT?= yes LOADER_GZIP_SUPPORT?= yes LOADER_BZIP2_SUPPORT?= no @@ -29,9 +28,6 @@ .if ${LOADER_CD9660_SUPPORT} == "yes" CFLAGS+= -DLOADER_CD9660_SUPPORT .endif -.if ${LOADER_ZIP_SUPPORT} == "yes" -CFLAGS+= -DLOADER_ZIP_SUPPORT -.endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT .endif ==== //depot/projects/ia64/sys/dev/pst/pst-pci.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pst/pst-pci.c,v 1.1 2002/07/31 18:26:30 sos Exp $ + * $FreeBSD: src/sys/dev/pst/pst-pci.c,v 1.2 2002/12/20 12:15:38 sos Exp $ */ #include <sys/param.h> @@ -55,8 +55,8 @@ return 0; } - /* this should work as well (not tested no hardware) */ - if (pci_get_devid(dev) == 0x09628086 && pci_get_subvendor(dev) == 0x105a) { >>> 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?200212212014.gBLKEcSI017249>
