PERFORCE change 28532 for review
Peter Wemm
peter at FreeBSD.org
Tue Apr 8 10:45:58 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=28532
Change 28532 by peter at peter_overcee on 2003/04/08 10:45:22
IFC @28531
Affected files ...
.. //depot/projects/hammer/Makefile.inc1#10 integrate
.. //depot/projects/hammer/bin/cp/cp.1#3 integrate
.. //depot/projects/hammer/bin/cp/cp.c#5 integrate
.. //depot/projects/hammer/bin/cp/extern.h#3 integrate
.. //depot/projects/hammer/bin/cp/utils.c#3 integrate
.. //depot/projects/hammer/etc/Makefile#7 integrate
.. //depot/projects/hammer/etc/newsyslog.conf#5 integrate
.. //depot/projects/hammer/etc/syslog.conf#5 integrate
.. //depot/projects/hammer/include/fstab.h#2 integrate
.. //depot/projects/hammer/include/paths.h#2 integrate
.. //depot/projects/hammer/lib/libc/gen/Makefile.inc#7 integrate
.. //depot/projects/hammer/lib/libc/gen/fstab.c#2 integrate
.. //depot/projects/hammer/lib/libc/gen/getfsent.3#2 integrate
.. //depot/projects/hammer/lib/libc/stdio/vfprintf.c#9 integrate
.. //depot/projects/hammer/lib/libc/stdio/vfwprintf.c#6 integrate
.. //depot/projects/hammer/lib/libpam/modules/modules.inc#3 integrate
.. //depot/projects/hammer/lib/libpam/modules/pam_chroot/pam_chroot.8#2 integrate
.. //depot/projects/hammer/lib/libpam/modules/pam_chroot/pam_chroot.c#2 integrate
.. //depot/projects/hammer/lib/libusbhid/libusbhid.h#2 integrate
.. //depot/projects/hammer/lib/libusbhid/parse.c#2 integrate
.. //depot/projects/hammer/lib/libusbhid/usage.c#2 integrate
.. //depot/projects/hammer/lib/libusbhid/usbhid.h#1 branch
.. //depot/projects/hammer/libexec/rtld-elf/Makefile#3 integrate
.. //depot/projects/hammer/libexec/rtld-elf/libmap.c#1 branch
.. //depot/projects/hammer/libexec/rtld-elf/libmap.h#1 branch
.. //depot/projects/hammer/libexec/rtld-elf/rtld.1#3 integrate
.. //depot/projects/hammer/libexec/rtld-elf/rtld.c#5 integrate
.. //depot/projects/hammer/release/doc/en_US.ISO8859-1/early-adopter/article.sgml#4 integrate
.. //depot/projects/hammer/sbin/dump/dump.h#5 integrate
.. //depot/projects/hammer/sbin/dump/main.c#6 integrate
.. //depot/projects/hammer/sbin/dump/optr.c#4 integrate
.. //depot/projects/hammer/sbin/mount/mount.8#4 integrate
.. //depot/projects/hammer/sbin/mount/mount.c#4 integrate
.. //depot/projects/hammer/sbin/ping/ping.c#8 integrate
.. //depot/projects/hammer/sbin/umount/umount.8#3 integrate
.. //depot/projects/hammer/sbin/umount/umount.c#4 integrate
.. //depot/projects/hammer/share/man/man4/polling.4#3 integrate
.. //depot/projects/hammer/share/man/man4/umass.4#5 integrate
.. //depot/projects/hammer/share/man/man5/Makefile#3 integrate
.. //depot/projects/hammer/share/man/man5/libmap.conf.5#1 branch
.. //depot/projects/hammer/share/man/man7/release.7#7 integrate
.. //depot/projects/hammer/sys/alpha/alpha/busdma_machdep.c#5 integrate
.. //depot/projects/hammer/sys/cam/cam_periph.c#6 integrate
.. //depot/projects/hammer/sys/conf/files#14 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-all.c#8 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-all.h#5 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#3 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-disk.c#5 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-dma.c#6 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-pci.c#7 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-pci.h#3 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-raid.c#6 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-raid.h#4 integrate
.. //depot/projects/hammer/sys/dev/cardbus/cardbus_cis.c#6 integrate
.. //depot/projects/hammer/sys/dev/fxp/if_fxp.c#10 integrate
.. //depot/projects/hammer/sys/dev/fxp/if_fxpreg.h#5 integrate
.. //depot/projects/hammer/sys/dev/pccard/pccard.c#9 integrate
.. //depot/projects/hammer/sys/dev/pccard/pccardvar.h#3 integrate
.. //depot/projects/hammer/sys/dev/pccbb/pccbb.c#9 integrate
.. //depot/projects/hammer/sys/dev/puc/pucdata.c#5 integrate
.. //depot/projects/hammer/sys/dev/snc/dp83932.c#4 integrate
.. //depot/projects/hammer/sys/dev/stg/tmc18c30.h#1 branch
.. //depot/projects/hammer/sys/dev/stg/tmc18c30_isa.c#3 integrate
.. //depot/projects/hammer/sys/dev/stg/tmc18c30_pccard.c#4 integrate
.. //depot/projects/hammer/sys/dev/stg/tmc18c30_pci.c#1 branch
.. //depot/projects/hammer/sys/dev/stg/tmc18c30_subr.c#1 branch
.. //depot/projects/hammer/sys/dev/usb/if_kue.c#5 integrate
.. //depot/projects/hammer/sys/dev/usb/usbdevs#6 integrate
.. //depot/projects/hammer/sys/dev/usb/usbdevs.h#6 integrate
.. //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#6 integrate
.. //depot/projects/hammer/sys/dev/vx/if_vx.c#6 integrate
.. //depot/projects/hammer/sys/dev/wi/if_wi_pccard.c#6 integrate
.. //depot/projects/hammer/sys/i386/conf/PAE#1 branch
.. //depot/projects/hammer/sys/i386/i386/busdma_machdep.c#6 integrate
.. //depot/projects/hammer/sys/i386/include/pmap.h#4 integrate
.. //depot/projects/hammer/sys/i386/include/vmparam.h#4 integrate
.. //depot/projects/hammer/sys/i386/isa/mca_machdep.c#4 delete
.. //depot/projects/hammer/sys/i386/isa/mca_machdep.h#2 delete
.. //depot/projects/hammer/sys/ia64/conf/GENERIC#8 integrate
.. //depot/projects/hammer/sys/ia64/conf/SKI#6 integrate
.. //depot/projects/hammer/sys/ia64/ia64/busdma_machdep.c#5 integrate
.. //depot/projects/hammer/sys/ia64/ia64/exception.s#7 integrate
.. //depot/projects/hammer/sys/ia64/ia64/locore.s#5 integrate
.. //depot/projects/hammer/sys/kern/kern_mac.c#12 integrate
.. //depot/projects/hammer/sys/kern/kern_thr.c#3 integrate
.. //depot/projects/hammer/sys/kern/kern_thread.c#17 integrate
.. //depot/projects/hammer/sys/kern/uipc_mbuf.c#6 integrate
.. //depot/projects/hammer/sys/modules/stg/Makefile#2 integrate
.. //depot/projects/hammer/sys/net/if_disc.c#4 integrate
.. //depot/projects/hammer/sys/net/if_faith.c#4 integrate
.. //depot/projects/hammer/sys/net/if_loop.c#5 integrate
.. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#3 integrate
.. //depot/projects/hammer/sys/netgraph/ng_base.c#4 integrate
.. //depot/projects/hammer/sys/netgraph/ng_iface.c#5 integrate
.. //depot/projects/hammer/sys/netinet/ip_divert.c#6 integrate
.. //depot/projects/hammer/sys/netinet/ip_input.c#9 integrate
.. //depot/projects/hammer/sys/netinet/ip_mroute.c#8 integrate
.. //depot/projects/hammer/sys/netinet/ip_output.c#10 integrate
.. //depot/projects/hammer/sys/netipsec/keysock.c#3 integrate
.. //depot/projects/hammer/sys/netkey/keysock.c#3 integrate
.. //depot/projects/hammer/sys/netnatm/natm.c#3 integrate
.. //depot/projects/hammer/sys/pci/agp_if.m#2 integrate
.. //depot/projects/hammer/sys/pci/if_rl.c#9 integrate
.. //depot/projects/hammer/sys/pci/if_xl.c#11 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/busdma_machdep.c#4 integrate
.. //depot/projects/hammer/sys/sparc64/include/cache.h#3 integrate
.. //depot/projects/hammer/sys/sparc64/include/iommuvar.h#3 integrate
.. //depot/projects/hammer/sys/sparc64/include/kerneldump.h#2 integrate
.. //depot/projects/hammer/sys/sparc64/include/md_var.h#4 integrate
.. //depot/projects/hammer/sys/sparc64/include/ofw_mem.h#2 integrate
.. //depot/projects/hammer/sys/sparc64/include/pmap.h#9 integrate
.. //depot/projects/hammer/sys/sparc64/include/smp.h#4 integrate
.. //depot/projects/hammer/sys/sparc64/include/tsb.h#3 integrate
.. //depot/projects/hammer/sys/sparc64/include/watch.h#2 integrate
.. //depot/projects/hammer/sys/sparc64/pci/psycho.c#7 integrate
.. //depot/projects/hammer/sys/sparc64/pci/psychovar.h#4 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/bus_machdep.c#6 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/cheetah.c#2 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/db_hwwatch.c#2 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/dump_machdep.c#4 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/iommu.c#4 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/machdep.c#11 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/mem.c#4 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/mp_machdep.c#7 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#11 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/spitfire.c#2 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/tsb.c#5 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/vm_machdep.c#5 integrate
.. //depot/projects/hammer/sys/sys/mbuf.h#8 integrate
.. //depot/projects/hammer/sys/ufs/ffs/ffs_rawread.c#2 integrate
.. //depot/projects/hammer/tools/build/Makefile#2 integrate
.. //depot/projects/hammer/tools/build/Makefile.boot#2 integrate
.. //depot/projects/hammer/tools/regression/lib/libc/stdio/test-printfloat.c#3 integrate
.. //depot/projects/hammer/usr.bin/su/su.c#7 integrate
.. //depot/projects/hammer/usr.sbin/ctm/ctm/ctm.h#2 integrate
.. //depot/projects/hammer/usr.sbin/ctm/ctm/ctm_input.c#2 integrate
.. //depot/projects/hammer/usr.sbin/jail/jail.c#3 integrate
.. //depot/projects/hammer/usr.sbin/pppd/lcp.c#3 integrate
.. //depot/projects/hammer/usr.sbin/wicontrol/wicontrol.8#5 integrate
.. //depot/projects/hammer/usr.sbin/wicontrol/wicontrol.c#4 integrate
Differences ...
==== //depot/projects/hammer/Makefile.inc1#10 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/Makefile.inc1,v 1.333 2003/04/06 03:50:28 imp Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.339 2003/04/07 00:01:33 ru Exp $
#
# Make command line options:
# -DMAKE_KERBEROS5 to build Kerberos5
@@ -159,18 +159,19 @@
#
# Building a world goes through the following stages
#
-# 1. libbuild stage [BMAKE]
-# This stage is responsible for creating compatibility shims that are
-# needed by the bootstrap-tool, build-tool and cross-tool stages.
-# 1. bootstrap-tool stage [BMAKE]
+# 1. legacy stage [BMAKE]
+# This stage is responsible for creating compatibility
+# shims that are needed by the bootstrap-tools,
+# build-tools and cross-tools stages.
+# 1. bootstrap-tools stage [BMAKE]
# This stage is responsible for creating programs that
# are needed for backward compatibility reasons. They
# are not built as cross-tools.
-# 2. build-tool stage [TMAKE]
+# 2. build-tools stage [TMAKE]
# This stage is responsible for creating the object
# tree and building any tools that are needed during
# the build process.
-# 3. cross-tool stage [XMAKE]
+# 3. cross-tools stage [XMAKE]
# This stage is responsible for creating any tools that
# are needed for cross-builds. A cross-compiler is one
# of them.
@@ -189,7 +190,7 @@
GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \
GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac
-# bootstrap-tool stage
+# bootstrap-tools stage
BMAKEENV= DESTDIR= \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
__MAKE_CONF=${.CURDIR}/tools/build/Makefile.boot \
@@ -201,12 +202,12 @@
-DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \
-DNO_CPU_CFLAGS -DNO_WARNS
-# build-tool stage
+# build-tools stage
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
BOOTSTRAPPING=${OSRELDATE} -DNO_CPU_CFLAGS -DNO_WARNS
-# cross-tool stage
+# cross-tools stage
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB
# world stage
@@ -268,6 +269,7 @@
.if !defined(NOCLEAN)
rm -rf ${WORLDTMP}
.else
+ rm -rf ${WORLDTMP}/legacy/usr/include
# XXX - These two can depend on any header file.
rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
@@ -279,15 +281,15 @@
mkdir -p ${WORLDTMP}/usr/include/${_dir}
.endfor
ln -sf ${.CURDIR}/sys ${WORLDTMP}
-.for _dir in lib include include/sys
- mkdir -p ${WORLDTMP}/build/usr/${_dir}
+.for _dir in lib include/sys
+ mkdir -p ${WORLDTMP}/legacy/usr/${_dir}
.endfor
-_libbuild:
+_legacy:
@echo
@echo "--------------------------------------------------------------"
- @echo ">>> stage 1: libbuild"
+ @echo ">>> stage 1: legacy release compatibility shims"
@echo "--------------------------------------------------------------"
- cd ${.CURDIR}; ${BMAKE} libbuild
+ cd ${.CURDIR}; ${BMAKE} legacy
_bootstrap-tools:
@echo
@echo "--------------------------------------------------------------"
@@ -348,7 +350,7 @@
WMAKE_TGTS=
.if !defined(SUBDIR_OVERRIDE)
-WMAKE_TGTS+= _worldtmp _libbuild _bootstrap-tools
+WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools
.endif
WMAKE_TGTS+= _cleanobj _obj _build-tools
.if !defined(SUBDIR_OVERRIDE)
@@ -616,22 +618,25 @@
#
#
-# bootstrap-tools: Build tools needed for compatibility
+# legacy: Build compatibility shims for the next three targets
#
-.if exists(${.CURDIR}/games) && !defined(NOGAMES)
-_strfile= games/fortune/strfile
-.endif
-
-libbuild:
+legacy:
.for _tool in tools/build
@${ECHODIR} "===> ${_tool}"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
${MAKE} DIRPRFX=${_tool}/ depend; \
${MAKE} DIRPRFX=${_tool}/ all; \
- ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/build install
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
.endfor
+#
+# bootstrap-tools: Build tools needed for compatibility
+#
+.if exists(${.CURDIR}/games) && !defined(NOGAMES)
+_strfile= games/fortune/strfile
+.endif
+
bootstrap-tools:
.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \
usr.bin/makewhatis usr.bin/rpcgen usr.bin/uudecode \
==== //depot/projects/hammer/bin/cp/cp.1#3 (text+ko) ====
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
-.\" $FreeBSD: src/bin/cp/cp.1,v 1.25 2002/08/16 03:13:59 johan Exp $
+.\" $FreeBSD: src/bin/cp/cp.1,v 1.26 2003/04/07 11:00:56 mdodd Exp $
.\"
.Dd July 23, 2002
.Dt CP 1
@@ -225,6 +225,17 @@
option is specified.
In addition, these options override each other and the
command's actions are determined by the last one specified.
+.Pp
+If
+.Nm
+receives a
+.Dv SIGINFO
+(see the
+.Cm status
+argument for
+.Xr stty 1 )
+signal, the current input and output file and the percentage complete
+will be written to the standard output.
.Sh DIAGNOSTICS
.Ex -std
.Sh COMPATIBILITY
==== //depot/projects/hammer/bin/cp/cp.c#5 (text+ko) ====
@@ -46,7 +46,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.43 2002/10/18 14:44:59 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.45 2003/04/07 12:09:17 mdodd Exp $");
/*
* Cp copies source files to target files.
@@ -89,6 +89,9 @@
int fflag, iflag, nflag, pflag, vflag;
static int Rflag, rflag;
+volatile sig_atomic_t info;
+static void siginfo (int notused __unused);
+
enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
static int copy(char *[], enum op, int);
@@ -173,6 +176,7 @@
fts_options &= ~FTS_PHYSICAL;
fts_options |= FTS_LOGICAL | FTS_COMFOLLOW;
}
+ (void)signal(SIGINFO, siginfo);
/* Save the target base in "to". */
target = argv[--argc];
@@ -501,3 +505,10 @@
return (1);
return (0);
}
+
+static void
+siginfo (int notused __unused)
+{
+
+ info = 1;
+}
==== //depot/projects/hammer/bin/cp/extern.h#3 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.2 (Berkeley) 4/1/94
- * $FreeBSD: src/bin/cp/extern.h,v 1.16 2002/10/18 14:44:59 markm Exp $
+ * $FreeBSD: src/bin/cp/extern.h,v 1.18 2003/04/07 12:09:17 mdodd Exp $
*/
typedef struct {
@@ -42,6 +42,7 @@
extern PATH_T to;
extern int fflag, iflag, nflag, pflag, vflag;
+extern volatile sig_atomic_t info;
__BEGIN_DECLS
int copy_fifo(struct stat *, int);
==== //depot/projects/hammer/bin/cp/utils.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/cp/utils.c,v 1.39 2002/10/18 14:45:00 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/cp/utils.c,v 1.40 2003/04/07 11:00:56 mdodd Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -56,6 +56,7 @@
#include <unistd.h>
#include "extern.h"
+#define cp_pct(x,y) (int)(100.0 * (double)(x) / (double)(y))
int
copy_file(const FTSENT *entp, int dne)
@@ -65,6 +66,7 @@
int ch, checkch, from_fd, rcount, rval, to_fd;
ssize_t wcount;
size_t wresid;
+ size_t wtotal;
char *bufp;
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
char *p;
@@ -137,9 +139,19 @@
warn("%s", entp->fts_path);
rval = 1;
} else {
+ wtotal = 0;
for (bufp = p, wresid = fs->st_size; ;
bufp += wcount, wresid -= (size_t)wcount) {
wcount = write(to_fd, bufp, wresid);
+ wtotal += wcount;
+ if (info) {
+ info = 0;
+ (void)fprintf(stderr,
+ "%s -> %s %3d%%\n",
+ entp->fts_path, to.p_path,
+ cp_pct(wtotal, fs->st_size));
+
+ }
if (wcount >= (ssize_t)wresid || wcount <= 0)
break;
}
@@ -156,10 +168,20 @@
} else
#endif
{
+ wtotal = 0;
while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) {
for (bufp = buf, wresid = rcount; ;
bufp += wcount, wresid -= wcount) {
wcount = write(to_fd, bufp, wresid);
+ wtotal += wcount;
+ if (info) {
+ info = 0;
+ (void)fprintf(stderr,
+ "%s -> %s %3d%%\n",
+ entp->fts_path, to.p_path,
+ cp_pct(wtotal, fs->st_size));
+
+ }
if (wcount >= (ssize_t)wresid || wcount <= 0)
break;
}
==== //depot/projects/hammer/etc/Makefile#7 (text+ko) ====
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
-# $FreeBSD: src/etc/Makefile,v 1.307 2003/04/02 20:13:59 ru Exp $
+# $FreeBSD: src/etc/Makefile,v 1.308 2003/04/08 16:14:02 des Exp $
.if !defined(NO_SENDMAIL)
SUBDIR= sendmail
@@ -129,6 +129,8 @@
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
${DESTDIR}/var/log/cron
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
+ ${DESTDIR}/var/log/debug.log
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
${DESTDIR}/var/log/xferlog
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
${DESTDIR}/var/log/lpd-errs
==== //depot/projects/hammer/etc/newsyslog.conf#5 (text+ko) ====
@@ -1,5 +1,5 @@
# configuration file for newsyslog
-# $FreeBSD: src/etc/newsyslog.conf,v 1.43 2003/02/16 13:07:20 des Exp $
+# $FreeBSD: src/etc/newsyslog.conf,v 1.44 2003/04/08 16:14:02 des Exp $
#
# Note: some sites will want to select more restrictive protections than the
# defaults. In particular, it may be desirable to switch many of the 644
@@ -14,6 +14,7 @@
/var/log/console.log 600 5 100 * J
/var/log/cron 600 3 100 * J
/var/log/daily.log 640 7 * @T00 J
+/var/log/debug.log 600 7 100 * J
/var/log/kerberos.log 600 7 100 * J
/var/log/lpd-errs 644 7 100 * J
/var/log/maillog 640 7 * @T00 J
==== //depot/projects/hammer/etc/syslog.conf#5 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/syslog.conf,v 1.24 2003/04/03 18:37:49 yar Exp $
+# $FreeBSD: src/etc/syslog.conf,v 1.25 2003/04/08 16:14:02 des Exp $
#
# Spaces ARE valid field separators in this file. However,
# other *nix-like systems still insist on using tabs as field
@@ -13,6 +13,7 @@
lpr.info /var/log/lpd-errs
ftp.info /var/log/xferlog
cron.* /var/log/cron
+*.debug /var/log/debug.log
*.emerg *
# uncomment this to log all writes to /dev/console to /var/log/console.log
#console.info /var/log/console.log
==== //depot/projects/hammer/include/fstab.h#2 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fstab.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/include/fstab.h,v 1.3 2002/03/23 17:24:53 imp Exp $
+ * $FreeBSD: src/include/fstab.h,v 1.4 2003/04/07 12:54:59 mdodd Exp $
*/
#ifndef _FSTAB_H_
@@ -75,6 +75,8 @@
struct fstab *getfsfile(const char *);
int setfsent(void);
void endfsent(void);
+void setfstab(const char *);
+const char *getfstab(void);
__END_DECLS
#endif /* !_FSTAB_H_ */
==== //depot/projects/hammer/include/paths.h#2 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)paths.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/include/paths.h,v 1.17 2002/07/14 13:04:15 sobomax Exp $
+ * $FreeBSD: src/include/paths.h,v 1.18 2003/04/07 16:21:25 mdodd Exp $
*/
#ifndef _PATHS_H_
@@ -60,6 +60,7 @@
#define _PATH_ETC "/etc"
#define _PATH_FTPUSERS "/etc/ftpusers"
#define _PATH_KMEM "/dev/kmem"
+#define _PATH_LIBMAP_CONF "/etc/libmap.conf"
#define _PATH_LOGIN "/usr/bin/login"
#define _PATH_MAILDIR "/var/mail"
#define _PATH_MAN "/usr/share/man"
==== //depot/projects/hammer/lib/libc/gen/Makefile.inc#7 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
-# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.104 2003/02/15 10:52:46 phantom Exp $
+# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.105 2003/04/07 12:55:00 mdodd Exp $
# machine-independent gen sources
.PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen
@@ -84,7 +84,8 @@
MLINKS+=getcontext.3 setcontext.3
MLINKS+=getdomainname.3 setdomainname.3
MLINKS+=getfsent.3 endfsent.3 getfsent.3 getfsfile.3 getfsent.3 getfsspec.3 \
- getfsent.3 getfstype.3 getfsent.3 setfsent.3
+ getfsent.3 getfstype.3 getfsent.3 setfsent.3 \
+ getfsent.3 setfstab.3 getfsent.3 getfstab.3
MLINKS+=getgrent.3 endgrent.3 getgrent.3 getgrgid.3 getgrent.3 getgrnam.3 \
getgrent.3 setgrent.3 getgrent.3 setgroupent.3
MLINKS+=gethostname.3 sethostname.3
==== //depot/projects/hammer/lib/libc/gen/fstab.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/fstab.c,v 1.13 2002/02/01 01:32:19 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/fstab.c,v 1.14 2003/04/07 12:55:00 mdodd Exp $");
#include "namespace.h"
#include <sys/param.h>
@@ -54,11 +54,40 @@
static FILE *_fs_fp;
static struct fstab _fs_fstab;
static int LineNo = 0;
+static char *path_fstab;
+static char fstab_path[PATH_MAX];
+static int fsp_set = 0;
static void error(int);
static void fixfsfile(void);
static int fstabscan(void);
+void
+setfstab(const char *file)
+{
+
+ if (file == NULL) {
+ path_fstab = _PATH_FSTAB;
+ } else {
+ strncpy(fstab_path, file, PATH_MAX);
+ fstab_path[PATH_MAX - 1] = '\0';
+ path_fstab = fstab_path;
+ }
+ fsp_set = 1;
+
+ return;
+}
+
+const char *
+getfstab (void)
+{
+
+ if (fsp_set)
+ return (path_fstab);
+ else
+ return (_PATH_FSTAB);
+}
+
static void
fixfsfile()
{
@@ -226,7 +255,13 @@
LineNo = 0;
return(1);
}
- if ((_fs_fp = fopen(_PATH_FSTAB, "r")) != NULL) {
+ if (fsp_set == 0) {
+ if (issetugid())
+ setfstab(NULL);
+ else
+ setfstab(getenv("PATH_FSTAB"));
+ }
+ if ((_fs_fp = fopen(path_fstab, "r")) != NULL) {
LineNo = 0;
return(1);
}
@@ -241,6 +276,8 @@
(void)fclose(_fs_fp);
_fs_fp = NULL;
}
+
+ fsp_set = 0;
}
static void
@@ -251,7 +288,7 @@
char num[30];
(void)_write(STDERR_FILENO, "fstab: ", 7);
- (void)_write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1);
+ (void)_write(STDERR_FILENO, path_fstab, strlen(path_fstab));
(void)_write(STDERR_FILENO, ":", 1);
sprintf(num, "%d: ", LineNo);
(void)_write(STDERR_FILENO, num, strlen(num));
==== //depot/projects/hammer/lib/libc/gen/getfsent.3#2 (text+ko) ====
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)getfsent.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/getfsent.3,v 1.9 2001/10/01 16:08:51 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/getfsent.3,v 1.12 2003/04/07 22:59:12 mdodd Exp $
.\"
-.Dd June 4, 1993
+.Dd April 7, 2003
.Dt GETFSENT 3
.Os
.Sh NAME
@@ -56,6 +56,10 @@
.Fn setfsent void
.Ft void
.Fn endfsent void
+.Ft void
+.Fn setfstab "const char *file"
+.Ft const char *
+.Fn getfstab void
.Sh DESCRIPTION
The
.Fn getfsent ,
@@ -94,6 +98,18 @@
closes the file.
.Pp
The
+.Fn setfstab
+function sets the file to be used by subsequent operations.
+The value set by
+.Fn setfstab
+does not persist across calls to
+.Fn endfsent
+.Pp
+The
+.Fn getfstab
+function returns the name of the file that that will be used.
+.Pp
+The
.Fn getfsspec
and
.Fn getfsfile
@@ -128,6 +144,20 @@
.Fn endfsent
function
returns nothing.
+.Sh ENVIRONMENT
+.Bl -tag -width PATH_FSTAB
+.It Pa PATH_FSTAB
+If the environment variable
+.Pa PATH_FSTAB
+is set all operations are performed against the specified file.
+.Pa PATH_FSTAB
+will not be honored if the process environment or memory address space is
+considred
+.Dq tainted .
+(See
+.Fn issetugid
+for more information.)
+.El
.Sh FILES
.Bl -tag -width /etc/fstab -compact
.It Pa /etc/fstab
@@ -146,7 +176,13 @@
and
.Fn setfsent
functions appeared in
-.Bx 4.3 .
+.Bx 4.3 ;
+the
+.Fn setfstab
+and
+.Fn getfstab
+functions appeared in
+.Fx 5.1.
.Sh BUGS
These functions use static data storage;
if the data is needed for future use, it should be
==== //depot/projects/hammer/lib/libc/stdio/vfprintf.c#9 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.54 2003/04/05 22:11:42 das Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.57 2003/04/07 03:17:39 ache Exp $");
/*
* Actual printf innards.
@@ -384,9 +384,11 @@
break;
mbp += clen;
}
+ if (clen == (size_t)-1) {
+ free(convbuf);
+ return (NULL);
+ }
*mbp = '\0';
- if (clen == (size_t)-1)
- return (NULL);
return (convbuf);
}
@@ -557,6 +559,14 @@
PRINT(with, n); \
} \
}
+#define PRINTANDPAD(p, ep, len, with) do { \
+ n2 = (ep) - (p); \
+ if (n2 > (len)) \
+ n2 = (len); \
+ if (n2 > 0) \
+ PRINT((p), n2); \
+ PAD((len) - (n2 > 0 ? n2 : 0), (with)); \
+} while(0)
#define FLUSH() { \
if (uio.uio_resid && __sprint(fp, &uio)) \
goto error; \
@@ -714,16 +724,14 @@
goto rflag;
case '.':
if ((ch = *fmt++) == '*') {
- GETASTER (n);
- prec = n < 0 ? -1 : n;
+ GETASTER (prec);
goto rflag;
}
- n = 0;
+ prec = 0;
while (is_digit(ch)) {
- n = 10 * n + to_digit(ch);
+ prec = 10 * prec + to_digit(ch);
ch = *fmt++;
}
- prec = n < 0 ? -1 : n;
goto reswitch;
case '0':
/*-
@@ -917,7 +925,7 @@
if (expchar) {
expsize = exponent(expstr, expt - 1, expchar);
size = expsize + prec;
- if (prec || flags & ALT)
+ if (prec > 1 || flags & ALT)
++size;
} else {
if (expt > 0) {
@@ -942,7 +950,7 @@
}
size += nseps + nrepeats;
} else
- lead = (expt < ndig) ? expt : ndig;
+ lead = expt;
}
break;
#endif /* FLOATING_POINT */
@@ -1159,10 +1167,10 @@
buf[1] = *decimal_point;
PRINT(buf, 2);
PAD(-expt, zeroes);
- if (ndig > 0)
- PRINT(cp, ndig);
+ /* already handled initial 0's */
+ prec += expt;
} else {
- PRINT(cp, lead);
+ PRINTANDPAD(cp, dtoaend, lead, zeroes);
cp += lead;
if (grouping) {
while (nseps>0 || nrepeats>0) {
@@ -1174,20 +1182,19 @@
}
PRINT(&thousands_sep,
1);
- PRINT(cp, *grouping);
+ PRINTANDPAD(cp,dtoaend,
+ *grouping, zeroes);
cp += *grouping;
}
- } else {
- PAD(expt - lead, zeroes);
+ if (cp > dtoaend)
+ cp = dtoaend;
}
if (prec || flags & ALT)
PRINT(decimal_point,1);
- if (ndig > lead)
- PRINT(cp, ndig - lead);
}
- PAD(prec - ndig + expt, zeroes);
+ PRINTANDPAD(cp, dtoaend, prec, zeroes);
} else { /* %[eE] or sufficiently long %[gG] */
- if (prec || flags & ALT) {
+ if (prec > 1 || flags & ALT) {
buf[0] = *cp++;
buf[1] = *decimal_point;
PRINT(buf, 2);
@@ -1195,7 +1202,6 @@
PAD(prec - ndig, zeroes);
} else /* XeYYY */
PRINT(cp, 1);
-
PRINT(expstr, expsize);
}
}
==== //depot/projects/hammer/lib/libc/stdio/vfwprintf.c#6 (text+ko) ====
@@ -39,9 +39,9 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
-__FBSDID("FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.52 2003/03/14 04:48:09 das Exp");
+__FBSDID("FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.57 2003/04/07 03:17:39 ache Exp");
#endif
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.9 2003/04/05 22:08:53 das Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.10 2003/04/07 06:36:49 tjr Exp $");
/*
* Actual wprintf innards.
@@ -114,10 +114,10 @@
};
static int __sbprintf(FILE *, const wchar_t *, va_list);
-static wchar_t *__ujtoa(uintmax_t, wchar_t *, int, int, wchar_t *, int, char,
- const char *);
-static wchar_t *__ultoa(u_long, wchar_t *, int, int, wchar_t *, int, char,
- const char *);
+static wchar_t *__ujtoa(uintmax_t, wchar_t *, int, int, const wchar_t *, int,
+ char, const char *);
+static wchar_t *__ultoa(u_long, wchar_t *, int, int, const wchar_t *, int,
+ char, const char *);
static wchar_t *__mbsconv(char *, int);
static void __find_arguments(const wchar_t *, va_list, union arg **);
static void __grow_type_table(int, enum typeid **, int *);
@@ -169,7 +169,7 @@
* use the given digits.
*/
static wchar_t *
-__ultoa(u_long val, wchar_t *endp, int base, int octzero, wchar_t *xdigs,
+__ultoa(u_long val, wchar_t *endp, int base, int octzero, const wchar_t *xdigs,
int needgrp, char thousep, const char *grp)
{
wchar_t *cp = endp;
@@ -246,8 +246,8 @@
/* Identical to __ultoa, but for intmax_t. */
static wchar_t *
-__ujtoa(uintmax_t val, wchar_t *endp, int base, int octzero, wchar_t *xdigs,
- int needgrp, char thousep, const char *grp)
+__ujtoa(uintmax_t val, wchar_t *endp, int base, int octzero,
+ const wchar_t *xdigs, int needgrp, char thousep, const char *grp)
{
wchar_t *cp = endp;
intmax_t sval;
@@ -330,6 +330,9 @@
size_t insize, nchars, nconv;
mbstate_t mbs;
+ if (mbsarg == NULL)
+ return (NULL);
+
/*
* Supplied argument is a multibyte string; convert it to wide
* characters first.
@@ -400,16 +403,17 @@
}
#ifdef FLOATING_POINT
+
+#define dtoa __dtoa
+#define freedtoa __freedtoa
+
#include <float.h>
#include <math.h>
#include "floatio.h"
+#include "gdtoa.h"
#define DEFPREC 6
-extern char *__dtoa(double, int, int, int *, int *, char **);
-extern void __freedtoa(char *s);
-
-static wchar_t *cvt(double, int, int, char *, int *, wchar_t, int *);
static int exponent(wchar_t *, int, wchar_t);
#endif /* FLOATING_POINT */
@@ -429,7 +433,6 @@
* Flags used during conversion.
*/
#define ALT 0x001 /* alternate form */
-#define HEXPREFIX 0x002 /* add 0x or 0X prefix */
#define LADJUST 0x004 /* left adjustment */
#define LONGDBL 0x008 /* long double */
#define LONGINT 0x010 /* long integer */
@@ -452,24 +455,46 @@
{
wchar_t *fmt; /* format string */
wchar_t ch; /* character from fmt */
- int n, n2; /* handy integer (short term usage) */
+ int n, n2, n3; /* handy integer (short term usage) */
wchar_t *cp; /* handy char pointer (short term usage) */
int flags; /* flags as above */
int ret; /* return value accumulator */
int width; /* width from format (%8d), or 0 */
- int prec; /* precision from format (%.3d), or -1 */
+ int prec; /* precision from format; <0 for N/A */
wchar_t sign; /* sign prefix (' ', '+', '-', or \0) */
char thousands_sep; /* locale specific thousands separator */
const char *grouping; /* locale specific numeric grouping rules */
#ifdef FLOATING_POINT
+ /*
+ * We can decompose the printed representation of floating
+ * point numbers into several parts, some of which may be empty:
+ *
+ * [+|-| ] [0x|0X] MMM . NNN [e|E|p|P] [+|-] ZZ
+ * A B ---C--- D E F
+ *
+ * A: 'sign' holds this value if present; '\0' otherwise
+ * B: ox[1] holds the 'x' or 'X'; '\0' if not hexadecimal
+ * C: cp points to the string MMMNNN. Leading and trailing
+ * zeros are not in the string and must be added.
+ * D: expchar holds this character; '\0' if no exponent, e.g. %f
+ * F: at least two digits for decimal, at least one digit for hex
+ */
char *decimal_point; /* locale specific decimal point */
- char softsign; /* temporary negative sign for floats */
- double _double; /* double precision arguments %[eEfgG] */
+ int signflag; /* true if float is negative */
+ union { /* floating point arguments %[aAeEfFgG] */
+ double dbl;
+ long double ldbl;
+ } fparg;
int expt; /* integer value of exponent */
+ char expchar; /* exponent character: [eEpP\0] */
+ char *dtoaend; /* pointer to end of converted digits */
int expsize; /* character count for expstr */
- int ndig; /* actual number of digits returned by cvt */
- wchar_t expstr[7]; /* buffer for exponent string */
- wchar_t *dtoaresult; /* buffer allocated by dtoa */
+ int lead; /* sig figs before decimal or group sep */
+ int ndig; /* actual number of digits returned by dtoa */
+ wchar_t expstr[MAXEXPDIG+2]; /* buffer for exponent string: e+ZZZ */
+ char *dtoaresult; /* buffer allocated by dtoa */
+ int nseps; /* number of group separators with ' */
+ int nrepeats; /* number of repeats of the last group */
#endif
u_long ulval; /* integer arguments %[diouxX] */
uintmax_t ujval; /* %j, %ll, %q, %t, %z integers */
@@ -478,7 +503,7 @@
int realsz; /* field size expanded by dprec, sign, etc */
int size; /* size of converted field or string */
int prsize; /* max size of printed field */
- wchar_t *xdigs; /* digits for [xX] conversion */
+ const wchar_t *xdigs; /* digits for [xX] conversion */
wchar_t buf[BUF]; /* buffer with space for digits of uintmax_t */
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list