svn commit: r344085 - head/lib/libc/gen
Author: obrien Date: Wed Feb 13 04:52:01 2019 New Revision: 344085 URL: https://svnweb.freebsd.org/changeset/base/344085 Log: Note that readpassphrase() came into FreeBSD's libc at 4.6. Modified: head/lib/libc/gen/readpassphrase.3 Modified: head/lib/libc/gen/readpassphrase.3 == --- head/lib/libc/gen/readpassphrase.3 Wed Feb 13 04:19:08 2019 (r344084) +++ head/lib/libc/gen/readpassphrase.3 Wed Feb 13 04:52:01 2019 (r344085) @@ -178,4 +178,6 @@ extension and should not be used if portability is des The .Fn readpassphrase function first appeared in +.Fx 4.6 +and .Ox 2.9 . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r343561 - in head/sys: arm64/include riscv/include
Author: obrien Date: Tue Jan 29 20:10:27 2019 New Revision: 343561 URL: https://svnweb.freebsd.org/changeset/base/343561 Log: Follow arm[32] and sparc64 KAPI and provide the FreeBSD standard spelling across all architectures for this header. Reviewed by: stevek Obtained from:Juniper Networks Added: head/sys/arm64/include/sigframe.h - copied unchanged from r343560, head/sys/arm/include/sigframe.h head/sys/riscv/include/sigframe.h - copied unchanged from r343560, head/sys/arm/include/sigframe.h Copied: head/sys/arm64/include/sigframe.h (from r343560, head/sys/arm/include/sigframe.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/sigframe.h Tue Jan 29 20:10:27 2019 (r343561, copy of r343560, head/sys/arm/include/sigframe.h) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include Copied: head/sys/riscv/include/sigframe.h (from r343560, head/sys/arm/include/sigframe.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/riscv/include/sigframe.h Tue Jan 29 20:10:27 2019 (r343561, copy of r343560, head/sys/arm/include/sigframe.h) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338503 - head/usr.sbin/services_mkdb
Author: obrien Date: Thu Sep 6 18:34:11 2018 New Revision: 338503 URL: https://svnweb.freebsd.org/changeset/base/338503 Log: Add MPLS LSP-echo (RFC8029, March 2017) port. Reviewed by: stevek Approved by: re(gjb) Obtained from:Juniper Networks Modified: head/usr.sbin/services_mkdb/services Modified: head/usr.sbin/services_mkdb/services == --- head/usr.sbin/services_mkdb/servicesThu Sep 6 17:25:50 2018 (r338502) +++ head/usr.sbin/services_mkdb/servicesThu Sep 6 18:34:11 2018 (r338503) @@ -2238,6 +2238,8 @@ vat-control 3457/tcp #VAT default control vat-control3457/udp #VAT default control nut3493/tcp #Network UPS Tools nut3493/udp #Network UPS Tools +lsp-ping 3503/tcp #MPLS LSP-echo (RFC8029) +lsp-ping 3503/udp #MPLS LSP-echo (RFC8029) m2pa 3565/sctp #M2PA m2pa 3565/tcp #M2PA tsp3653/tcp #Tunnel Setup Protocol ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r336882 - head/sys/kern
Author: obrien Date: Mon Jul 30 07:01:00 2018 New Revision: 336882 URL: https://svnweb.freebsd.org/changeset/base/336882 Log: Correct copyright dates. Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c == --- head/sys/kern/imgact_elf.c Mon Jul 30 01:54:25 2018(r336881) +++ head/sys/kern/imgact_elf.c Mon Jul 30 07:01:00 2018(r336882) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2017 Dell EMC - * Copyright (c) 2000 David O'Brien + * Copyright (c) 2000-2001, 2003 David O'Brien * Copyright (c) 1995-1996 Søren Schmidt * Copyright (c) 1996 Peter Wemm * All rights reserved. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r325043 - head/sys/compat/linux
Author: obrien Date: Fri Oct 27 16:36:05 2017 New Revision: 325043 URL: https://svnweb.freebsd.org/changeset/base/325043 Log: Update comment to match r177997 & r178036 changes. Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c == --- head/sys/compat/linux/linux_file.c Fri Oct 27 16:23:45 2017 (r325042) +++ head/sys/compat/linux/linux_file.c Fri Oct 27 16:36:05 2017 (r325043) @@ -139,7 +139,7 @@ linux_common_open(struct thread *td, int dirfd, char * goto done; /* -* XXX In between kern_open() and fget(), another process +* XXX In between kern_openat() and fget(), another process * having the same filedesc could use that fd without * checking below. */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r316591 - head/sys/dev/tpm
Author: obrien Date: Thu Apr 6 22:21:49 2017 New Revision: 316591 URL: https://svnweb.freebsd.org/changeset/base/316591 Log: Remove dead code. The #ifdef __FreeBSD__ section within the OpenBSD tpm_attach() implementation can never be active. Modified: head/sys/dev/tpm/tpm.c Modified: head/sys/dev/tpm/tpm.c == --- head/sys/dev/tpm/tpm.c Thu Apr 6 20:12:39 2017(r316590) +++ head/sys/dev/tpm/tpm.c Thu Apr 6 22:21:49 2017(r316591) @@ -422,12 +422,8 @@ tpm_attach(device_t parent, device_t sel return; } -#ifdef __FreeBSD__ - sc->sc_suspend = 0; -#else sc->sc_suspend = PWR_RESUME; sc->sc_powerhook = powerhook_establish(tpm_powerhook, sc); -#endif } #endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312818 - head/share/man/man9
Author: obrien Date: Thu Jan 26 16:36:12 2017 New Revision: 312818 URL: https://svnweb.freebsd.org/changeset/base/312818 Log: Correct grammar. Modified: head/share/man/man9/printf.9 Modified: head/share/man/man9/printf.9 == --- head/share/man/man9/printf.9Thu Jan 26 15:37:53 2017 (r312817) +++ head/share/man/man9/printf.9Thu Jan 26 16:36:12 2017 (r312818) @@ -111,7 +111,7 @@ It requires two arguments: a pointer and a .Vt "char *" string. -The memory pointed to be the pointer is output in hexadecimal one byte at +The memory pointed to by the pointer is output in hexadecimal one byte at a time. The string is used as a delimiter between individual bytes. If present, a width directive will specify the number of bytes to display. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296968 - in head/contrib/libxo: . bin build libxo
Author: obrien Date: Wed Mar 16 23:59:29 2016 New Revision: 296968 URL: https://svnweb.freebsd.org/changeset/base/296968 Log: Bring down 0.4.5 vendor files and other catchups with the distribution tarball. Reviewed by: phil Added: - copied unchanged from r296967, vendor/Juniper/libxo/dist/libxo/xo_config.h.in Directory Properties: head/contrib/libxo/libxo/xo_config.h.in (props changed) Deleted: head/contrib/libxo/bin/ head/contrib/libxo/build/ Modified: head/contrib/libxo/install-sh Modified: head/contrib/libxo/install-sh == --- head/contrib/libxo/install-sh Wed Mar 16 23:50:41 2016 (r296967) +++ head/contrib/libxo/install-sh Wed Mar 16 23:59:29 2016 (r296968) @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { -if (set -f) 2>/dev/null; then - posix_glob= -else - posix_glob=: -fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; +shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *''* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; +case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) +echo "$0: invalid mode: $mode" >&2 +exit 1;; +esac +shift;; -o) chowncmd="$chownprog $2" - shift;; +shift;; -s) stripcmd=$stripprog;; --t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; +-t) +is_target_a_directory=always +dst_arg=$2 +# Protect names problematic for 'test' and other utilities. +case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; +esac +shift;; --T) no_target_directory=true;; +-T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; ---)shift - break;; +--) shift +break;; --*)echo "$0: invalid option: $1" >&2 - exit 1;; +-*) echo "$0: invalid option: $1" >&2 +exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then +echo "$0: target directory not allowed when installing a directory." >&2 +exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then +if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 +fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= +u_plus_rw= else - u_plus_rw='% 200' +u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= +u_plus_rw= else - u_plus_rw=,u+rw +u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41
svn commit: r296966 - head/contrib/libxo
Author: obrien Date: Wed Mar 16 23:42:57 2016 New Revision: 296966 URL: https://svnweb.freebsd.org/changeset/base/296966 Log: Block the r296965 vendor/Juniper/libxo cleanup (to match the release tarball) from being merged in -- backing out FreeBSD localizations. Modified: Directory Properties: head/contrib/libxo/ (props changed) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r285645 - head/bin/dd
Author: obrien Date: Thu Jul 16 23:38:12 2015 New Revision: 285645 URL: https://svnweb.freebsd.org/changeset/base/285645 Log: Mention the dd-like recoverdisk(1) to help folks find this great BSD command. Modified: head/bin/dd/dd.1 Modified: head/bin/dd/dd.1 == --- head/bin/dd/dd.1Thu Jul 16 22:07:13 2015(r285644) +++ head/bin/dd/dd.1Thu Jul 16 23:38:12 2015(r285645) @@ -416,6 +416,7 @@ if necessary, to a 1MiB boundary: .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , +.Xr recoverdisk 1 , .Xr tr 1 , .Xr geom 4 .Sh STANDARDS ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r279382 - head/sys/boot/userboot/libstand
Author: obrien Date: Fri Feb 27 22:23:35 2015 New Revision: 279382 URL: https://svnweb.freebsd.org/changeset/base/279382 Log: sys/boot/userboot/libstand/libstand.a should also include strtoul.c; as lib/libstand/ and sys/boot/libstand32/ already does. Modified: head/sys/boot/userboot/libstand/Makefile Modified: head/sys/boot/userboot/libstand/Makefile == --- head/sys/boot/userboot/libstand/MakefileFri Feb 27 22:22:05 2015 (r279381) +++ head/sys/boot/userboot/libstand/MakefileFri Feb 27 22:23:35 2015 (r279382) @@ -43,7 +43,7 @@ CFLAGS+= -msoft-float -D_STANDALONE # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ - globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \ + globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ sbrk.c twiddle.c zalloc.c zalloc_malloc.c # private (pruned) versions of libc string functions ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r279381 - head/sys/boot/amd64/efi
Author: obrien Date: Fri Feb 27 22:22:05 2015 New Revision: 279381 URL: https://svnweb.freebsd.org/changeset/base/279381 Log: Use sys/boot/userboot/libstand/ and not /usr/lib/libstand.a. Modified: head/sys/boot/amd64/efi/Makefile Modified: head/sys/boot/amd64/efi/Makefile == --- head/sys/boot/amd64/efi/MakefileFri Feb 27 22:20:07 2015 (r279380) +++ head/sys/boot/amd64/efi/MakefileFri Feb 27 22:22:05 2015 (r279381) @@ -84,6 +84,7 @@ loader.efi: loader.sym --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} LIBEFI=${.OBJDIR}/../../efi/libefi/libefi.a +LIBSTAND= ${.OBJDIR}/../../userboot/libstand/libstand.a DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r279380 - in head/sys/boot/amd64: boot1.efi efi
Author: obrien Date: Fri Feb 27 22:20:07 2015 New Revision: 279380 URL: https://svnweb.freebsd.org/changeset/base/279380 Log: Remove duplicated -I. Modified: head/sys/boot/amd64/boot1.efi/Makefile head/sys/boot/amd64/efi/Makefile Modified: head/sys/boot/amd64/boot1.efi/Makefile == --- head/sys/boot/amd64/boot1.efi/Makefile Fri Feb 27 22:19:49 2015 (r279379) +++ head/sys/boot/amd64/boot1.efi/Makefile Fri Feb 27 22:20:07 2015 (r279380) @@ -53,8 +53,6 @@ boot1.efi: loader.sym -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} -CFLAGS+= -I${.CURDIR}/../../common - boot1.o: ${.CURDIR}/../../common/ufsread.c # The following inserts out objects into a template FAT file system Modified: head/sys/boot/amd64/efi/Makefile == --- head/sys/boot/amd64/efi/MakefileFri Feb 27 22:19:49 2015 (r279379) +++ head/sys/boot/amd64/efi/MakefileFri Feb 27 22:20:07 2015 (r279380) @@ -84,7 +84,6 @@ loader.efi: loader.sym --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} LIBEFI=${.OBJDIR}/../../efi/libefi/libefi.a -CFLAGS+= -I${.CURDIR}/../../common DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r279378 - head/share/mk
Author: obrien Date: Fri Feb 27 22:18:33 2015 New Revision: 279378 URL: https://svnweb.freebsd.org/changeset/base/279378 Log: Update r279018 so it only applies to Clang version 3.5+ and not 3.4.[1-9]. Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkFri Feb 27 22:16:54 2015(r279377) +++ head/share/mk/bsd.sys.mkFri Feb 27 22:18:33 2015(r279378) @@ -119,7 +119,7 @@ CLANG_NO_IAS=-no-integrated-as .endif CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -simplifycfg-dup-ret -mllvm -.if ${COMPILER_VERSION} > 30400 +.if ${COMPILER_VERSION} >= 30500 CLANG_OPT_SMALL+= -enable-gvn=false .endif CFLAGS.clang+= -Qunused-arguments ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r279376 - in head/cddl/usr.bin: ctfconvert ctfmerge
Author: obrien Date: Fri Feb 27 22:10:31 2015 New Revision: 279376 URL: https://svnweb.freebsd.org/changeset/base/279376 Log: These CTF tools do not use anything from libctf, so no need to link with it. Modified: head/cddl/usr.bin/ctfconvert/Makefile head/cddl/usr.bin/ctfmerge/Makefile Modified: head/cddl/usr.bin/ctfconvert/Makefile == --- head/cddl/usr.bin/ctfconvert/Makefile Fri Feb 27 21:35:36 2015 (r279375) +++ head/cddl/usr.bin/ctfconvert/Makefile Fri Feb 27 22:10:31 2015 (r279376) @@ -36,7 +36,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} -LDADD= -lctf -ldwarf -lelf -lz -lpthread +DPADD= ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} +LDADD= -ldwarf -lelf -lz -lpthread .include Modified: head/cddl/usr.bin/ctfmerge/Makefile == --- head/cddl/usr.bin/ctfmerge/Makefile Fri Feb 27 21:35:36 2015 (r279375) +++ head/cddl/usr.bin/ctfmerge/Makefile Fri Feb 27 22:10:31 2015 (r279376) @@ -33,7 +33,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} -LDADD= -lctf -ldwarf -lelf -lz -lpthread +DPADD= ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} +LDADD= -ldwarf -lelf -lz -lpthread .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r271049 - head/share/man/man4
Author: obrien Date: Wed Sep 3 19:06:08 2014 New Revision: 271049 URL: http://svnweb.freebsd.org/changeset/base/271049 Log: Note that script(1) consumes filemon(4). Modified: head/share/man/man4/filemon.4 Modified: head/share/man/man4/filemon.4 == --- head/share/man/man4/filemon.4 Wed Sep 3 19:01:34 2014 (r271048) +++ head/share/man/man4/filemon.4 Wed Sep 3 19:06:08 2014 (r271049) @@ -165,6 +165,7 @@ buffer contents to it. .Sh SEE ALSO .Xr dtrace 1 , .Xr ktrace 1 , +.Xr script 1 , .Xr truss 1 , .Xr ioctl 2 .Sh HISTORY ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r258931 - head/usr.bin/yacc
Author: obrien Date: Wed Dec 4 19:15:56 2013 New Revision: 258931 URL: http://svnweb.freebsd.org/changeset/base/258931 Log: Add missing bits from the vendor's 2005-05-04 change to contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by applications") so that applications have a hope of detecting newer FreeBSD YACC output from an older one. Submitted by: Juniper Networks Modified: head/usr.bin/yacc/Makefile Modified: head/usr.bin/yacc/Makefile == --- head/usr.bin/yacc/Makefile Wed Dec 4 19:04:56 2013(r258930) +++ head/usr.bin/yacc/Makefile Wed Dec 4 19:15:56 2013(r258931) @@ -1,7 +1,8 @@ # @(#)Makefile5.3 (Berkeley) 5/12/90 # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/byacc +BYACC_SRC= ${.CURDIR}/../../contrib/byacc +.PATH: ${BYACC_SRC} PROG= yacc SRCS= closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c output.c \ @@ -12,7 +13,10 @@ CFLAGS+= -DMIXEDCASE_FILENAMES=1 \ -DHAVE_FCNTL_H=1 \ -DHAVE_ATEXIT=1 \ -DHAVE_MKSTEMP=1 - + +YYPATCH!= cat ${BYACC_SRC}/VERSION +CFLAGS+= -DYYPATCH=${YYPATCH} + LINKS= ${BINDIR}/yacc ${BINDIR}/byacc MLINKS=yacc.1 byacc.1 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255452 - in head/sys: conf modules/aesni
Author: obrien Date: Tue Sep 10 16:50:13 2013 New Revision: 255452 URL: http://svnweb.freebsd.org/changeset/base/255452 Log: Back out r255440. /usr/bin/gcc @r255185 (2013-09-03) can build this. Approved by: re (kib) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/aesni/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Tue Sep 10 13:51:19 2013(r255451) +++ head/sys/conf/files.amd64 Tue Sep 10 16:50:13 2013(r255452) @@ -142,7 +142,7 @@ crypto/aesni/aeskeys_amd64.Soptional ae crypto/aesni/aesni.c optional aesni aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse ${COMPILER_TYPE:Mclang:S/clang/-maes} ${.IMPSRC}" \ + compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -maes ${.IMPSRC}" \ no-implicit-rule\ clean "aesni_wrap.o" crypto/blowfish/bf_enc.c optionalcrypto | ipsec Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Tue Sep 10 13:51:19 2013(r255451) +++ head/sys/conf/files.i386Tue Sep 10 16:50:13 2013(r255452) @@ -128,7 +128,7 @@ crypto/aesni/aeskeys_i386.S optional aes crypto/aesni/aesni.c optional aesni aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse ${COMPILER_TYPE} ${COMPILER_TYPE:Mclang:S/clang/-maes} ${.IMPSRC}" \ + compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -maes ${.IMPSRC}" \ no-implicit-rule\ clean "aesni_wrap.o" crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb Modified: head/sys/modules/aesni/Makefile == --- head/sys/modules/aesni/Makefile Tue Sep 10 13:51:19 2013 (r255451) +++ head/sys/modules/aesni/Makefile Tue Sep 10 16:50:13 2013 (r255452) @@ -12,7 +12,7 @@ OBJS+=aesni_wrap.o # Remove -nostdinc so we can get the intrinsics. aesni_wrap.o: aesni_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ --mmmx -msse ${COMPILER_TYPE:Mclang:S/clang/-maes/} ${.IMPSRC} +-mmmx -msse -maes ${.IMPSRC} ${CTFCONVERT_CMD} .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255440 - in head/sys: conf modules/aesni
Author: obrien Date: Tue Sep 10 05:49:31 2013 New Revision: 255440 URL: http://svnweb.freebsd.org/changeset/base/255440 Log: Only use a clang'ism if ${CC} is clang. Reviewed by: sjg Approved by: re (kib) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/aesni/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Tue Sep 10 05:17:53 2013(r255439) +++ head/sys/conf/files.amd64 Tue Sep 10 05:49:31 2013(r255440) @@ -142,7 +142,7 @@ crypto/aesni/aeskeys_amd64.Soptional ae crypto/aesni/aesni.c optional aesni aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -maes ${.IMPSRC}" \ + compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse ${COMPILER_TYPE:Mclang:S/clang/-maes} ${.IMPSRC}" \ no-implicit-rule\ clean "aesni_wrap.o" crypto/blowfish/bf_enc.c optionalcrypto | ipsec Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Tue Sep 10 05:17:53 2013(r255439) +++ head/sys/conf/files.i386Tue Sep 10 05:49:31 2013(r255440) @@ -128,7 +128,7 @@ crypto/aesni/aeskeys_i386.S optional aes crypto/aesni/aesni.c optional aesni aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -maes ${.IMPSRC}" \ + compile-with"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse ${COMPILER_TYPE} ${COMPILER_TYPE:Mclang:S/clang/-maes} ${.IMPSRC}" \ no-implicit-rule\ clean "aesni_wrap.o" crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb Modified: head/sys/modules/aesni/Makefile == --- head/sys/modules/aesni/Makefile Tue Sep 10 05:17:53 2013 (r255439) +++ head/sys/modules/aesni/Makefile Tue Sep 10 05:49:31 2013 (r255440) @@ -12,7 +12,7 @@ OBJS+=aesni_wrap.o # Remove -nostdinc so we can get the intrinsics. aesni_wrap.o: aesni_wrap.c ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ --mmmx -msse -maes ${.IMPSRC} +-mmmx -msse ${COMPILER_TYPE:Mclang:S/clang/-maes/} ${.IMPSRC} ${CTFCONVERT_CMD} .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r254624 - in head: . sys/amd64/conf sys/conf sys/i386/conf
Author: obrien Date: Wed Aug 21 22:43:29 2013 New Revision: 254624 URL: http://svnweb.freebsd.org/changeset/base/254624 Log: The PADLOCK_RNG and RDRAND_RNG kernel options are now devices. Thus "device padlock_rng" and "device rdrand_rng" should be used instead of "options PADLOCK_RNG" & "options RDRAND_RNG". Requested by: so@ (des) Submitted by: obrien, arthurm...@gmail.com Obtained from:Juniper Networks Modified: head/UPDATING head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/i386/conf/GENERIC head/sys/i386/conf/NOTES Modified: head/UPDATING == --- head/UPDATING Wed Aug 21 22:40:29 2013(r254623) +++ head/UPDATING Wed Aug 21 22:43:29 2013(r254624) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130821: + The PADLOCK_RNG and RDRAND_RNG kernel options are now devices. + Thus "device padlock_rng" and "device rdrand_rng" should be + used instead of "options PADLOCK_RNG" & "options RDRAND_RNG". + 20130813: WITH_ICONV has been split into two feature sets. WITH_ICONV now enables just the iconv* functionality and is now on by default. @@ -340,9 +345,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 20120913: The random(4) support for the VIA hardware random number generator (`PADLOCK') is no longer enabled unconditionally. - Add the PADLOCK_RNG option in the custom kernel config if + Add the padlock_rng device in the custom kernel config if needed. The GENERIC kernels on i386 and amd64 do include the - option, so the change only affects the custom kernel + device, so the change only affects the custom kernel configurations. 20120908: Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Wed Aug 21 22:40:29 2013(r254623) +++ head/sys/amd64/conf/GENERIC Wed Aug 21 22:43:29 2013(r254624) @@ -293,8 +293,8 @@ device wpi # Intel 3945ABG wireless NI # Pseudo devices. device loop# Network loopback device random # Entropy device -optionsPADLOCK_RNG # VIA Padlock RNG -optionsRDRAND_RNG # Intel Bull Mountain RNG +device padlock_rng # VIA Padlock RNG +device rdrand_rng # Intel Bull Mountain RNG device ether # Ethernet support device vlan# 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Wed Aug 21 22:40:29 2013(r254623) +++ head/sys/amd64/conf/NOTES Wed Aug 21 22:43:29 2013(r254624) @@ -496,6 +496,8 @@ device vpd device asmc #devicesi device tpm +device padlock_rng # VIA Padlock RNG +device rdrand_rng # Intel Bull Mountain RNG # # Laptop/Notebook options: Modified: head/sys/conf/options.amd64 == --- head/sys/conf/options.amd64 Wed Aug 21 22:40:29 2013(r254623) +++ head/sys/conf/options.amd64 Wed Aug 21 22:43:29 2013(r254624) @@ -68,7 +68,3 @@ XENHVMopt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h - -# hw random number generators for random(4) -PADLOCK_RNGopt_cpu.h -RDRAND_RNG opt_cpu.h Modified: head/sys/conf/options.i386 == --- head/sys/conf/options.i386 Wed Aug 21 22:40:29 2013(r254623) +++ head/sys/conf/options.i386 Wed Aug 21 22:43:29 2013(r254624) @@ -123,7 +123,3 @@ XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h - -# hw random number generators for random(4) -PADLOCK_RNGopt_cpu.h -RDRAND_RNG opt_cpu.h Modified: head/sys/i386/conf/GENERIC == --- head/sys/i386/conf/GENERIC Wed Aug 21 22:40:29 2013(r254623) +++ head/sys/i386/conf/GENERIC Wed Aug 21 22:43:29 2013(r254624) @@ -307,8 +307,8 @@ device wpi # Intel 3945ABG wireless NI # Pseudo devices. device loop# Network loopback device random # Entropy device -optionsPADLOCK_RNG # VIA Padlock RNG -optionsRDRAND_RNG # Intel Bull Mountain RNG +device padlock_rng
svn commit: r254434 - head/share/man/man9
Author: obrien Date: Sat Aug 17 01:02:04 2013 New Revision: 254434 URL: http://svnweb.freebsd.org/changeset/base/254434 Log: Correct spelling. Modified: head/share/man/man9/sleep.9 Modified: head/share/man/man9/sleep.9 == --- head/share/man/man9/sleep.9 Sat Aug 17 00:25:11 2013(r254433) +++ head/share/man/man9/sleep.9 Sat Aug 17 01:02:04 2013(r254434) @@ -173,7 +173,7 @@ functions take .Fa sbt parameter instead of .Fa timo . -It allows to specify relative or absolite wakeup time with higher resolution +It allows to specify relative or absolute wakeup time with higher resolution in form of .Vt sbintime_t . The parameter ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r254150 - head/sys/vm
Author: obrien Date: Fri Aug 9 16:43:50 2013 New Revision: 254150 URL: http://svnweb.freebsd.org/changeset/base/254150 Log: Add missing 'VPO_BUSY' from r254141 to fix kernel build break. Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h == --- head/sys/vm/vm_page.h Fri Aug 9 16:34:12 2013(r254149) +++ head/sys/vm/vm_page.h Fri Aug 9 16:43:50 2013(r254150) @@ -171,6 +171,7 @@ struct vm_page { #defineVPO_UNMANAGED 0x04/* no PV management for page */ #defineVPO_SWAPINPROG 0x08/* swap I/O in progress on page */ #defineVPO_NOSYNC 0x10/* do not collect for syncer */ +#defineVPO_BUSY0x20/* TBD */ /* * Busy page implementation details. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r254147 - in head: share/man/man4 sys/conf sys/dev/random tools/tools/sysdoc
Author: obrien Date: Fri Aug 9 15:31:50 2013 New Revision: 254147 URL: http://svnweb.freebsd.org/changeset/base/254147 Log: * Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah * Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones. * If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed. * Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one. Submitted by: arthurm...@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: so (des) Added: head/sys/dev/random/random_adaptors.c (contents, props changed) head/sys/dev/random/random_adaptors.h (contents, props changed) Modified: head/share/man/man4/random.4 head/sys/conf/files head/sys/dev/random/ivy.c head/sys/dev/random/nehemiah.c head/sys/dev/random/probe.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c head/sys/dev/random/randomdev_soft.h head/sys/dev/random/yarrow.c head/tools/tools/sysdoc/tunables.mdoc Modified: head/share/man/man4/random.4 == --- head/share/man/man4/random.4Fri Aug 9 14:17:47 2013 (r254146) +++ head/share/man/man4/random.4Fri Aug 9 15:31:50 2013 (r254147) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 7, 2012 +.Dd August 7, 2013 .Dt RANDOM 4 .Os .Sh NAME @@ -43,6 +43,13 @@ The device will probe for certain hardware entropy sources, and use these in preference to the fallback, which is a generator implemented in software. +If the kernel environment MIB's +.Va hw.nehemiah_rng_enable +or +.Va hw.ivy_rng_enable +are set to +.Dq Li 0 , +the associated hardware entropy source will be ignored. .Pp If the device is using the software generator, @@ -74,6 +81,7 @@ device, use the command line: .Pp which results in something like: .Bd -literal -offset indent +kern.random.adaptors: yarrow kern.random.sys.seeded: 1 kern.random.sys.harvest.ethernet: 1 kern.random.sys.harvest.point_to_point: 1 @@ -89,7 +97,9 @@ kern.random.yarrow.slowoverthresh: 2 (These would not be seen if a hardware generator is present.) .Pp -All settings are read/write. +Other than +.Dl kern.random.adaptors +all settings are read/write. .Pp The .Va kern.random.sys.seeded Modified: head/sys/conf/files == --- head/sys/conf/files Fri Aug 9 14:17:47 2013(r254146) +++ head/sys/conf/files Fri Aug 9 15:31:50 2013(r254147) @@ -2032,6 +2032,7 @@ rt2860.fw optional rt2860fw | ralfw \ dev/random/harvest.c standard dev/random/hash.c optional random dev/random/probe.c optional random +dev/random/random_adaptors.c standard dev/random/randomdev.c optional random dev/random/randomdev_soft.coptional random dev/random/yarrow.coptional random Modified: head/sys/dev/random/ivy.c == --- head/sys/dev/random/ivy.c Fri Aug 9 14:17:47 2013(r254146) +++ head/sys/dev/random/ivy.c Fri Aug 9 15:31:50 2013(r254147) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2013 David E. O'Brien * Copyright (c) 2012 Konstantin Belousov * All rights reserved. * @@ -28,16 +29,19 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cpu.h" - -#ifdef RDRAND_RNG - #include #include +#include #include +#include #include #include #include + +#include +#include + +#include #include #defineRETRY_COUNT 10 @@ -46,7 +50,7 @@ static void random_ivy_init(void); static void random_ivy_deinit(void); static int random_ivy_read(void *, int); -struct random_systat random_ivy = { +struct random_adaptor random_ivy = { .ident = "Hardware, Intel IvyBridge+ RNG", .init = random_ivy_init, .deinit = random_ivy_deinit, @@ -114,4 +118,28 @@ random_ivy_read(void *buf, int c) return (c - count); } +static int +rdrand_modevent(module_t mod, int type, void *unused) +{ + + switch (type) { + case MOD_LOAD: + if (cpu_
svn commit: r254073 - head/tools/tools/sysdoc
Author: obrien Date: Wed Aug 7 20:35:26 2013 New Revision: 254073 URL: http://svnweb.freebsd.org/changeset/base/254073 Log: Improve the sysctl symbol extraction from the kernel so that it find more (all?) sysctl's. Previously some where missed, depending on how they were defined. Modified: head/tools/tools/sysdoc/sysdoc.sh Modified: head/tools/tools/sysdoc/sysdoc.sh == --- head/tools/tools/sysdoc/sysdoc.sh Wed Aug 7 19:56:35 2013 (r254072) +++ head/tools/tools/sysdoc/sysdoc.sh Wed Aug 7 20:35:26 2013 (r254073) @@ -88,7 +88,7 @@ EOF # tunables in our tunables.mdoc file and generate # the final 'inner circle' of our manual page. markup_create() { - sort < _names |\ + sort -u < _names | \ xargs -n 1 /bin/sh ./sysctl.sh \ > markup.file \ 2> tunables.TODO @@ -238,9 +238,13 @@ if [ -z "$LOCATION" ] ; && for x in `find $LOCATION -name '*.kld'` \ $LOCATION/kernel; \ do nm $x | \ - grep ' sysctl___' | uniq | \ - sed 's/sysctl___//g' | sed 's/_/./g' | \ - awk {'print $3'} > _names; + sed -n '/sysctl___/ { + 's/[\.a-z_]*sysctl___//g' + 's/_/./g' + p + }' |\ + awk {'print $3'} | \ + sort -u > _names; done; markup_create page_create ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r253845 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/padlock_rng sys/modules/random ...
Author: obrien Date: Wed Jul 31 17:21:18 2013 New Revision: 253845 URL: http://svnweb.freebsd.org/changeset/base/253845 Log: Back out r253779 & r253786. Deleted: head/sys/dev/random/random_adaptors.c head/sys/dev/random/random_adaptors.h head/sys/modules/padlock_rng/ head/sys/modules/rdrand_rng/ head/sys/modules/yarrow_rng/ Modified: head/UPDATING head/share/man/man4/random.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/AC100 head/sys/arm/conf/ARMADAXP head/sys/arm/conf/ARNDALE head/sys/arm/conf/ATMEL head/sys/arm/conf/AVILA head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IQ31244 head/sys/arm/conf/KB920X head/sys/arm/conf/LN2410SBC head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RPI-B head/sys/arm/conf/SAM9260EK head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SHEEVAPLUG head/sys/arm/conf/SN9G45 head/sys/arm/conf/TS7800 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/ZEDBOARD head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/dev/random/ivy.c head/sys/dev/random/nehemiah.c head/sys/dev/random/probe.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c head/sys/dev/random/randomdev_soft.h head/sys/dev/random/yarrow.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/i386/conf/XEN head/sys/ia64/conf/GENERIC head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/AR933X_BASE head/sys/mips/conf/BERI_TEMPLATE head/sys/mips/conf/DIR-825 head/sys/mips/conf/GXEMUL head/sys/mips/conf/OCTEON1 head/sys/mips/conf/PB92 head/sys/mips/conf/RT305X head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/conf/std.SWARM head/sys/mips/conf/std.XLP head/sys/modules/Makefile head/sys/modules/random/Makefile head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/WII head/sys/sparc64/conf/GENERIC head/tools/tools/sysdoc/sysdoc.sh head/tools/tools/sysdoc/tunables.mdoc Modified: head/UPDATING == --- head/UPDATING Wed Jul 31 16:27:56 2013(r253844) +++ head/UPDATING Wed Jul 31 17:21:18 2013(r253845) @@ -31,19 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20130729: - random(4) and actual RNG implementations (aka, adaptors) have been - further decoupled. If you are running a custom kernel, you may - need to explicitly enable at least one RNG adaptor in your kernel - config. For example, to use Yarrow, add "options YARROW_RNG" to - your kernel config. For hardware backed RNGs, use either - "RDRAND_RNG" or "PADLOCK_RNG" options. - If you use random.ko via 'random_load="YES"' in /boot/loader.conf - instead of "device random", you will need to change that to - 'yarrow_rng_load="YES"', 'rdrand_rng_load="YES"', or - 'padlock_rng_load="YES"'. random.ko will be loaded automatically - as a dependency module. - 20130726: Behavior of devfs rules path matching has been changed. Pattern is now always matched against fully qualified devfs Modified: head/share/man/man4/random.4 == --- head/share/man/man4/random.4Wed Jul 31 16:27:56 2013 (r253844) +++ head/share/man/man4/random.4Wed Jul 31 17:21:18 2013 (r253845) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2013 +.Dd September 7, 2012 .Dt RANDOM 4 .Os .Sh NAME @@ -43,13 +43,6 @@ The device will probe for certain hardware entropy sources, and use these in preference to the fallback, which is a generator implemented in software. -If the kernel environment MIB's -.Va hw.nehemiah_rng_enable -or -.Va hw.ivy_rng_enable -are set to -.Dq Li 0 , -the associated hardware entropy source will be ignored. .Pp If the device is using the software generator, @@ -81,7 +74,6 @@ device, use the command line: .Pp which results in something like: .Bd -literal -offset indent -kern.random.adaptors: yarrow kern.random.sys.seeded: 1 ker
svn commit: r253814 - head/usr.bin/script
Author: obrien Date: Tue Jul 30 19:21:36 2013 New Revision: 253814 URL: http://svnweb.freebsd.org/changeset/base/253814 Log: MFC'ing to 9.2. Modified: head/usr.bin/script/script.1 Modified: head/usr.bin/script/script.1 == --- head/usr.bin/script/script.1Tue Jul 30 18:54:24 2013 (r253813) +++ head/usr.bin/script/script.1Tue Jul 30 19:21:36 2013 (r253814) @@ -178,7 +178,7 @@ and options first appeared in .Nx 2.0 and were ported to -.Fx 10.0 . +.Fx 9.2 . .Sh BUGS The .Nm ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng
Author: obrien Date: Mon Jul 29 20:58:09 2013 New Revision: 253786 URL: http://svnweb.freebsd.org/changeset/base/253786 Log: Decouple yarrow from random(4) device. * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. * random(4) device doesn't really depend on rijndael-*. Yarrow, however, does. * Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah * Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones. * If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed. * Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one. Submitted by: arthurm...@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: obrien Added: head/sys/dev/random/random_adaptors.c (contents, props changed) head/sys/dev/random/random_adaptors.h (contents, props changed) head/sys/modules/padlock_rng/ head/sys/modules/padlock_rng/Makefile (contents, props changed) head/sys/modules/rdrand_rng/ head/sys/modules/rdrand_rng/Makefile (contents, props changed) head/sys/modules/yarrow_rng/ head/sys/modules/yarrow_rng/Makefile (contents, props changed) Added: head/sys/dev/random/random_adaptors.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/random_adaptors.c Mon Jul 29 20:58:09 2013 (r253786) @@ -0,0 +1,141 @@ +/*- + * Copyright (c) 2013 Arthur Mesh + * 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 + *in this position and unchanged. + * 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. + * + * 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. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +LIST_HEAD(adaptors_head, random_adaptors); +static struct adaptors_head adaptors = LIST_HEAD_INITIALIZER(adaptors); +static struct sx adaptors_lock; /* need a sleepable lock */ + +/* List for the dynamic sysctls */ +static struct sysctl_ctx_list random_clist; + +MALLOC_DEFINE(M_RANDOM_ADAPTORS, "random_adaptors", "Random adaptors buffers"); + +int +random_adaptor_register(const char *name, struct random_adaptor *rsp) +{ + struct random_adaptors *rpp; + + KASSERT(name != NULL && rsp != NULL, ("invalid input to %s", __func__)); + + rpp = malloc(sizeof(struct random_adaptors), M_RANDOM_ADAPTORS, M_WAITOK); + rpp->name = name; + rpp->rsp = rsp; + + sx_xlock(&adaptors_lock); + LIST_INSERT_HEAD(&adaptors, rpp, entries); + sx_xunlock(&adaptors_lock); + + return (0); +} + +struct random_adaptor * +random_adaptor_get(const char *name) +{ + struct random_adaptors *rpp; + struct random_adaptor *rsp; + + rsp = NULL; + + sx_slock(&adaptors_lock); + + LIST_FOREACH(rpp, &adaptors, entries) + if (strcmp(rpp->name, name) == 0) + rsp = rpp->rsp; + + sx_sunlock(&adaptors_lock); + + return (rs
svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp...
Author: obrien Date: Mon Jul 29 20:26:27 2013 New Revision: 253779 URL: http://svnweb.freebsd.org/changeset/base/253779 Log: Decouple yarrow from random(4) device. * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. * random(4) device doesn't really depend on rijndael-*. Yarrow, however, does. * Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah * Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones. * If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed. * Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one. Submitted by: arthurm...@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: obrien Modified: head/UPDATING head/share/man/man4/random.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/AC100 head/sys/arm/conf/ARMADAXP head/sys/arm/conf/ARNDALE head/sys/arm/conf/ATMEL head/sys/arm/conf/AVILA head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IQ31244 head/sys/arm/conf/KB920X head/sys/arm/conf/LN2410SBC head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RPI-B head/sys/arm/conf/SAM9260EK head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SHEEVAPLUG head/sys/arm/conf/SN9G45 head/sys/arm/conf/TS7800 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/ZEDBOARD head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/dev/random/ivy.c head/sys/dev/random/nehemiah.c head/sys/dev/random/probe.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c head/sys/dev/random/randomdev_soft.h head/sys/dev/random/yarrow.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/i386/conf/XEN head/sys/ia64/conf/GENERIC head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/AR933X_BASE head/sys/mips/conf/BERI_TEMPLATE head/sys/mips/conf/DIR-825 head/sys/mips/conf/GXEMUL head/sys/mips/conf/OCTEON1 head/sys/mips/conf/PB92 head/sys/mips/conf/RT305X head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/conf/std.SWARM head/sys/mips/conf/std.XLP head/sys/modules/Makefile head/sys/modules/random/Makefile head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/WII head/sys/sparc64/conf/GENERIC head/tools/tools/sysdoc/sysdoc.sh head/tools/tools/sysdoc/tunables.mdoc Modified: head/UPDATING == --- head/UPDATING Mon Jul 29 19:50:30 2013(r253778) +++ head/UPDATING Mon Jul 29 20:26:27 2013(r253779) @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130729: + random(4) and actual RNG implementations (aka, adaptors) have been + further decoupled. If you are running a custom kernel, you may + need to explicitly enable at least one RNG adaptor in your kernel + config. For example, to use Yarrow, add "options YARROW_RNG" to + your kernel config. For hardware backed RNGs, use either + "RDRAND_RNG" or "PADLOCK_RNG" options. + If you use random.ko via 'random_load="YES"' in /boot/loader.conf + instead of "device random", you will need to change that to + 'yarrow_rng_load="YES"', 'rdrand_rng_load="YES"', or + 'padlock_rng_load="YES"'. random.ko will be loaded automatic
svn commit: r253618 - head/sys/dev/usb/gadget
Author: obrien Date: Wed Jul 24 18:32:15 2013 New Revision: 253618 URL: http://svnweb.freebsd.org/changeset/base/253618 Log: per style(9): Kernel include files (i.e. sys/*.h) come first; normally, include OR , but not both. includes , and it is okay to depend on that. Modified: head/sys/dev/usb/gadget/g_audio.c head/sys/dev/usb/gadget/g_keyboard.c head/sys/dev/usb/gadget/g_modem.c head/sys/dev/usb/gadget/g_mouse.c Modified: head/sys/dev/usb/gadget/g_audio.c == --- head/sys/dev/usb/gadget/g_audio.c Wed Jul 24 18:13:43 2013 (r253617) +++ head/sys/dev/usb/gadget/g_audio.c Wed Jul 24 18:32:15 2013 (r253618) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * @@ -30,11 +29,12 @@ * http://www.usb.org/developers/devclass_docs/termt10.pdf */ +#include +__FBSDID("$FreeBSD$"); + #include #include -#include #include -#include #include #include #include Modified: head/sys/dev/usb/gadget/g_keyboard.c == --- head/sys/dev/usb/gadget/g_keyboard.cWed Jul 24 18:13:43 2013 (r253617) +++ head/sys/dev/usb/gadget/g_keyboard.cWed Jul 24 18:32:15 2013 (r253618) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * @@ -28,11 +27,12 @@ * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ +#include +__FBSDID("$FreeBSD$"); + #include #include -#include #include -#include #include #include #include Modified: head/sys/dev/usb/gadget/g_modem.c == --- head/sys/dev/usb/gadget/g_modem.c Wed Jul 24 18:13:43 2013 (r253617) +++ head/sys/dev/usb/gadget/g_modem.c Wed Jul 24 18:32:15 2013 (r253618) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * @@ -30,11 +29,12 @@ * http://www.usb.org/developers/devclass_docs/cdc_wmc10.zip */ +#include +__FBSDID("$FreeBSD$"); + #include #include -#include #include -#include #include #include #include Modified: head/sys/dev/usb/gadget/g_mouse.c == --- head/sys/dev/usb/gadget/g_mouse.c Wed Jul 24 18:13:43 2013 (r253617) +++ head/sys/dev/usb/gadget/g_mouse.c Wed Jul 24 18:32:15 2013 (r253618) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * @@ -28,11 +27,12 @@ * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ +#include +__FBSDID("$FreeBSD$"); + #include #include -#include #include -#include #include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r253122 - head/sys/dev/random
Author: obrien Date: Tue Jul 9 23:47:28 2013 New Revision: 253122 URL: http://svnweb.freebsd.org/changeset/base/253122 Log: Refactor random_systat to be a *random_systat. This avoids unnecessary structure copying in random_ident_hardware(). This change will also help further modularization of random(4) subsystem. Submitted by: arthurm...@gmail.com Reviewed by: obrien Obtained from: Juniper Networks Modified: head/sys/dev/random/probe.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c Modified: head/sys/dev/random/probe.c == --- head/sys/dev/random/probe.c Tue Jul 9 23:21:57 2013(r253121) +++ head/sys/dev/random/probe.c Tue Jul 9 23:47:28 2013(r253122) @@ -61,11 +61,11 @@ extern struct random_systat random_ivy; #endif void -random_ident_hardware(struct random_systat *systat) +random_ident_hardware(struct random_systat **systat) { /* Set default to software */ - *systat = random_yarrow; + *systat = &random_yarrow; /* Then go looking for hardware */ #if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) @@ -76,7 +76,7 @@ random_ident_hardware(struct random_syst enable = 1; TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); if (enable) - *systat = random_nehemiah; + *systat = &random_nehemiah; } #endif #ifdef RDRAND_RNG @@ -86,7 +86,7 @@ random_ident_hardware(struct random_syst enable = 1; TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); if (enable) - *systat = random_ivy; + *systat = &random_ivy; } #endif #endif Modified: head/sys/dev/random/randomdev.c == --- head/sys/dev/random/randomdev.c Tue Jul 9 23:21:57 2013 (r253121) +++ head/sys/dev/random/randomdev.c Tue Jul 9 23:47:28 2013 (r253122) @@ -70,7 +70,7 @@ static struct cdevsw random_cdevsw = { .d_name = "random", }; -struct random_systat random_systat; +struct random_systat *random_systat; /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *random_dev; @@ -88,8 +88,8 @@ random_close(struct cdev *dev __unused, { if ((flags & FWRITE) && (priv_check(td, PRIV_RANDOM_RESEED) == 0) && (securelevel_gt(td->td_ucred, 0) == 0)) { - (*random_systat.reseed)(); - random_systat.seeded = 1; + (*random_systat->reseed)(); + random_systat->seeded = 1; arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ } @@ -104,8 +104,8 @@ random_read(struct cdev *dev __unused, s void *random_buf; /* Blocking logic */ - if (!random_systat.seeded) - error = (*random_systat.block)(flag); + if (!random_systat->seeded) + error = (*random_systat->block)(flag); /* The actual read */ if (!error) { @@ -114,7 +114,7 @@ random_read(struct cdev *dev __unused, s while (uio->uio_resid > 0 && !error) { c = MIN(uio->uio_resid, PAGE_SIZE); - c = (*random_systat.read)(random_buf, c); + c = (*random_systat->read)(random_buf, c); error = uiomove(random_buf, c, uio); } @@ -139,7 +139,7 @@ random_write(struct cdev *dev __unused, error = uiomove(random_buf, c, uio); if (error) break; - (*random_systat.write)(random_buf, c); + (*random_systat->write)(random_buf, c); } free(random_buf, M_TEMP); @@ -172,10 +172,10 @@ random_poll(struct cdev *dev __unused, i int revents = 0; if (events & (POLLIN | POLLRDNORM)) { - if (random_systat.seeded) + if (random_systat->seeded) revents = events & (POLLIN | POLLRDNORM); else - revents = (*random_systat.poll) (events,td); + revents = (*random_systat->poll) (events,td); } return (revents); } @@ -189,11 +189,11 @@ random_modevent(module_t mod __unused, i switch (type) { case MOD_LOAD: random_ident_hardware(&random_systat); - (*random_systat.init)(); + (*random_systat->init)(); if (bootverbose) printf("random: \n", - random_systat.ident); + random_systat->ident); random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw, RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); @@
svn commit: r252637 - head/usr.bin/patch
Author: obrien Date: Wed Jul 3 22:46:30 2013 New Revision: 252637 URL: http://svnweb.freebsd.org/changeset/base/252637 Log: Merge r252513 from src/gnu/usr.bin/patch into src/usr.bin/patch: Properly handle input lines containing NUL characters such that pgets() accurately fills the read buffer. Callers of pgets() still mis-process the buffer contents if the read line contains NUL characters, but this at least makes pgets() accurate. Modified: head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/pch.c == --- head/usr.bin/patch/pch.cWed Jul 3 22:44:26 2013(r252636) +++ head/usr.bin/patch/pch.cWed Jul 3 22:46:30 2013(r252637) @@ -1204,7 +1204,7 @@ pgets(bool do_indent) indent++; } } - strncpy(buf, line, len - skipped); + memcpy(buf, line, len - skipped); buf[len - skipped] = '\0'; } return len; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r252636 - head/usr.bin/patch
Author: obrien Date: Wed Jul 3 22:44:26 2013 New Revision: 252636 URL: http://svnweb.freebsd.org/changeset/base/252636 Log: Merge r252512 from src/gnu/usr.bin/patch into src/usr.bin/patch: Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same. The former makes a copy of stdin, but was not accurately putting the content of stdin into a temp file. This lead to the undercounting the number of lines in hunks containing NUL characters when reading from stdin. Thus resulting in "unexpected end of file in patch" errors. Modified: head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/pch.c == --- head/usr.bin/patch/pch.cWed Jul 3 22:25:00 2013(r252635) +++ head/usr.bin/patch/pch.cWed Jul 3 22:44:26 2013(r252636) @@ -101,13 +101,17 @@ void open_patch_file(const char *filename) { struct stat filestat; + int nr, nw; if (filename == NULL || *filename == '\0' || strEQ(filename, "-")) { pfp = fopen(TMPPATNAME, "w"); if (pfp == NULL) pfatal("can't create %s", TMPPATNAME); - while (fgets(buf, buf_size, stdin) != NULL) - fputs(buf, pfp); + while ((nr = fread(buf, 1, buf_size, stdin)) > 0) { + nw = fwrite(buf, 1, nr, pfp); + if (nr != nw) + pfatal("write error to %s", TMPPATNAME); + } if (ferror(pfp) || fclose(pfp)) pfatal("can't write %s", TMPPATNAME); filename = TMPPATNAME; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r252513 - head/gnu/usr.bin/patch
Author: obrien Date: Tue Jul 2 17:17:42 2013 New Revision: 252513 URL: http://svnweb.freebsd.org/changeset/base/252513 Log: Properly handle input lines containing NUL characters such that pgets() accurately fills the read buffer. Callers of pgets() still mis-process the buffer contents if the read line contains NUL characters, but this at least makes pgets() accurate. Modified: head/gnu/usr.bin/patch/pch.c Modified: head/gnu/usr.bin/patch/pch.c == --- head/gnu/usr.bin/patch/pch.cTue Jul 2 17:09:57 2013 (r252512) +++ head/gnu/usr.bin/patch/pch.cTue Jul 2 17:17:42 2013 (r252513) @@ -1181,7 +1181,7 @@ pgets(bool do_indent) indent++; } } - Strncpy(buf, line, len - skipped); + memcpy(buf, line, len - skipped); buf[len - skipped] = '\0'; } return len; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r252512 - head/gnu/usr.bin/patch
Author: obrien Date: Tue Jul 2 17:09:57 2013 New Revision: 252512 URL: http://svnweb.freebsd.org/changeset/base/252512 Log: Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same. The former makes a copy of stdin, but was not accurately putting the content of stdin into a temp file. This lead to the undercounting the number of lines in hunks containing NUL characters when reading from stdin. Thus resulting in "unexpected end of file in patch" errors. Modified: head/gnu/usr.bin/patch/pch.c Modified: head/gnu/usr.bin/patch/pch.c == --- head/gnu/usr.bin/patch/pch.cTue Jul 2 16:58:15 2013 (r252511) +++ head/gnu/usr.bin/patch/pch.cTue Jul 2 17:09:57 2013 (r252512) @@ -83,12 +83,17 @@ re_patch(void) void open_patch_file(char *filename) { + int nr, nw; + if (filename == Nullch || !*filename || strEQ(filename, "-")) { pfp = fopen(TMPPATNAME, "w"); if (pfp == Nullfp) pfatal2("can't create %s", TMPPATNAME); - while (fgets(buf, buf_size, stdin) != Nullch) - fputs(buf, pfp); + while ((nr = fread(buf, 1, buf_size, stdin)) > 0) { + nw = fwrite(buf, 1, nr, pfp); + if (nr != nw) + pfatal2("write error to %s", TMPPATNAME); + } Fclose(pfp); filename = TMPPATNAME; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r252363 - in head/usr.sbin/pkg_install: add create lib
Author: obrien Date: Sat Jun 29 00:37:49 2013 New Revision: 252363 URL: http://svnweb.freebsd.org/changeset/base/252363 Log: sysconf(3) returns a long, not an int. Modified: head/usr.sbin/pkg_install/add/extract.c head/usr.sbin/pkg_install/create/pl.c head/usr.sbin/pkg_install/lib/exec.c Modified: head/usr.sbin/pkg_install/add/extract.c == --- head/usr.sbin/pkg_install/add/extract.c Fri Jun 28 22:47:33 2013 (r252362) +++ head/usr.sbin/pkg_install/add/extract.c Sat Jun 29 00:37:49 2013 (r252363) @@ -110,7 +110,8 @@ extract_plist(const char *home, Package PackingList p = pkg->head; char *last_file, *prefix = NULL; char *where_args, *perm_args, *last_chdir; -int maxargs, where_count = 0, perm_count = 0, add_count; +long maxargs; +int where_count = 0, perm_count = 0, add_count; Boolean preserve; maxargs = sysconf(_SC_ARG_MAX) / 2;/* Just use half the argument space */ Modified: head/usr.sbin/pkg_install/create/pl.c == --- head/usr.sbin/pkg_install/create/pl.c Fri Jun 28 22:47:33 2013 (r252362) +++ head/usr.sbin/pkg_install/create/pl.c Sat Jun 29 00:37:49 2013 (r252363) @@ -140,7 +140,8 @@ copy_plist(const char *home, Package *pl const char *there = NULL, *mythere; char *where_args, *prefix = NULL; const char *last_chdir, *root = "/"; -int maxargs, where_count = 0, add_count; +long maxargs; +int where_count = 0, add_count; struct stat stb; dev_t curdir; Modified: head/usr.sbin/pkg_install/lib/exec.c == --- head/usr.sbin/pkg_install/lib/exec.cFri Jun 28 22:47:33 2013 (r252362) +++ head/usr.sbin/pkg_install/lib/exec.cSat Jun 29 00:37:49 2013 (r252363) @@ -65,7 +65,7 @@ vpipe(const char *fmt, ...) { FILE *fp; char *cmd, *rp; - int maxargs; + long maxargs; va_list args; rp = malloc(MAXPATHLEN); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r252348 - head/usr.sbin/pkg_install/lib
Author: obrien Date: Fri Jun 28 17:18:28 2013 New Revision: 252348 URL: http://svnweb.freebsd.org/changeset/base/252348 Log: sysconf(3) returns a long, not an int. Modified: head/usr.sbin/pkg_install/lib/exec.c Modified: head/usr.sbin/pkg_install/lib/exec.c == --- head/usr.sbin/pkg_install/lib/exec.cFri Jun 28 16:39:52 2013 (r252347) +++ head/usr.sbin/pkg_install/lib/exec.cFri Jun 28 17:18:28 2013 (r252348) @@ -34,7 +34,8 @@ vsystem(const char *fmt, ...) { va_list args; char *cmd; -int ret, maxargs; +long maxargs; +int ret; maxargs = sysconf(_SC_ARG_MAX); maxargs -= 32; /* some slop for the sh -c */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251368 - in head: sys/dev/filemon sys/modules/filemon tools/regression/filemon
Author: obrien Date: Tue Jun 4 06:38:01 2013 New Revision: 251368 URL: http://svnweb.freebsd.org/changeset/base/251368 Log: Match the options of the kernel. Modified: head/sys/dev/filemon/filemon.c head/sys/dev/filemon/filemon_wrapper.c head/sys/modules/filemon/Makefile head/tools/regression/filemon/Makefile head/tools/regression/filemon/filemontest.c head/tools/regression/filemon/test_script.sh Modified: head/sys/dev/filemon/filemon.c == --- head/sys/dev/filemon/filemon.c Tue Jun 4 05:44:52 2013 (r251367) +++ head/sys/dev/filemon/filemon.c Tue Jun 4 06:38:01 2013 (r251368) @@ -25,10 +25,11 @@ * SUCH DAMAGE. */ -#include +#include __FBSDID("$FreeBSD$"); -#include +#include "opt_compat.h" + #include #include #include Modified: head/sys/dev/filemon/filemon_wrapper.c == --- head/sys/dev/filemon/filemon_wrapper.c Tue Jun 4 05:44:52 2013 (r251367) +++ head/sys/dev/filemon/filemon_wrapper.c Tue Jun 4 06:38:01 2013 (r251368) @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #if __FreeBSD_version > 800032 #define FILEMON_HAS_LINKAT #endif Modified: head/sys/modules/filemon/Makefile == --- head/sys/modules/filemon/Makefile Tue Jun 4 05:44:52 2013 (r251367) +++ head/sys/modules/filemon/Makefile Tue Jun 4 06:38:01 2013 (r251368) @@ -4,6 +4,6 @@ KMOD= filemon SRCS= ${KMOD}.c -SRCS+= vnode_if.h opt_compat.h opt_capsicum.h +SRCS+= opt_compat.h .include Modified: head/tools/regression/filemon/Makefile == --- head/tools/regression/filemon/Makefile Tue Jun 4 05:44:52 2013 (r251367) +++ head/tools/regression/filemon/Makefile Tue Jun 4 06:38:01 2013 (r251368) @@ -1,10 +1,20 @@ # $FreeBSD$ -BINS= \ +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" +BI_BITS= +.endif + +_BINS= \ filemontest \ - timed-forkb + timed-forkb \ + sizeof_long + +BINS= ${_BINS} +.if defined(BI_BITS) +BINS+= ${_BINS:C/$/32/g} +.endif -bins: filemontest timed-forkb +bins: ${BINS} all: bins NO_MAN= @@ -18,20 +28,25 @@ WITHOUT_CDDL= CLEANFILES+= ${BINS} -tests: bins + +.for f32 in ${BINS} +${f32}32: ${f32}.c + ${CC} -m32 -DBIT=\"32\" -o ${.TARGET} ${CFLAGS} ${.ALLSRC} +.endfor + +tests: kldstat | grep filemon - ${MAKE} test - @echo "Without filemon(4) active:" - ./timed-forkb - @echo "With filemon(4) active:" - script -f typescript-timed-forkb ./timed-forkb - ls -l typescript-timed-forkb.filemon + @echo "" + ${MAKE} test01 + ${MAKE} test02 +.if defined(BI_BITS) + ${MAKE} test32 +.endif @echo "filemon(4) tests passed." # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . -#FILEMONTEST32=filemontest32 -test: filemontest clean-test -.for BIN in filemontest ${FILEMONTEST32} +test01: ${BINS:Mfilemontest*} ${BINS:Msizeof_long*} clean-test +.for BIN in ${BINS:Mfilemontest} cd ${.CURDIR} ; \ for A in 1 2 3 4 5 6 7 8 9 0; do \ for B in 1 2 3 4 5 6 7 8 9 0; do \ @@ -41,13 +56,30 @@ test: filemontest clean-test done ;\ done @cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \ - grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp format OK" + grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || printf "Time stamp format OK\n\n" .endfor + @cd ${.CURDIR} ; set +e ; for F in filemon_log.* ; do \ + tail -1 $$F | grep -q '# Bye bye' || echo "$$F missing filemon bye-bye" ; \ + NL=`wc -l $$F | awk '{print $$1}'` ; \ + if [ "$${NL}" != 97 ]; then echo "$$F BAD, contains $${NL} lines" ; exit 1 ; fi ; done + +test02: ${BINS:Mtimed-forkb*} + @echo "Without filemon(4) active:" + ./timed-forkb + @echo "With filemon(4) active:" + script -f typescript-timed-forkb ./timed-forkb + ls -l typescript-timed-forkb.filemon + +test32: ${BINS:M*32*} + script -f typescript.${.TARGET} ./sizeof_long32 >/dev/null + @tail -1 typescript.test32.filemon | grep -q '# Bye bye' || (echo '32-bit comapt filemon Missing "bye-bye"' ; exit 1) + @egrep -q '^X [0-9]+ 0$$' typescript.test32.filemon || (echo "32-bit binary exit ERROR" ; exit 1) + @printf "filemon(4) 32bit FreeBSD support passed.\n\n" CLEANFILES+= typescript-timed-forkb typescript-timed-forkb.filemon clean-test: - cd ${.CURDIR} ; rm -f filemon_log.* + cd ${.CURDIR} ; rm -f filemon_log*.* clean-tests: clean-test Modified: head/tools/regression/filemon/fi
svn commit: r251198 - head/sys/compat/freebsd32
Author: obrien Date: Fri May 31 21:43:17 2013 New Revision: 251198 URL: http://svnweb.freebsd.org/changeset/base/251198 Log: Add a "kern.features" MIB for 32bit support under a 64bit kernel. Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c == --- head/sys/compat/freebsd32/freebsd32_misc.c Fri May 31 21:31:38 2013 (r251197) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri May 31 21:43:17 2013 (r251198) @@ -104,6 +104,8 @@ __FBSDID("$FreeBSD$"); #include #include +FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); + #ifndef __mips__ CTASSERT(sizeof(struct timeval32) == 8); CTASSERT(sizeof(struct timespec32) == 8); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251174 - head/tools/regression/filemon
Author: obrien Date: Fri May 31 04:27:41 2013 New Revision: 251174 URL: http://svnweb.freebsd.org/changeset/base/251174 Log: Different approach to making all compilers happy. Modified: head/tools/regression/filemon/timed-forkb.c Modified: head/tools/regression/filemon/timed-forkb.c == --- head/tools/regression/filemon/timed-forkb.c Fri May 31 04:19:13 2013 (r251173) +++ head/tools/regression/filemon/timed-forkb.c Fri May 31 04:27:41 2013 (r251174) @@ -45,8 +45,7 @@ #defineSLEEP 20 /* seconds */ #endif -extern int verbose; -int verbose; +static int verbose; static void usage(void) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251173 - head/tools/regression/filemon
Author: obrien Date: Fri May 31 04:19:13 2013 New Revision: 251173 URL: http://svnweb.freebsd.org/changeset/base/251173 Log: Allow building with clang (which is being really stupid here...). Modified: head/tools/regression/filemon/timed-forkb.c Modified: head/tools/regression/filemon/timed-forkb.c == --- head/tools/regression/filemon/timed-forkb.c Fri May 31 03:14:49 2013 (r251172) +++ head/tools/regression/filemon/timed-forkb.c Fri May 31 04:19:13 2013 (r251173) @@ -45,6 +45,7 @@ #defineSLEEP 20 /* seconds */ #endif +extern int verbose; int verbose; static void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r248258 - head/usr.bin/unifdef
Author: obrien Date: Wed Mar 13 22:50:14 2013 New Revision: 248258 URL: http://svnweb.freebsd.org/changeset/base/248258 Log: No need to call an external program. Modified: head/usr.bin/unifdef/unifdefall.sh Modified: head/usr.bin/unifdef/unifdefall.sh == --- head/usr.bin/unifdef/unifdefall.sh Wed Mar 13 22:27:01 2013 (r248257) +++ head/usr.bin/unifdef/unifdefall.sh Wed Mar 13 22:50:14 2013 (r248258) @@ -42,8 +42,7 @@ case "$@" in shift esac -basename=$(basename "$0") -tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XX") || exit 2 +tmp=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XX") || exit 2 trap 'rm -r "$tmp" || exit 2' EXIT export LC_ALL=C ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247963 - head/sys/dev/nvme
Author: obrien Date: Thu Mar 7 22:54:28 2013 New Revision: 247963 URL: http://svnweb.freebsd.org/changeset/base/247963 Log: Fix GCC build: /usr/src/sys/modules/nvme/../../dev/nvme/nvme.c:211: warning: format '%qx' expects type 'long unsigned int', but argument 9 has type 'long long unsigned int' [-Wformat] Modified: head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme.c == --- head/sys/dev/nvme/nvme.cThu Mar 7 22:43:50 2013(r247962) +++ head/sys/dev/nvme/nvme.cThu Mar 7 22:54:28 2013(r247963) @@ -200,13 +200,11 @@ nvme_modevent(module_t mod, int type, vo void nvme_dump_command(struct nvme_command *cmd) { - printf("opc:%x f:%x r1:%x cid:%x nsid:%x r2:%x r3:%x " - "mptr:%qx prp1:%qx prp2:%qx cdw:%x %x %x %x %x %x\n", + printf( +"opc:%x f:%x r1:%x cid:%x nsid:%x r2:%x r3:%x mptr:%jx prp1:%jx prp2:%jx cdw:%x %x %x %x %x %x\n", cmd->opc, cmd->fuse, cmd->rsvd1, cmd->cid, cmd->nsid, cmd->rsvd2, cmd->rsvd3, - (long long unsigned int)cmd->mptr, - (long long unsigned int)cmd->prp1, - (long long unsigned int)cmd->prp2, + (uintmax_t)cmd->mptr, (uintmax_t)cmd->prp1, (uintmax_t)cmd->prp2, cmd->cdw10, cmd->cdw11, cmd->cdw12, cmd->cdw13, cmd->cdw14, cmd->cdw15); } Modified: head/sys/dev/nvme/nvme_ctrlr.c == --- head/sys/dev/nvme/nvme_ctrlr.c Thu Mar 7 22:43:50 2013 (r247962) +++ head/sys/dev/nvme/nvme_ctrlr.c Thu Mar 7 22:54:28 2013 (r247963) @@ -131,8 +131,8 @@ nvme_ctrlr_setup_chatham(struct nvme_con ctrlr->chatham_lbas = chatham_read_4(ctrlr, 0x8068) - 0x110; ctrlr->chatham_size = ctrlr->chatham_lbas * 512; - device_printf(ctrlr->dev, "Chatham size: %lld\n", - (long long)ctrlr->chatham_size); + device_printf(ctrlr->dev, "Chatham size: %jd\n", + (intmax_t)ctrlr->chatham_size); reg1 = reg2 = reg3 = ctrlr->chatham_size - 1; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r245832 - head/bin/cp
Author: obrien Date: Wed Jan 23 02:06:20 2013 New Revision: 245832 URL: http://svnweb.freebsd.org/changeset/base/245832 Log: Return "failure" as we do for 'cp -i' and a "n" answer. Otherwise with '-v' we print out the file name as if it was copied: /tmp/2gb-card/M0132.CTG not overwritten /mnt/DCIM/CANONMSC/M0132.CTG -> /tmp/2gb-card/M0132.CTG Modified: head/bin/cp/utils.c Modified: head/bin/cp/utils.c == --- head/bin/cp/utils.c Wed Jan 23 00:49:05 2013(r245831) +++ head/bin/cp/utils.c Wed Jan 23 02:06:20 2013(r245832) @@ -104,7 +104,7 @@ copy_file(const FTSENT *entp, int dne) if (vflag) printf("%s not overwritten\n", to.p_path); (void)close(from_fd); - return (0); + return (1); } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", to.p_path, YESNO); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r245307 - head/contrib/file/Magdir
Author: obrien Date: Fri Jan 11 17:34:30 2013 New Revision: 245307 URL: http://svnweb.freebsd.org/changeset/base/245307 Log: Add support for Lua 5.2. Submitted by: skreuzer Modified: head/contrib/file/Magdir/lua Modified: head/contrib/file/Magdir/lua == --- head/contrib/file/Magdir/luaFri Jan 11 16:10:11 2013 (r245306) +++ head/contrib/file/Magdir/luaFri Jan 11 17:34:30 2013 (r245307) @@ -19,3 +19,4 @@ 0 string \033Lua Lua bytecode, >4 byte0x50version 5.0 >4 byte0x51version 5.1 +>4 byte0x52version 5.2 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r245171 - in head: tools/build/make_check tools/build/options usr.bin/grep
Author: obrien Date: Tue Jan 8 18:37:12 2013 New Revision: 245171 URL: http://svnweb.freebsd.org/changeset/base/245171 Log: Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT". Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255. Obtained from:Juniper Networks Added: head/tools/build/options/WITHOUT_LZMA_SUPPORT - copied, changed from r245170, head/tools/build/options/WITHOUT_BZIP2_SUPPORT Modified: head/tools/build/make_check/Makefile head/usr.bin/grep/Makefile head/usr.bin/grep/file.c Modified: head/tools/build/make_check/Makefile == --- head/tools/build/make_check/MakefileTue Jan 8 17:42:03 2013 (r245170) +++ head/tools/build/make_check/MakefileTue Jan 8 18:37:12 2013 (r245171) @@ -24,7 +24,7 @@ SMAKE=MAKEFLAGS= ${MAKE} -C ${.CURDIR} all: @echo '1..16' - @${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; } + @${SMAKE} C_check || { ${MAKE} -C ${.CURDIR} failure ; } @echo "ok 1 - C_check # Test of -C flag existence detected no regression." @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ diff -u ${.CURDIR}/regress.variables.out - || \ Copied and modified: head/tools/build/options/WITHOUT_LZMA_SUPPORT (from r245170, head/tools/build/options/WITHOUT_BZIP2_SUPPORT) == --- head/tools/build/options/WITHOUT_BZIP2_SUPPORT Tue Jan 8 17:42:03 2013(r245170, copy source) +++ head/tools/build/options/WITHOUT_LZMA_SUPPORT Tue Jan 8 18:37:12 2013(r245171) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to build some programs without optional bzip2 support. +Set to build some programs without optional lzma compression support. Modified: head/usr.bin/grep/Makefile == --- head/usr.bin/grep/Makefile Tue Jan 8 17:42:03 2013(r245170) +++ head/usr.bin/grep/Makefile Tue Jan 8 18:37:12 2013(r245171) @@ -40,17 +40,24 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif +LDADD= -lz +DPADD= ${LIBZ} + +.if !defined(WITHOUT_LZMA_SUPPORT) +LDADD+=-llzma +DPADD+=${LIBLZMA} + LINKS+=${BINDIR}/${PROG} ${BINDIR}/xzgrep \ ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ ${BINDIR}/${PROG} ${BINDIR}/lzfgrep +.else +CFLAGS+= -DWITHOUT_LZMA +.endif -LDADD= -lz -llzma -DPADD= ${LIBZ} ${LIBLZMA} - -.if !defined(WITHOUT_BZIP2) +.if !defined(WITHOUT_BZIP2_SUPPORT) LDADD+=-lbz2 DPADD+=${LIBBZ2} Modified: head/usr.bin/grep/file.c == --- head/usr.bin/grep/file.cTue Jan 8 17:42:03 2013(r245170) +++ head/usr.bin/grep/file.cTue Jan 8 18:37:12 2013(r245171) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -50,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_LZMA +#include +#endif + #ifndef WITHOUT_BZIP2 #include #endif @@ -60,7 +63,9 @@ __FBSDID("$FreeBSD$"); #defineLNBUFBUMP 80 static gzFile gzbufdesc; +#ifndef WITHOUT_LZMA static lzma_stream lstrm = LZMA_STREAM_INIT; +#endif #ifndef WITHOUT_BZIP2 static BZFILE* bzbufdesc; #endif @@ -116,6 +121,7 @@ grep_refill(struct file *f) nr = -1; } #endif +#ifndef WITHOUT_LZMA } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { lzma_action action = LZMA_RUN; uint8_t in_buf[MAXBUFSIZ]; @@ -146,6 +152,7 @@ grep_refill(struct file *f) return (-1); bufrem = MAXBUFSIZ - lstrm.avail_out; return (0); +#endif /* WIHTOUT_LZMA */ } else nr = read(f->fd, buffer, MAXBUFSIZ); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r242949 - head/sys/conf
Author: obrien Date: Tue Nov 13 06:07:13 2012 New Revision: 242949 URL: http://svnweb.freebsd.org/changeset/base/242949 Log: Be more consistent. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Tue Nov 13 06:03:43 2012(r242948) +++ head/sys/conf/files Tue Nov 13 06:07:13 2012(r242949) @@ -270,10 +270,10 @@ cddl/contrib/opensolaris/uts/common/zmod cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" -compat/freebsd32/freebsd32_ioctl.c optionalcompat_freebsd32 -compat/freebsd32/freebsd32_misc.c optionalcompat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optionalcompat_freebsd32 -compat/freebsd32/freebsd32_sysent.coptionalcompat_freebsd32 +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.coptional compat_freebsd32 contrib/altq/altq/altq_cbq.c optional altq contrib/altq/altq/altq_cdnr.c optional altq contrib/altq/altq/altq_hfsc.c optional altq @@ -462,12 +462,12 @@ contrib/ipfilter/netinet/ip_sync.c optio compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" -contrib/libfdt/fdt.c optionalfdt -contrib/libfdt/fdt_ro.coptionalfdt -contrib/libfdt/fdt_rw.coptionalfdt -contrib/libfdt/fdt_strerror.c optionalfdt -contrib/libfdt/fdt_sw.coptionalfdt -contrib/libfdt/fdt_wip.c optionalfdt +contrib/libfdt/fdt.c optional fdt +contrib/libfdt/fdt_ro.coptional fdt +contrib/libfdt/fdt_rw.coptional fdt +contrib/libfdt/fdt_strerror.c optional fdt +contrib/libfdt/fdt_sw.coptional fdt +contrib/libfdt/fdt_wip.c optional fdt contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ @@ -512,10 +512,10 @@ contrib/ngatm/netnatm/sig/sig_unimsgcpy. compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" -crypto/blowfish/bf_ecb.c optional ipsec -crypto/blowfish/bf_skey.c optional crypto | ipsec -crypto/camellia/camellia.c optional crypto | ipsec -crypto/camellia/camellia-api.c optional crypto | ipsec +crypto/blowfish/bf_ecb.c optional ipsec +crypto/blowfish/bf_skey.c optional crypto | ipsec +crypto/camellia/camellia.c optional crypto | ipsec +crypto/camellia/camellia-api.c optional crypto | ipsec crypto/des/des_ecb.c optional crypto | ipsec crypto/des/des_setkey.coptional crypto | ipsec crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi @@ -527,26 +527,26 @@ crypto/sha1.c optional carp | crypto | netgraph_mppc_encryption | sctp crypto/sha2/sha2.c optional crypto | geom_bde | ipsec | random | \ sctp | zfs -ddb/db_access.coptionalddb -ddb/db_break.c optionalddb -ddb/db_capture.c optionalddb -ddb/db_command.c optionalddb -ddb/db_examine.c optionalddb -ddb/db_expr.c optionalddb -ddb/db_input.c optionalddb -ddb/db_lex.c optionalddb -ddb/db_main.c optionalddb -ddb/db_output.coptionalddb -ddb/db_print.c optionalddb -ddb/db_ps.coptionalddb -ddb/db_run.c optionalddb -ddb/db_script.coptionalddb -ddb/db_sym.c optionalddb -ddb/db_thread.coptionalddb -ddb/db_textdump.c optionalddb -ddb/db_variables.c optionalddb -ddb/db_watch.c optionalddb -ddb/db_write_cmd.c optionalddb +ddb/db_access.coptional ddb +ddb/db_break.c optional ddb +ddb/db_capture.c optiona
svn commit: r242944 - head/sys/conf
Author: obrien Date: Tue Nov 13 03:09:26 2012 New Revision: 242944 URL: http://svnweb.freebsd.org/changeset/base/242944 Log: Garbage collect the explicit "compile-with", they are no longer needed. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Tue Nov 13 03:05:28 2012(r242943) +++ head/sys/conf/files Tue Nov 13 03:09:26 2012(r242944) @@ -274,20 +274,14 @@ compat/freebsd32/freebsd32_ioctl.coptio compat/freebsd32/freebsd32_misc.c optionalcompat_freebsd32 compat/freebsd32/freebsd32_syscalls.c optionalcompat_freebsd32 compat/freebsd32/freebsd32_sysent.coptionalcompat_freebsd32 -contrib/altq/altq/altq_cbq.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_cdnr.c optional altq -contrib/altq/altq/altq_hfsc.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_priq.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_red.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_rio.c optional altq \ - compile-with "${NORMAL_C}" -contrib/altq/altq/altq_rmclass.c optional altq -contrib/altq/altq/altq_subr.c optional altq \ - compile-with "${NORMAL_C}" +contrib/altq/altq/altq_cbq.c optional altq +contrib/altq/altq/altq_cdnr.c optional altq +contrib/altq/altq/altq_hfsc.c optional altq +contrib/altq/altq/altq_priq.c optional altq +contrib/altq/altq/altq_red.c optional altq +contrib/altq/altq/altq_rio.c optional altq +contrib/altq/altq/altq_rmclass.c optional altq +contrib/altq/altq/altq_subr.c optional altq contrib/dev/acpica/components/debugger/dbcmds.coptional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.coptional acpi acpi_debug ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r242938 - head/sys/netinet6
Author: obrien Date: Tue Nov 13 01:48:00 2012 New Revision: 242938 URL: http://svnweb.freebsd.org/changeset/base/242938 Log: Use consistent style. Modified: head/sys/netinet6/in6_src.c Modified: head/sys/netinet6/in6_src.c == --- head/sys/netinet6/in6_src.c Tue Nov 13 01:46:56 2012(r242937) +++ head/sys/netinet6/in6_src.c Tue Nov 13 01:48:00 2012(r242938) @@ -140,7 +140,7 @@ static void init_policy_queue(void); static int add_addrsel_policyent(struct in6_addrpolicy *); static int delete_addrsel_policyent(struct in6_addrpolicy *); static int walk_addrsel_policy(int (*)(struct in6_addrpolicy *, void *), - void *); + void *); static int dump_addrsel_policyent(struct in6_addrpolicy *, void *); static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); @@ -1103,8 +1103,7 @@ delete_addrsel_policyent(struct in6_addr } static int -walk_addrsel_policy(int (*callback)(struct in6_addrpolicy *, void *), -void *w) +walk_addrsel_policy(int (*callback)(struct in6_addrpolicy *, void *), void *w) { struct addrsel_policyent *pol; int error = 0; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r242158 - head/sys/dev/filemon
Author: obrien Date: Fri Oct 26 20:24:13 2012 New Revision: 242158 URL: http://svn.freebsd.org/changeset/base/242158 Log: A little bit easier to read. Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c == --- head/sys/dev/filemon/filemon.c Fri Oct 26 20:14:40 2012 (r242157) +++ head/sys/dev/filemon/filemon.c Fri Oct 26 20:24:13 2012 (r242158) @@ -136,6 +136,12 @@ filemon_dtr(void *data) } } +#if __FreeBSD_version < 900041 +#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) +#else +#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) +#endif + static int filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused, struct thread *td) @@ -148,11 +154,6 @@ filemon_ioctl(struct cdev *dev, u_long c switch (cmd) { /* Set the output file descriptor. */ case FILEMON_SET_FD: -#if __FreeBSD_version < 900041 -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) -#else -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) -#endif if ((error = FGET_WRITE(td, *(int *)data, &filemon->fp)) == 0) /* Write the file header. */ filemon_comment(filemon); @@ -160,7 +161,7 @@ filemon_ioctl(struct cdev *dev, u_long c /* Set the monitored process ID. */ case FILEMON_SET_PID: - filemon->pid = *((pid_t *) data); + filemon->pid = *((pid_t *)data); break; default: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r242157 - head/tools/regression/filemon
Author: obrien Date: Fri Oct 26 20:14:40 2012 New Revision: 242157 URL: http://svn.freebsd.org/changeset/base/242157 Log: Test both active and non-active cases. Modified: head/tools/regression/filemon/Makefile Modified: head/tools/regression/filemon/Makefile == --- head/tools/regression/filemon/Makefile Fri Oct 26 20:03:08 2012 (r242156) +++ head/tools/regression/filemon/Makefile Fri Oct 26 20:14:40 2012 (r242157) @@ -21,7 +21,11 @@ CLEANFILES+= ${BINS} tests: bins kldstat | grep filemon ${MAKE} test + @echo "Without filemon(4) active:" ./timed-forkb + @echo "With filemon(4) active:" + script -f typescript-timed-forkb ./timed-forkb + ls -l typescript-timed-forkb.filemon @echo "filemon(4) tests passed." # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . @@ -40,7 +44,11 @@ test: filemontest clean-test grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp format OK" .endfor +CLEANFILES+= typescript-timed-forkb typescript-timed-forkb.filemon + clean-test: cd ${.CURDIR} ; rm -f filemon_log.* +clean-tests: clean-test + .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r242138 - head/usr.bin/script
Author: obrien Date: Fri Oct 26 15:56:28 2012 New Revision: 242138 URL: http://svn.freebsd.org/changeset/base/242138 Log: Add "-f" to also output filemon(4) information. Modified: head/usr.bin/script/script.1 head/usr.bin/script/script.c Modified: head/usr.bin/script/script.1 == --- head/usr.bin/script/script.1Fri Oct 26 15:44:29 2012 (r242137) +++ head/usr.bin/script/script.1Fri Oct 26 15:56:28 2012 (r242138) @@ -28,7 +28,7 @@ .\"@(#)script.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 30, 2012 +.Dd Oct 27, 2012 .Dt SCRIPT 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd make typescript of terminal session .Sh SYNOPSIS .Nm -.Op Fl adkpqr +.Op Fl adfkpqr .Op Fl t Ar time .Op Ar file Op Ar command ... .Sh DESCRIPTION @@ -76,6 +76,13 @@ retaining the prior contents. When playing back a session with the .Fl p flag, do not sleep between records when playing back a timestamped session. +.It Fl f +Create +.Ar file.filemon +or +.Pa typescript.filemon +using +.Xr filemon 4 . .It Fl k Log keys sent to the program as well as output. .It Fl p @@ -151,6 +158,7 @@ is assumed. .El .Sh SEE ALSO .Xr csh 1 +.Xr filemon 4 .Po for the .Em history Modified: head/usr.bin/script/script.c == --- head/usr.bin/script/script.cFri Oct 26 15:44:29 2012 (r242137) +++ head/usr.bin/script/script.cFri Oct 26 15:56:28 2012 (r242138) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2010, 2012 David E. O'Brien * Copyright (c) 1980, 1992, 1993 * The Regents of the University of California. All rights reserved. * @@ -44,6 +45,7 @@ static const char sccsid[] = "@(#)script #include #include #include +#include #include #include @@ -70,7 +72,8 @@ static FILE *fscript; static int master, slave; static int child; static const char *fname; -static int qflg, ttyflg; +static char *fmfname; +static int fflg, qflg, ttyflg; static int usesleep, rawout; static struct termios tt; @@ -90,21 +93,23 @@ main(int argc, char *argv[]) int cc; struct termios rtt, stt; struct winsize win; - int aflg, kflg, pflg, ch, n; struct timeval tv, *tvp; time_t tvec, start; char obuf[BUFSIZ]; char ibuf[BUFSIZ]; fd_set rfd; - int flushtime = 30; - int readstdin; - int k; + int aflg, kflg, pflg, ch, k, n; + int flushtime, readstdin; + int fm_fd, fm_log; aflg = kflg = pflg = 0; usesleep = 1; rawout = 0; + flushtime = 30; + fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC + warning. (not needed w/clang) */ - while ((ch = getopt(argc, argv, "adkpqrt:")) != -1) + while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1) switch(ch) { case 'a': aflg = 1; @@ -112,6 +117,9 @@ main(int argc, char *argv[]) case 'd': usesleep = 0; break; + case 'f': + fflg = 1; + break; case 'k': kflg = 1; break; @@ -146,6 +154,23 @@ main(int argc, char *argv[]) if ((fscript = fopen(fname, pflg ? "r" : aflg ? "a" : "w")) == NULL) err(1, "%s", fname); + if (fflg) { + asprintf(&fmfname, "%s.filemon", fname); + if (!fmfname) + err(1, "%s.filemon", fname); + if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) + err(1, "open(\"/dev/filemon\", O_RDWR)"); + if ((fm_log = open(fmfname, O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) + err(1, "open(%s)", fmfname); + if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) < 0) + err(1, "Cannot set filemon log file descriptor"); + + /* Set up these two fd's to close on exec. */ + (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); + (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); + } + if (pflg) playback(fscript); @@ -169,7 +194,7 @@ main(int argc, char *argv[]) (void)printf("Script started, output file is %s\n", fname); if (!rawout) { (void)fprintf(fscript, "Script started on %s", - ctime(&tvec
svn commit: r242137 - in head: sys/dev/filemon tools/regression/filemon
Author: obrien Date: Fri Oct 26 15:44:29 2012 New Revision: 242137 URL: http://svn.freebsd.org/changeset/base/242137 Log: Iterate rather than use recursion. We can blow out the kernel stack if there is a long chain of fork(2)s. Added: head/tools/regression/filemon/timed-forkb.c (contents, props changed) Modified: head/sys/dev/filemon/filemon_wrapper.c head/tools/regression/filemon/Makefile Modified: head/sys/dev/filemon/filemon_wrapper.c == --- head/sys/dev/filemon/filemon_wrapper.c Fri Oct 26 15:21:23 2012 (r242136) +++ head/sys/dev/filemon/filemon_wrapper.c Fri Oct 26 15:44:29 2012 (r242137) @@ -82,15 +82,14 @@ filemon_pid_check(struct proc *p) { struct filemon *filemon; - TAILQ_FOREACH(filemon, &filemons_inuse, link) { - if (p->p_pid == filemon->pid) - return (filemon); + while (p->p_pptr) { + TAILQ_FOREACH(filemon, &filemons_inuse, link) { + if (p->p_pid == filemon->pid) + return (filemon); + } + p = p->p_pptr; } - - if (p->p_pptr == NULL) - return (NULL); - - return (filemon_pid_check(p->p_pptr)); + return (NULL); } static void Modified: head/tools/regression/filemon/Makefile == --- head/tools/regression/filemon/Makefile Fri Oct 26 15:21:23 2012 (r242136) +++ head/tools/regression/filemon/Makefile Fri Oct 26 15:44:29 2012 (r242137) @@ -1,15 +1,33 @@ # $FreeBSD$ -PROG= filemontest +BINS= \ + filemontest \ + timed-forkb + +bins: filemontest timed-forkb +all: bins NO_MAN= WARNS?=6 CFLAGS+= -I${.CURDIR}/../../../sys +# Should be "WITHOUT_CTF=" below, but stupid infastrurture fails: +# "/usr/share/mk/bsd.own.mk", line 489: WITH_CTF and WITHOUT_CTF can't both be set. +WITHOUT_CDDL= + +CLEANFILES+= ${BINS} + +tests: bins + kldstat | grep filemon + ${MAKE} test + ./timed-forkb + @echo "filemon(4) tests passed." + # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . -test: ${PROG} clean-test -.for BIN in ${PROG} ${PROG}32 +#FILEMONTEST32=filemontest32 +test: filemontest clean-test +.for BIN in filemontest ${FILEMONTEST32} cd ${.CURDIR} ; \ for A in 1 2 3 4 5 6 7 8 9 0; do \ for B in 1 2 3 4 5 6 7 8 9 0; do \ Added: head/tools/regression/filemon/timed-forkb.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/filemon/timed-forkb.c Fri Oct 26 15:44:29 2012 (r242137) @@ -0,0 +1,177 @@ +/*- + * Copyright (c) 2012 David O'Brien + * 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. + * + * 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. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SLEEP +#defineSLEEP 20 /* seconds */ +#endif + +int verbose; + +static void +usage(void) +{ + fprintf(stderr, "usage: %s\n", getprogname()); + fprintf(stderr, "\t\t-n : length of fork(2) chain\n"); + fprintf(stderr, "\t\t-t : limit run-time seconds\n"); + exit(1); + /* NOTREACHED */ +} + +void term(int); +void +term(int signum) +{ + + if (getpid() == getpgrp() || verbose) { + fprintf(stderr, + "pid %d pgroup %d (ppid %d): Received SIGTERM(%d), exiting...\n", +
svn commit: r242088 - head/sys/dev/filemon
Author: obrien Date: Thu Oct 25 18:39:09 2012 New Revision: 242088 URL: http://svn.freebsd.org/changeset/base/242088 Log: Desupport pre-FreeBSD 7.1. Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c == --- head/sys/dev/filemon/filemon.c Thu Oct 25 18:11:04 2012 (r242087) +++ head/sys/dev/filemon/filemon.c Thu Oct 25 18:39:09 2012 (r242088) @@ -103,47 +103,11 @@ static struct cv access_cv; static struct thread *access_owner = NULL; static struct thread *access_requester = NULL; -#if __FreeBSD_version < 701000 -static struct clonedevs *filemon_clones; -static eventhandler_tageh_tag; -#else static struct cdev *filemon_dev; -#endif #include "filemon_lock.c" #include "filemon_wrapper.c" -#if __FreeBSD_version < 701000 -static void -filemon_clone(void *arg, struct ucred *cred, char *name, int namelen, -struct cdev **dev) -{ - int u = -1; - size_t len; - - if (*dev != NULL) - return; - - len = strlen(name); - - if (len != 7) - return; - - if (bcmp(name,"filemon", 7) != 0) - return; - - /* Clone the device to the new minor number. */ - if (clone_create(&filemon_clones, &filemon_cdevsw, &u, dev, 0) != 0) - /* Create the /dev/filemonNN entry. */ - *dev = make_dev_cred(&filemon_cdevsw, u, cred, UID_ROOT, - GID_WHEEL, 0666, "filemon%d", u); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } -} -#endif - static void filemon_dtr(void *data) { @@ -179,11 +143,7 @@ filemon_ioctl(struct cdev *dev, u_long c int error = 0; struct filemon *filemon; -#if __FreeBSD_version < 701000 - filemon = dev->si_drv1; -#else devfs_get_cdevpriv((void **) &filemon); -#endif switch (cmd) { /* Set the output file descriptor. */ @@ -238,11 +198,7 @@ filemon_open(struct cdev *dev, int oflag filemon->pid = curproc->p_pid; -#if __FreeBSD_version < 701000 - dev->si_drv1 = filemon; -#else devfs_set_cdevpriv(filemon, filemon_dtr); -#endif /* Get exclusive write access. */ filemon_lock_write(); @@ -260,14 +216,6 @@ static int filemon_close(struct cdev *dev __unused, int flag __unused, int fmt __unused, struct thread *td __unused) { -#if __FreeBSD_version < 701000 - filemon_dtr(dev->si_drv1); - - dev->si_drv1 = NULL; - - /* Schedule this cloned device to be destroyed. */ - destroy_dev_sched(dev); -#endif return (0); } @@ -281,16 +229,8 @@ filemon_load(void *dummy __unused) /* Install the syscall wrappers. */ filemon_wrapper_install(); -#if __FreeBSD_version < 701000 - /* Enable device cloning. */ - clone_setup(&filemon_clones); - - /* Setup device cloning events. */ - eh_tag = EVENTHANDLER_REGISTER(dev_clone, filemon_clone, 0, 1000); -#else filemon_dev = make_dev(&filemon_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "filemon"); -#endif } static int @@ -305,9 +245,7 @@ filemon_unload(void) if (TAILQ_FIRST(&filemons_inuse) != NULL) error = EBUSY; else { -#if __FreeBSD_version >= 701000 destroy_dev(filemon_dev); -#endif /* Deinstall the syscall wrappers. */ filemon_wrapper_deinstall(); @@ -317,19 +255,6 @@ filemon_unload(void) filemon_unlock_write(); if (error == 0) { -#if __FreeBSD_version < 701000 - /* -* Check if there is still an event handler callback registered. - */ - if (eh_tag != 0) { - /* De-register the device cloning event handler. */ - EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); - eh_tag = 0; - - /* Stop device cloning. */ - clone_cleanup(&filemon_clones); - } -#endif /* free() filemon structs free list. */ filemon_lock_write(); while ((filemon = TAILQ_FIRST(&filemons_free)) != NULL) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241972 - head/usr.bin/script
Author: obrien Date: Tue Oct 23 23:36:29 2012 New Revision: 241972 URL: http://svn.freebsd.org/changeset/base/241972 Log: Don't include both & . Modified: head/usr.bin/script/script.c Modified: head/usr.bin/script/script.c == --- head/usr.bin/script/script.cTue Oct 23 23:13:44 2012 (r241971) +++ head/usr.bin/script/script.cTue Oct 23 23:36:29 2012 (r241972) @@ -27,28 +27,23 @@ * SUCH DAMAGE. */ -#include - +#include __FBSDID("$FreeBSD$"); - #ifndef lint static const char copyright[] = "@(#) Copyright (c) 1980, 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif - #ifndef lint static const char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #endif -#include #include #include #include #include #include #include -#include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241612 - head/usr.bin/bmake
Author: obrien Date: Tue Oct 16 15:43:16 2012 New Revision: 241612 URL: http://svn.freebsd.org/changeset/base/241612 Log: Obey the value of "MK_BMAKE". Modified: head/usr.bin/bmake/Makefile.inc Modified: head/usr.bin/bmake/Makefile.inc == --- head/usr.bin/bmake/Makefile.inc Tue Oct 16 15:25:04 2012 (r241611) +++ head/usr.bin/bmake/Makefile.inc Tue Oct 16 15:43:16 2012 (r241612) @@ -7,7 +7,7 @@ .export SRCTOP .endif -.if defined(MK_BMAKE) +.if ${MK_BMAKE} != "no" PROG= make .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241351 - head/sys/modules
Author: obrien Date: Mon Oct 8 14:08:13 2012 New Revision: 241351 URL: http://svn.freebsd.org/changeset/base/241351 Log: Restrict the module to varied environments. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Mon Oct 8 14:05:00 2012(r241350) +++ head/sys/modules/Makefile Mon Oct 8 14:08:13 2012(r241351) @@ -108,7 +108,7 @@ SUBDIR= \ fdc \ fdescfs \ ${_fe} \ - filemon \ + ${_filemon} \ firewire \ firmware \ ${_fxp} \ @@ -364,6 +364,10 @@ SUBDIR=\ ${_zfs} \ zlib \ +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_filemon= filemon +.endif + .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" _syscons= syscons ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240708 - head/share/man/man4
Author: obrien Date: Wed Sep 19 20:42:55 2012 New Revision: 240708 URL: http://svn.freebsd.org/changeset/base/240708 Log: Add Intel RdRand. Modified: head/share/man/man4/random.4 Modified: head/share/man/man4/random.4 == --- head/share/man/man4/random.4Wed Sep 19 20:11:47 2012 (r240707) +++ head/share/man/man4/random.4Wed Sep 19 20:42:55 2012 (r240708) @@ -315,11 +315,16 @@ and is an implementation of the .Em Yarrow algorithm by Bruce Schneier, .Em et al . -The only hardware implementation -currently is for the +The only hardware implementations +currently are for the .Tn VIA C3 Nehemiah (stepping 3 or greater) -CPU. +CPU +and the +.Tn Intel +.Dq Bull Mountain +.Em RdRand +instruction and underlying random number generator (RNG). More will be added in the future. .Pp The author gratefully acknowledges ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240622 - head/usr.bin/yes
Author: obrien Date: Mon Sep 17 23:04:15 2012 New Revision: 240622 URL: http://svn.freebsd.org/changeset/base/240622 Log: yes(1) actually comes from V7. Submitted by: Simon Gerraty Modified: head/usr.bin/yes/yes.1 Modified: head/usr.bin/yes/yes.1 == --- head/usr.bin/yes/yes.1 Mon Sep 17 21:41:38 2012(r240621) +++ head/usr.bin/yes/yes.1 Mon Sep 17 23:04:15 2012(r240622) @@ -49,4 +49,4 @@ forever. The .Nm command appeared in -.At 32v . +.At v7 . ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240406 - head/sbin/fsck_ffs
Author: obrien Date: Wed Sep 12 15:36:44 2012 New Revision: 240406 URL: http://svn.freebsd.org/changeset/base/240406 Log: Remove needless (int) casts of write(2)'s 3rd argument. Also change blwrite() 'size' parameter to a ssize_t to better match write(2). Modified: head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/fsutil.c Modified: head/sbin/fsck_ffs/fsck.h == --- head/sbin/fsck_ffs/fsck.h Wed Sep 12 14:59:57 2012(r240405) +++ head/sbin/fsck_ffs/fsck.h Wed Sep 12 15:36:44 2012(r240406) @@ -337,7 +337,7 @@ voidblkerror(ino_t ino, const char *ty char *blockcheck(char *name); intblread(int fd, char *buf, ufs2_daddr_t blk, long size); void bufinit(void); -void blwrite(int fd, char *buf, ufs2_daddr_t blk, long size); +void blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t size); void blerase(int fd, ufs2_daddr_t blk, long size); void cacheino(union dinode *dp, ino_t inumber); void catch(int); Modified: head/sbin/fsck_ffs/fsutil.c == --- head/sbin/fsck_ffs/fsutil.c Wed Sep 12 14:59:57 2012(r240405) +++ head/sbin/fsck_ffs/fsutil.c Wed Sep 12 15:36:44 2012(r240406) @@ -245,7 +245,7 @@ flush(int fd, struct bufarea *bp) (bp->b_errs == bp->b_size / dev_bsize) ? "" : "PARTIALLY ", (long long)bp->b_bno); bp->b_errs = 0; - blwrite(fd, bp->b_un.b_buf, bp->b_bno, (long)bp->b_size); + blwrite(fd, bp->b_un.b_buf, bp->b_bno, bp->b_size); if (bp != &sblk) return; for (i = 0, j = 0; i < sblock.fs_cssize; i += sblock.fs_bsize, j++) { @@ -392,7 +392,7 @@ blread(int fd, char *buf, ufs2_daddr_t b } void -blwrite(int fd, char *buf, ufs2_daddr_t blk, long size) +blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t size) { int i; char *cp; @@ -404,7 +404,7 @@ blwrite(int fd, char *buf, ufs2_daddr_t offset *= dev_bsize; if (lseek(fd, offset, 0) < 0) rwerror("SEEK BLK", blk); - else if (write(fd, buf, (int)size) == size) { + else if (write(fd, buf, size) == size) { fsmodified = 1; return; } @@ -414,7 +414,7 @@ blwrite(int fd, char *buf, ufs2_daddr_t rwerror("SEEK BLK", blk); printf("THE FOLLOWING SECTORS COULD NOT BE WRITTEN:"); for (cp = buf, i = 0; i < size; i += dev_bsize, cp += dev_bsize) - if (write(fd, cp, (int)dev_bsize) != dev_bsize) { + if (write(fd, cp, dev_bsize) != dev_bsize) { (void)lseek(fd, offset + i + dev_bsize, 0); printf(" %jd,", (intmax_t)blk + i / dev_bsize); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240405 - head/sbin/fsck_ffs
Author: obrien Date: Wed Sep 12 14:59:57 2012 New Revision: 240405 URL: http://svn.freebsd.org/changeset/base/240405 Log: Simply printf-like strings and outdent strings so that it is easy to see if they fit on a standard terminal. Modified: head/sbin/fsck_ffs/main.c Modified: head/sbin/fsck_ffs/main.c == --- head/sbin/fsck_ffs/main.c Wed Sep 12 14:58:07 2012(r240404) +++ head/sbin/fsck_ffs/main.c Wed Sep 12 14:59:57 2012(r240405) @@ -279,8 +279,8 @@ checkfilesys(char *filesys) exit(0); exit(4); } else { - pfatal("UNEXPECTED INCONSISTENCY, %s\n", - "CANNOT RUN FAST FSCK\n"); + pfatal( + "UNEXPECTED INCONSISTENCY, CANNOT RUN FAST FSCK\n"); } } } @@ -297,8 +297,8 @@ checkfilesys(char *filesys) pfatal("NOT MOUNTED, CANNOT RUN IN BACKGROUND\n"); } else if ((mntp->f_flags & MNT_SOFTDEP) == 0) { bkgrdflag = 0; - pfatal("NOT USING SOFT UPDATES, %s\n", - "CANNOT RUN IN BACKGROUND"); + pfatal( + "NOT USING SOFT UPDATES, CANNOT RUN IN BACKGROUND\n"); } else if ((mntp->f_flags & MNT_RDONLY) != 0) { bkgrdflag = 0; pfatal("MOUNTED READ-ONLY, CANNOT RUN IN BACKGROUND\n"); @@ -306,8 +306,8 @@ checkfilesys(char *filesys) if (readsb(0) != 0) { if (sblock.fs_flags & (FS_NEEDSFSCK | FS_SUJ)) { bkgrdflag = 0; - pfatal("UNEXPECTED INCONSISTENCY, %s\n", - "CANNOT RUN IN BACKGROUND\n"); + pfatal( + "UNEXPECTED INCONSISTENCY, CANNOT RUN IN BACKGROUND\n"); } if ((sblock.fs_flags & FS_UNCLEAN) == 0 && skipclean && ckclean) { @@ -315,8 +315,8 @@ checkfilesys(char *filesys) * file system is clean; * skip snapshot and report it clean */ - pwarn("FILE SYSTEM CLEAN; %s\n", - "SKIPPING CHECKS"); + pwarn( + "FILE SYSTEM CLEAN; SKIPPING CHECKS\n"); goto clean; } } @@ -328,24 +328,23 @@ checkfilesys(char *filesys) if (stat(snapname, &snapdir) < 0) { if (errno != ENOENT) { bkgrdflag = 0; - pfatal("CANNOT FIND %s %s: %s, %s\n", - "SNAPSHOT DIRECTORY", - snapname, strerror(errno), - "CANNOT RUN IN BACKGROUND"); + pfatal( + "CANNOT FIND SNAPSHOT DIRECTORY %s: %s, CANNOT RUN IN BACKGROUND\n", + snapname, strerror(errno)); } else if ((grp = getgrnam("operator")) == 0 || mkdir(snapname, 0770) < 0 || chown(snapname, -1, grp->gr_gid) < 0 || chmod(snapname, 0770) < 0) { bkgrdflag = 0; - pfatal("CANNOT CREATE %s %s: %s, %s\n", - "SNAPSHOT DIRECTORY", - snapname, strerror(errno), - "CANNOT RUN IN BACKGROUND"); + pfatal( + "CANNOT CREATE SNAPSHOT DIRECTORY %s: %s, CANNOT RUN IN BACKGROUND\n", + snapname, strerror(errno)); } } else if (!S_ISDIR(snapdir.st_mode)) { bkgrdflag = 0; - pfatal("%s IS NOT A DIRECTORY, %s\n", snapname, - "CANNOT RUN IN BACKGROUND"); + pfatal( + "%s IS NOT A DIRECTORY, CANNOT RUN IN BACKGROUND\n", + snapname); } }
svn commit: r240404 - in head: share/mk usr.bin
Author: obrien Date: Wed Sep 12 14:58:07 2012 New Revision: 240404 URL: http://svn.freebsd.org/changeset/base/240404 Log: Add MK_KDUMP. Modified: head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkWed Sep 12 14:44:25 2012(r240403) +++ head/share/mk/bsd.own.mkWed Sep 12 14:58:07 2012(r240404) @@ -254,6 +254,7 @@ WITHOUT_${var}= INFO \ IPFILTER \ IPX \ +KDUMP \ KERBEROS \ LIB32 \ LIBPTHREAD \ @@ -357,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \ IPFW \ IPX \ JAIL \ +KDUMP \ KERBEROS \ KERNEL_SYMBOLS \ KVM \ Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Wed Sep 12 14:44:25 2012(r240403) +++ head/usr.bin/Makefile Wed Sep 12 14:58:07 2012(r240404) @@ -68,7 +68,7 @@ SUBDIR= alias \ ipcs \ join \ jot \ - kdump \ + ${_kdump} \ keylogin \ keylogout \ killall \ @@ -163,7 +163,7 @@ SUBDIR= alias \ tr \ true \ truncate \ - truss \ + ${_truss} \ tset \ tsort \ tty \ @@ -245,6 +245,11 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif +.if ${MK_KDUMP} != "no" +SUBDIR+=kdump +SUBDIR+=truss +.endif + .if ${MK_KERBEROS_SUPPORT} != "no" SUBDIR+= compile_et .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240403 - head
Author: obrien Date: Wed Sep 12 14:44:25 2012 New Revision: 240403 URL: http://svn.freebsd.org/changeset/base/240403 Log: Not all Pmake derivatives silently handle empty shell output, so ensure there is something for make(1) to consume. Bmake gives output such as: "warning: Couldn't read shell's output for "/bin/sh -c true" Note we parted from traditional Pmake behavior in r18864 / r18255. Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile == --- head/Makefile Wed Sep 12 14:19:40 2012(r240402) +++ head/Makefile Wed Sep 12 14:44:25 2012(r240403) @@ -216,7 +216,7 @@ ${TGTS}: .MAIN: all STARTTIME!= LC_ALL=C date -CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s +CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo .if !empty(CHECK_TIME) .error check your date/time: ${STARTTIME} .endif Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Sep 12 14:19:40 2012(r240402) +++ head/Makefile.inc1 Wed Sep 12 14:44:25 2012(r240403) @@ -1558,7 +1558,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} + ${KERNCONFDIR}/${KERNCONF} ; echo .endif .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240402 - head/sys/conf
Author: obrien Date: Wed Sep 12 14:19:40 2012 New Revision: 240402 URL: http://svn.freebsd.org/changeset/base/240402 Log: Remove duplication and centralize testing of various config(8)ed features. Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.powerpc head/sys/conf/kern.pre.mk Modified: head/sys/conf/Makefile.amd64 == --- head/sys/conf/Makefile.amd64Wed Sep 12 14:17:11 2012 (r240401) +++ head/sys/conf/Makefile.amd64Wed Sep 12 14:19:40 2012 (r240402) @@ -31,9 +31,6 @@ S=../../.. .endif .include "$S/conf/kern.pre.mk" -DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo -DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo -HWPMC_ENABLED!=grep HWPMC opt_hwpmc_hooks.h || true ; echo .if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif Modified: head/sys/conf/Makefile.arm == --- head/sys/conf/Makefile.arm Wed Sep 12 14:17:11 2012(r240401) +++ head/sys/conf/Makefile.arm Wed Sep 12 14:19:40 2012(r240402) @@ -39,8 +39,6 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri STRIP_FLAGS = -S .endif -DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo - .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame .endif Modified: head/sys/conf/Makefile.powerpc == --- head/sys/conf/Makefile.powerpc Wed Sep 12 14:17:11 2012 (r240401) +++ head/sys/conf/Makefile.powerpc Wed Sep 12 14:19:40 2012 (r240402) @@ -37,7 +37,6 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -msoft-float -Wa,-many -DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo .if !empty(DDB_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Wed Sep 12 14:17:11 2012(r240401) +++ head/sys/conf/kern.pre.mk Wed Sep 12 14:19:40 2012(r240402) @@ -189,3 +189,8 @@ MKMODULESENV+= WITHOUT_MODULES="${WITHOU .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif + +# Are various things configured? +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo +DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo +HWPMC_ENABLED!=grep HWPMC opt_hwpmc_hooks.h || true ; echo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240401 - head/sys/conf
Author: obrien Date: Wed Sep 12 14:17:11 2012 New Revision: 240401 URL: http://svn.freebsd.org/changeset/base/240401 Log: Not all Pmake derived makes quietly tolerate assignment from shell commands with no output. Add "echo" at the end these shell commands whose output is assigned to a variable's value to ensure there is some output. Submitted by: John Van Horne Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.powerpc Modified: head/sys/conf/Makefile.amd64 == --- head/sys/conf/Makefile.amd64Wed Sep 12 13:58:18 2012 (r240400) +++ head/sys/conf/Makefile.amd64Wed Sep 12 14:17:11 2012 (r240401) @@ -31,9 +31,9 @@ S=../../.. .endif .include "$S/conf/kern.pre.mk" -DDB_ENABLED!= grep DDB opt_ddb.h || true -DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true -HWPMC_ENABLED!=grep HWPMC opt_hwpmc_hooks.h || true +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo +DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo +HWPMC_ENABLED!=grep HWPMC opt_hwpmc_hooks.h || true ; echo .if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif Modified: head/sys/conf/Makefile.arm == --- head/sys/conf/Makefile.arm Wed Sep 12 13:58:18 2012(r240400) +++ head/sys/conf/Makefile.arm Wed Sep 12 14:17:11 2012(r240401) @@ -39,7 +39,7 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri STRIP_FLAGS = -S .endif -DDB_ENABLED!= grep DDB opt_ddb.h || true +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame Modified: head/sys/conf/Makefile.powerpc == --- head/sys/conf/Makefile.powerpc Wed Sep 12 13:58:18 2012 (r240400) +++ head/sys/conf/Makefile.powerpc Wed Sep 12 14:17:11 2012 (r240401) @@ -37,7 +37,7 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -msoft-float -Wa,-many -DDB_ENABLED!= grep DDB opt_ddb.h || true +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo .if !empty(DDB_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240400 - head/sys/conf
Author: obrien Date: Wed Sep 12 13:58:18 2012 New Revision: 240400 URL: http://svn.freebsd.org/changeset/base/240400 Log: Replace a bare use of 'objcopy' with ${OBJCOPY} for easier cross compilation in environments where 'objcopy' is spelled differently. Submitted by: John Van Horne Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Wed Sep 12 13:43:42 2012(r240399) +++ head/sys/conf/files.amd64 Wed Sep 12 13:58:18 2012(r240400) @@ -79,7 +79,7 @@ acpi_wakecode.o optionalacpi \ clean "acpi_wakecode.o" acpi_wakecode.bin optionalacpi\ dependency "acpi_wakecode.o" \ - compile-with"objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + compile-with"${OBJCOPY} -S -O binary acpi_wakecode.o ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "acpi_wakecode.bin" acpi_wakecode.hoptionalacpi \ Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Wed Sep 12 13:43:42 2012(r240399) +++ head/sys/conf/files.i386Wed Sep 12 13:58:18 2012(r240400) @@ -369,7 +369,7 @@ acpi_wakecode.o optional acpi \ clean "acpi_wakecode.o" acpi_wakecode.bin optional acpi \ dependency "acpi_wakecode.o" \ - compile-with"objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + compile-with"${OBJCOPY} -S -O binary acpi_wakecode.o ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "acpi_wakecode.bin" acpi_wakecode.hoptional acpi \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240377 - in head: lib/libmagic tools/build
Author: obrien Date: Tue Sep 11 22:38:33 2012 New Revision: 240377 URL: http://svn.freebsd.org/changeset/base/240377 Log: r235638 is not the clean way to add support for building on ancient FreeBSD versions. Instead use Imp's good work on "legacy" and follow the outcome of the previous TRB discussions on this topic. Now use the libc getline() if it exists, and only where it doesn't create a bootstraping version. Modified: head/lib/libmagic/Makefile head/lib/libmagic/config.h head/tools/build/Makefile Modified: head/lib/libmagic/Makefile == --- head/lib/libmagic/Makefile Tue Sep 11 22:13:37 2012(r240376) +++ head/lib/libmagic/Makefile Tue Sep 11 22:38:33 2012(r240377) @@ -39,9 +39,9 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic -mkmagic: apprentice.c encoding.c funcs.c getline.c magic.c print.c - ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \ - -o ${.TARGET} ${.ALLSRC} +mkmagic: apprentice.c encoding.c funcs.c magic.c print.c + ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} \ + ${LDADD} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: head/lib/libmagic/config.h == --- head/lib/libmagic/config.h Tue Sep 11 22:13:37 2012(r240376) +++ head/lib/libmagic/config.h Tue Sep 11 22:38:33 2012(r240377) @@ -39,9 +39,7 @@ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `getline' function. */ -#ifndef HOSTPROG #define HAVE_GETLINE 1 -#endif /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 Modified: head/tools/build/Makefile == --- head/tools/build/Makefile Tue Sep 11 22:13:37 2012(r240376) +++ head/tools/build/Makefile Tue Sep 11 22:38:33 2012(r240377) @@ -3,12 +3,24 @@ .PATH: ${.CURDIR}/../../include LIB= egacy -SRCS= +SRC= INCSGROUPS=INCS -INCS= +INCS= BOOTSTRAPPING?=0 +_WITH_GETLINE!=grep -c _WITH_GETLINE /usr/include/stdio.h || true +.if ${_WITH_GETLINE} == 0 +.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic +SRCS= getline.c config.h +CFLAGS+= -DHAVE_CONFIG_H -I. +CLEANFILES+= config.h + +${SRCS:N*.h:R:S/$/.o/}: config.h +config.h: ${.CURDIR}/../../lib/libmagic/config.h + grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET} +.endif + .if empty(SRCS) SRCS= dummy.c .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240336 - head/etc/rc.d
Author: obrien Date: Tue Sep 11 05:04:59 2012 New Revision: 240336 URL: http://svn.freebsd.org/changeset/base/240336 Log: Simply things so that "#REQUIRE: FILESYSTEMS" means the file systems are fully "ready to go". 'FILESYSTEMS' states: "This is a dummy dependency, for services which require file systems to be mounted before starting." However, we have 'var' which is was run after 'FILESYSTEMS' and can mount /var if it already isn't mounted. Furthermore, several scripts cannot use /var until 'cleanvar' has done its thing. Thus "FILESYSTEMS" hasn't really meant all critical file systems are fully usable. Modified: head/etc/rc.d/FILESYSTEMS head/etc/rc.d/addswap head/etc/rc.d/amd head/etc/rc.d/cleanvar head/etc/rc.d/cron head/etc/rc.d/dmesg head/etc/rc.d/ftpd head/etc/rc.d/inetd head/etc/rc.d/ipmon head/etc/rc.d/jail head/etc/rc.d/ldconfig head/etc/rc.d/mixer head/etc/rc.d/mountcritremote head/etc/rc.d/moused head/etc/rc.d/mrouted head/etc/rc.d/named head/etc/rc.d/netif head/etc/rc.d/newsyslog head/etc/rc.d/ntpd head/etc/rc.d/pflog head/etc/rc.d/postrandom head/etc/rc.d/random head/etc/rc.d/rarpd head/etc/rc.d/resolv head/etc/rc.d/sendmail head/etc/rc.d/sshd head/etc/rc.d/syslogd head/etc/rc.d/utx head/etc/rc.d/var head/etc/rc.d/watchdogd Modified: head/etc/rc.d/FILESYSTEMS == --- head/etc/rc.d/FILESYSTEMS Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/FILESYSTEMS Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: FILESYSTEMS -# REQUIRE: root mountcritlocal zfs +# REQUIRE: root mountcritlocal cleanvar zfs # This is a dummy dependency, for services which require file systems # to be mounted before starting. It also serves as the default early / Modified: head/etc/rc.d/addswap == --- head/etc/rc.d/addswap Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/addswap Tue Sep 11 05:04:59 2012(r240336) @@ -7,6 +7,7 @@ # PROVIDE: addswap # REQUIRE: FILESYSTEMS kld +# BEFORE: netif # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/amd == --- head/etc/rc.d/amd Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/amd Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig # BEFORE: DAEMON # KEYWORD: nojail shutdown Modified: head/etc/rc.d/cleanvar == --- head/etc/rc.d/cleanvar Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/cleanvar Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: cleanvar -# REQUIRE: FILESYSTEMS var +# REQUIRE: var . /etc/rc.subr Modified: head/etc/rc.d/cron == --- head/etc/rc.d/cron Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/cron Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: cron -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # BEFORE: securelevel # KEYWORD: shutdown Modified: head/etc/rc.d/dmesg == --- head/etc/rc.d/dmesg Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/dmesg Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: dmesg -# REQUIRE: mountcritremote cleanvar +# REQUIRE: mountcritremote FILESYSTEMS # BEFORE: DAEMON # KEYWORD: nojail Modified: head/etc/rc.d/ftpd == --- head/etc/rc.d/ftpd Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/ftpd Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: ftpd -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/inetd == --- head/etc/rc.d/inetd Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/inetd Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: inetd -# REQUIRE: DAEMON LOGIN cleanvar +# REQUIRE: DAEMON LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/ipmon == --- head/etc/rc.d/ipmon Tue Sep 11 04:54:44 2012(r240335) +++ head/etc/rc.d/ipmon Tue Sep 11 05:04:59 2012(r240336) @@ -4,7 +4,7 @@ # # PROVIDE: ipmon -# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter +# REQUIRE: FILESYSTEMS hostname sysctl FI
svn commit: r240334 - head/etc/rc.d
Author: obrien Date: Tue Sep 11 04:53:32 2012 New Revision: 240334 URL: http://svn.freebsd.org/changeset/base/240334 Log: Add postrandom. Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile == --- head/etc/rc.d/Makefile Tue Sep 11 04:11:42 2012(r240333) +++ head/etc/rc.d/Makefile Tue Sep 11 04:53:32 2012(r240334) @@ -107,6 +107,7 @@ FILES= DAEMON \ pf \ pflog \ pfsync \ + postrandom \ powerd \ power_profile \ ppp \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240108 - head/etc/rc.d
Author: obrien Date: Tue Sep 4 21:47:09 2012 New Revision: 240108 URL: http://svn.freebsd.org/changeset/base/240108 Log: * Rather than run the same 'ps' command twice, add 'kenv' which often gives machine unique values from the firmware. * The kernel is more likely to be unique than /bin/ls (but no need to stuff many megabytes into /dev/random, so hash it). * Change ordering to give larger variance across reboots to reduce predictability. Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom == --- head/etc/rc.d/initrandomTue Sep 4 21:40:53 2012(r240107) +++ head/etc/rc.d/initrandomTue Sep 4 21:47:09 2012(r240108) @@ -27,9 +27,11 @@ better_than_nothing() # harvesting rate. # Entropy below is not great, but better than nothing. # This unblocks the generator at startup - ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ + # Note: commands are ordered to cause the most variance across reboots. + ( kenv; dmesg; df -ib; ps -fauxww; date; sysctl -a ) \ + | dd of=/dev/random bs=8k 2>/dev/null + /sbin/sha256 -q `sysctl -n kern.bootfile` \ | dd of=/dev/random bs=8k 2>/dev/null - cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null } initrandom_start() ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239599 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 23:44:12 2012 New Revision: 239599 URL: http://svn.freebsd.org/changeset/base/239599 Log: Correct style. Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom == --- head/etc/rc.d/initrandomWed Aug 22 23:37:24 2012(r239598) +++ head/etc/rc.d/initrandomWed Aug 22 23:44:12 2012(r239599) @@ -75,7 +75,7 @@ initrandom_start() ;; esac - better_than_nothing() + better_than_nothing echo -n ' kickstart' fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239598 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 23:37:24 2012 New Revision: 239598 URL: http://svn.freebsd.org/changeset/base/239598 Log: * Reinstate r128059's consumption of our best entropy first. r128060 for "hardware-supplied entropy" reversed this without reason, seems a typo. * Isolate "better than nothing" implementation to a function. Submitted by: obrien & Arthur Mesh Sponsored by: Juniper Networks Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom == --- head/etc/rc.d/initrandomWed Aug 22 22:48:50 2012(r239597) +++ head/etc/rc.d/initrandomWed Aug 22 23:37:24 2012(r239598) @@ -21,6 +21,17 @@ feed_dev_random() fi } +better_than_nothing() +{ + # XXX temporary until we can improve the entropy + # harvesting rate. + # Entropy below is not great, but better than nothing. + # This unblocks the generator at startup + ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ + | dd of=/dev/random bs=8k 2>/dev/null + cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null +} + initrandom_start() { soft_random_generator=`sysctl kern.random 2>/dev/null` @@ -52,14 +63,6 @@ initrandom_start() fi fi - # XXX temporary until we can improve the entropy - # harvesting rate. - # Entropy below is not great, but better than nothing. - # This unblocks the generator at startup - ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ - | dd of=/dev/random bs=8k 2>/dev/null - cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null - # First pass at reseeding /dev/random. # case ${entropy_file} in @@ -72,6 +75,8 @@ initrandom_start() ;; esac + better_than_nothing() + echo -n ' kickstart' fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239596 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 22:34:55 2012 New Revision: 239596 URL: http://svn.freebsd.org/changeset/base/239596 Log: The entire comment block is now spell checked this time -- I promise. Modified: head/etc/rc.d/postrandom Modified: head/etc/rc.d/postrandom == --- head/etc/rc.d/postrandomWed Aug 22 22:17:35 2012(r239595) +++ head/etc/rc.d/postrandomWed Aug 22 22:34:55 2012(r239596) @@ -15,9 +15,9 @@ start_cmd="${name}_start" stop_cmd=":" # This will remove old ${entropy_file} and generate a new one. -# According to Bruce Schneier, this is strongly recomended in order +# According to Bruce Schneier, this is strongly recommended in order # to avoid using same ${entropy_file} across reboots. -# Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 +# Reference: Chapter 10.6, Practical Cryptography, ISBN: 0-471-22357-3 postrandom_start() { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239593 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 20:56:53 2012 New Revision: 239593 URL: http://svn.freebsd.org/changeset/base/239593 Log: Fix comment misspelling. Submitted by: kargl Modified: head/etc/rc.d/postrandom Modified: head/etc/rc.d/postrandom == --- head/etc/rc.d/postrandomWed Aug 22 20:34:23 2012(r239592) +++ head/etc/rc.d/postrandomWed Aug 22 20:56:53 2012(r239593) @@ -15,7 +15,7 @@ start_cmd="${name}_start" stop_cmd=":" # This will remove old ${entropy_file} and generate a new one. -# According to Bruce Schneier, this is stronly recomended in order +# According to Bruce Schneier, this is strongly recomended in order # to avoid using same ${entropy_file} across reboots. # Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239570 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 18:49:02 2012 New Revision: 239570 URL: http://svn.freebsd.org/changeset/base/239570 Log: Depend on the new 'postrandom' instead of random. We need to limit the amount of time between consuming the entropy seeds and removing it in case of a kernel panic. Modified: head/etc/rc.d/adjkerntz Modified: head/etc/rc.d/adjkerntz == --- head/etc/rc.d/adjkerntz Wed Aug 22 18:43:21 2012(r239569) +++ head/etc/rc.d/adjkerntz Wed Aug 22 18:49:02 2012(r239570) @@ -4,7 +4,7 @@ # # PROVIDE: adjkerntz -# REQUIRE: FILESYSTEMS random +# REQUIRE: FILESYSTEMS postrandom # BEFORE: netif # KEYWORD: nojail ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239569 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 18:43:21 2012 New Revision: 239569 URL: http://svn.freebsd.org/changeset/base/239569 Log: Remove old entropy seeding after consumption initializing /dev/random PRNG. Not doing so opens us up to replay attacks. Submitted by: Arthur Mesh Sponsored by: Juniper Networks Added: head/etc/rc.d/postrandom (contents, props changed) Modified: head/etc/rc.d/random Added: head/etc/rc.d/postrandom == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/postrandomWed Aug 22 18:43:21 2012(r239569) @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: postrandom +# REQUIRE: initrandom random var +# BEFORE: LOGIN +# KEYWORD: nojail + +. /etc/rc.subr + +name="postrandom" +start_cmd="${name}_start" +stop_cmd=":" + +# This will remove old ${entropy_file} and generate a new one. +# According to Bruce Schneier, this is stronly recomended in order +# to avoid using same ${entropy_file} across reboots. +# Reference: Chapter 10.6, Practical Cryptograpy, ISBN: 0-471-22357-3 + +postrandom_start() +{ + /etc/rc.d/random fastsaveseed + + case ${entropy_dir} in + [Nn][Oo]) + ;; + *) + entropy_dir=${entropy_dir:-/var/db/entropy} + if [ -d "${entropy_dir}" ]; then + if [ -w /dev/random ]; then + rm -f ${entropy_dir}/* + fi + fi + ;; + esac +} + +load_rc_config random +run_rc_command "$1" Modified: head/etc/rc.d/random == --- head/etc/rc.d/randomWed Aug 22 18:35:17 2012(r239568) +++ head/etc/rc.d/randomWed Aug 22 18:43:21 2012(r239569) @@ -4,7 +4,7 @@ # # PROVIDE: random -# REQUIRE: var initrandom +# REQUIRE: initrandom var # BEFORE: netif # KEYWORD: nojail shutdown @@ -14,6 +14,9 @@ name="random" start_cmd="random_start" stop_cmd="random_stop" +extra_commands="saveseed" +saveseed_cmd="${name}_stop" + feed_dev_random() { if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239568 - head/etc/rc.d
Author: obrien Date: Wed Aug 22 18:35:17 2012 New Revision: 239568 URL: http://svn.freebsd.org/changeset/base/239568 Log: Add dependencies based on security(7). Modified: head/etc/rc.d/securelevel Modified: head/etc/rc.d/securelevel == --- head/etc/rc.d/securelevel Wed Aug 22 18:30:13 2012(r239567) +++ head/etc/rc.d/securelevel Wed Aug 22 18:35:17 2012(r239568) @@ -4,6 +4,7 @@ # # PROVIDE: securelevel +# REQUIRE: adjkerntz ipfw ipfilter pf . /etc/rc.subr ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239506 - head/sys/sys
Author: obrien Date: Tue Aug 21 17:06:36 2012 New Revision: 239506 URL: http://svn.freebsd.org/changeset/base/239506 Log: Missing one in r239505. Modified: head/sys/sys/user.h Modified: head/sys/sys/user.h == --- head/sys/sys/user.h Tue Aug 21 17:05:10 2012(r239505) +++ head/sys/sys/user.h Tue Aug 21 17:06:36 2012(r239506) @@ -146,7 +146,7 @@ struct kinfo_proc { gid_t ki_svgid; /* Saved effective group id */ short ki_ngroups; /* number of groups */ short ki_spare_short2;/* unused (just here for alignment) */ - gid_t ki_groups[KI_NGROUPS]; /* groups */ + gid_t ki_groups[KI_NGROUPS]; /* groups */ vm_size_t ki_size; /* virtual size */ segsz_t ki_rssize; /* current resident set size in pages */ segsz_t ki_swrss; /* resident set size before last swap */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239505 - head/sys/sys
Author: obrien Date: Tue Aug 21 17:05:10 2012 New Revision: 239505 URL: http://svn.freebsd.org/changeset/base/239505 Log: Restore the style of r195843 to that of pre-r194498 to reduce gratuitous diffs to older sources. Modified: head/sys/sys/user.h Modified: head/sys/sys/user.h == --- head/sys/sys/user.h Tue Aug 21 16:44:25 2012(r239504) +++ head/sys/sys/user.h Tue Aug 21 17:05:10 2012(r239505) @@ -98,7 +98,7 @@ #defineTDNAMLEN16 /* size of returned thread name */ #defineCOMMLEN 19 /* size of returned ki_comm name */ #defineKI_EMULNAMELEN 16 /* size of returned ki_emul */ -#define KI_NGROUPS 16 /* number of groups in ki_groups */ +#defineKI_NGROUPS 16 /* number of groups in ki_groups */ #defineLOGNAMELEN 17 /* size of returned ki_login */ #defineLOGINCLASSLEN 17 /* size of returned ki_loginclass */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239360 - in head: contrib/diff/src gnu/usr.bin/diff
Author: obrien Date: Fri Aug 17 18:20:38 2012 New Revision: 239360 URL: http://svn.freebsd.org/changeset/base/239360 Log: Catch up with the subversion conversion and apply these build-time patches. Deleted: head/gnu/usr.bin/diff/context.c.diff head/gnu/usr.bin/diff/diff.c.diff Modified: head/contrib/diff/src/context.c head/contrib/diff/src/diff.c head/gnu/usr.bin/diff/Makefile Modified: head/contrib/diff/src/context.c == --- head/contrib/diff/src/context.c Fri Aug 17 17:45:27 2012 (r239359) +++ head/contrib/diff/src/context.c Fri Aug 17 18:20:38 2012 (r239360) @@ -29,7 +29,7 @@ # define TIMESPEC_NS(timespec) 0 #endif -size_t nstrftime (char *, size_t, char const *, struct tm const *, int, int); +size_t nstrftime (char *, size_t, char const *, struct tm const *, int, long); static char const *find_function (char const * const *, lin); static struct change *find_hunk (struct change *); @@ -57,12 +57,12 @@ print_context_label (char const *mark, char buf[MAX (INT_STRLEN_BOUND (int) + 32, INT_STRLEN_BOUND (time_t) + 11)]; struct tm const *tm = localtime (&inf->stat.st_mtime); - int nsec = TIMESPEC_NS (inf->stat.st_mtim); + long nsec = TIMESPEC_NS (inf->stat.st_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long int sec = inf->stat.st_mtime; + time_t sec = inf->stat.st_mtime; verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); - sprintf (buf, "%ld.%.9d", sec, nsec); + sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); } fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); } Modified: head/contrib/diff/src/diff.c == --- head/contrib/diff/src/diff.cFri Aug 17 17:45:27 2012 (r239359) +++ head/contrib/diff/src/diff.cFri Aug 17 18:20:38 2012 (r239360) @@ -137,7 +137,7 @@ exclude_options (void) } static char const shortopts[] = -"0123456789abBcC:dD:eEfF:hHiI:lL:nNpPqrsS:tTuU:vwW:x:X:y"; +"0123456789abBcC:dD:eEfF:hHiI:lL:nNopPqrsS:tTuU:vwW:x:X:y"; /* Values for long options that do not have single-letter equivalents. */ enum @@ -265,14 +265,15 @@ main (int argc, char **argv) initialize_main (&argc, &argv); program_name = argv[0]; setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); c_stack_action (0); function_regexp_list.buf = &function_regexp; ignore_regexp_list.buf = &ignore_regexp; - re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING); + re_set_syntax (RE_SYNTAX_GREP); excluded = new_exclude (); + prepend_default_options (getenv ("DIFF_OPTIONS"), &argc, &argv); + /* Decode the options. */ while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1) @@ -428,6 +429,11 @@ main (int argc, char **argv) new_file = true; break; + case 'o': + /* Output in the old tradition style. */ + specify_style (OUTPUT_NORMAL); + break; + case 'p': show_c_function = true; add_regexp (&function_regexp_list, "^[[:alpha:]$_]"); @@ -983,8 +989,6 @@ specify_style (enum output_style style) { if (output_style != style) { - if (output_style != OUTPUT_UNSPECIFIED) - try_help ("conflicting output style options", 0); output_style = style; } } Modified: head/gnu/usr.bin/diff/Makefile == --- head/gnu/usr.bin/diff/Makefile Fri Aug 17 17:45:27 2012 (r239359) +++ head/gnu/usr.bin/diff/Makefile Fri Aug 17 18:20:38 2012 (r239360) @@ -27,10 +27,4 @@ SUBDIR+=doc DPADD= ${LIBGNUREGEX} LDADD= -lgnuregex -.for f in diff.c context.c -${f}: ${DIFFSRC}/${f} ${.CURDIR}/${f}.diff - patch -s -o ${.TARGET} < ${.CURDIR}/${f}.diff ${DIFFSRC}/${f} -CLEANFILES+= ${f} -.endfor - .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r239295 - head/sys/kern
Author: obrien Date: Wed Aug 15 14:18:54 2012 New Revision: 239295 URL: http://svn.freebsd.org/changeset/base/239295 Log: Don't include opt_ddb.h & twice. Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Wed Aug 15 12:01:13 2012(r239294) +++ head/sys/kern/kern_proc.c Wed Aug 15 14:18:54 2012(r239295) @@ -725,9 +725,7 @@ sess_release(struct session *s) } } -#include "opt_ddb.h" #ifdef DDB -#include DB_SHOW_COMMAND(pgrpdump, pgrpdump) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r238564 - head/usr.bin
Author: obrien Date: Wed Jul 18 07:07:54 2012 New Revision: 238564 URL: http://svn.freebsd.org/changeset/base/238564 Log: Sort per the comment. Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Wed Jul 18 05:57:42 2012(r238563) +++ head/usr.bin/Makefile Wed Jul 18 07:07:54 2012(r238564) @@ -208,10 +208,6 @@ SUBDIR+= at SUBDIR+= atm .endif -.if ${MK_MAN_UTILS} != "no" -SUBDIR+= catman -.endif - .if ${MK_BIND_UTILS} != "no" SUBDIR+= dig SUBDIR+= host @@ -235,6 +231,10 @@ SUBDIR+= calendar _clang=clang .endif +.if ${MK_GROFF} != "no" +SUBDIR+= vgrind +.endif + .if ${MK_HESIOD} != "no" SUBDIR+= hesinfo .endif @@ -245,15 +245,8 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif -.if ${MK_GROFF} != "no" -SUBDIR+= vgrind -.endif - -.if ${MK_OPENSSL} != "no" -SUBDIR+= bc -SUBDIR+= chkey -SUBDIR+= dc -SUBDIR+= newkey +.if ${MK_KERBEROS_SUPPORT} != "no" +SUBDIR+= compile_et .endif .if ${MK_LIBTHR} != "no" @@ -264,10 +257,6 @@ SUBDIR+= csup SUBDIR+= locate .endif -.if ${MK_KERBEROS_SUPPORT} != "no" -SUBDIR+= compile_et -.endif - # XXX msgs? .if ${MK_MAIL} != "no" SUBDIR+= biff @@ -281,6 +270,7 @@ SUBDIR+=make .endif .if ${MK_MAN_UTILS} != "no" +SUBDIR+= catman _makewhatis= makewhatis _man= man .endif @@ -295,6 +285,13 @@ SUBDIR+= ypmatch SUBDIR+= ypwhich .endif +.if ${MK_OPENSSL} != "no" +SUBDIR+= bc +SUBDIR+= chkey +SUBDIR+= dc +SUBDIR+= newkey +.endif + .if ${MK_QUOTAS} != "no" SUBDIR+= quota .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r238563 - head/gnu/usr.bin/groff/tmac
Author: obrien Date: Wed Jul 18 05:57:42 2012 New Revision: 238563 URL: http://svn.freebsd.org/changeset/base/238563 Log: a ";" tells make we want the shell to be used Submitted by: Simon Gerraty Modified: head/gnu/usr.bin/groff/tmac/Makefile Modified: head/gnu/usr.bin/groff/tmac/Makefile == --- head/gnu/usr.bin/groff/tmac/MakefileWed Jul 18 05:50:40 2012 (r238562) +++ head/gnu/usr.bin/groff/tmac/MakefileWed Jul 18 05:57:42 2012 (r238563) @@ -68,7 +68,7 @@ beforeinstall: cd ${.CURDIR}; \ ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR} - cd ${.OBJDIR} + cd ${.OBJDIR}; .for f in ${STRIPFILES} ${SPECIALFILES} ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ $f-s ${DESTDIR}${TMACDIR}/$f ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r238143 - in head/tools: build/make_check regression/usr.bin/make/syntax/funny-targets
Author: obrien Date: Thu Jul 5 18:23:36 2012 New Revision: 238143 URL: http://svn.freebsd.org/changeset/base/238143 Log: Remove the "funny targets" make check. We no longer need embedded :: targets to build FreeBSD (they are used in Perl man pages). We never needed embedded "!" in targets that I can find. We got this from OpenBSD and I cannot find any other make that supports such things -- contrary to their commit message claim: "This behaviour is also consistent with other versions of make.". Added: head/tools/regression/usr.bin/make/syntax/funny-targets/ head/tools/regression/usr.bin/make/syntax/funny-targets/Makefile (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.status.2 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stderr.2 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/expected.stdout.2 (contents, props changed) head/tools/regression/usr.bin/make/syntax/funny-targets/test.t (contents, props changed) Modified: head/tools/build/make_check/Makefile Modified: head/tools/build/make_check/Makefile == --- head/tools/build/make_check/MakefileThu Jul 5 18:19:35 2012 (r238142) +++ head/tools/build/make_check/MakefileThu Jul 5 18:23:36 2012 (r238143) @@ -23,7 +23,7 @@ NIL= SMAKE= MAKEFLAGS= ${MAKE} -C ${.CURDIR} all: - @echo '1..17' + @echo '1..16' @${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; } @echo "ok 1 - C_check # Test of -C flag existence detected no regression." @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ @@ -40,26 +40,24 @@ all: @echo "ok 6 - notdef # Test notdef detected no regression." @${SMAKE} modifiers || ${SMAKE} failure @echo "ok 7 - modifiers # Test modifiers detected no regression." - @${SMAKE} funny_targets || ${SMAKE} failure - @echo "ok 8 funny_targets # Test funny_targets detected no regression." @${SMAKE} arith_expr || ${SMAKE} failure - @echo "ok 9 arith_expr # Test arith_expr detected no regression." + @echo "ok 8 arith_expr # Test arith_expr detected no regression." @${SMAKE} PATH_exists || ${SMAKE} failure - @echo "ok 10 PATH_exists # Test PATH_exists detected no regression." + @echo "ok 9 PATH_exists # Test PATH_exists detected no regression." @${SMAKE} double_quotes || ${SMAKE} failure - @echo "ok 11 double_quotes # Test double_quotes detected no regression." + @echo "ok 10 double_quotes # Test double_quotes detected no regression." @! ${SMAKE} double_quotes2 >/dev/null 2>&1 && true || ${SMAKE} failure - @echo "ok 12 double_quotes2 # Test double_quotes2 detected no regression." + @echo "ok 11 double_quotes2 # Test double_quotes2 detected no regression." @${SMAKE} pass_cmd_vars || ${SMAKE} failure - @echo "ok 13 pass_cmd_vars # Test pass_cmd_vars detected no regression." + @echo "ok 12 pass_cmd_vars # Test pass_cmd_vars detected no regression." @${SMAKE} plus_flag || ${SMAKE} failure - @echo "ok 14 plus_flag # Test plus_flag detected no regression." + @echo "ok 13 plus_flag # Test plus_flag detected no regression." @! ${SMAKE} shell >/dev/null 2>&1 && true || ${SMAKE} failure - @echo "ok 15 shell # Test shell detected no regression." + @echo "ok 14 shell # Test shell detected no regression." @${SMAKE} shell_1 || ${SMAKE} failure - @echo "ok 16 shell_1 # Test shell_1 detected no regression." + @echo "ok 15 shell_1 # Test shell_1 detected no regression." @${SMAKE} shell_2 || ${SMAKE} failure - @echo "ok 17 shell_2 # Test shell_2 detected no regression." + @echo "ok 16 shell_2 # Test shell_2 detected no regression." .if make(C_check) C_check: @@ -107,12 +105,6 @@ modifiers: fi .endif -.if make(funny_targets) -funny_targets: colons::target exclamation!target -colons::target: -exclamation!target: -.endif - .if make(arith_expr) arith_expr: # See if arithmetic expression parsing is broken. Added: head/tools/regression/usr.bin/make/syntax/funny-targets/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/funny-targets/MakefileThu Jul 5 18:23:36 2012(r238143) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# PR bin/6612 / GRN r102178 +# + +test1: colons
svn commit: r238072 - in head/sys/dev/virtio: . balloon block network
Author: obrien Date: Tue Jul 3 15:15:41 2012 New Revision: 238072 URL: http://svn.freebsd.org/changeset/base/238072 Log: Do not include in the local headers. The .c files including them have already included before these headers are included. Modified: head/sys/dev/virtio/balloon/virtio_balloon.h head/sys/dev/virtio/block/virtio_blk.h head/sys/dev/virtio/network/virtio_net.h head/sys/dev/virtio/virtio.h head/sys/dev/virtio/virtio_ring.h head/sys/dev/virtio/virtqueue.h Modified: head/sys/dev/virtio/balloon/virtio_balloon.h == --- head/sys/dev/virtio/balloon/virtio_balloon.hTue Jul 3 12:08:55 2012(r238071) +++ head/sys/dev/virtio/balloon/virtio_balloon.hTue Jul 3 15:15:41 2012(r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_BALLOON_H #define _VIRTIO_BALLOON_H -#include - /* Feature bits. */ #define VIRTIO_BALLOON_F_MUST_TELL_HOST0x1 /* Tell before reclaiming pages */ #define VIRTIO_BALLOON_F_STATS_VQ 0x2 /* Memory stats virtqueue */ Modified: head/sys/dev/virtio/block/virtio_blk.h == --- head/sys/dev/virtio/block/virtio_blk.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/block/virtio_blk.h Tue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_BLK_H #define _VIRTIO_BLK_H -#include - /* Feature bits */ #define VIRTIO_BLK_F_BARRIER 0x0001 /* Does host support barriers? */ #define VIRTIO_BLK_F_SIZE_MAX 0x0002 /* Indicates maximum segment size */ Modified: head/sys/dev/virtio/network/virtio_net.h == --- head/sys/dev/virtio/network/virtio_net.hTue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/network/virtio_net.hTue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_NET_H #define _VIRTIO_NET_H -#include - /* The feature bitmap for virtio net */ #define VIRTIO_NET_F_CSUM 0x1 /* Host handles pkts w/ partial csum */ #define VIRTIO_NET_F_GUEST_CSUM 0x2 /* Guest handles pkts w/ partial csum*/ Modified: head/sys/dev/virtio/virtio.h == --- head/sys/dev/virtio/virtio.hTue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/virtio.hTue Jul 3 15:15:41 2012 (r238072) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_H_ #define _VIRTIO_H_ -#include - struct vq_alloc_info; /* VirtIO device IDs. */ Modified: head/sys/dev/virtio/virtio_ring.h == --- head/sys/dev/virtio/virtio_ring.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/virtio_ring.h Tue Jul 3 15:15:41 2012 (r238072) @@ -33,8 +33,6 @@ #ifndef VIRTIO_RING_H #defineVIRTIO_RING_H -#include - /* This marks a buffer as continuing via the next field. */ #define VRING_DESC_F_NEXT 1 /* This marks a buffer as write-only (otherwise read-only). */ Modified: head/sys/dev/virtio/virtqueue.h == --- head/sys/dev/virtio/virtqueue.h Tue Jul 3 12:08:55 2012 (r238071) +++ head/sys/dev/virtio/virtqueue.h Tue Jul 3 15:15:41 2012 (r238072) @@ -29,8 +29,6 @@ #ifndef _VIRTIO_VIRTQUEUE_H #define _VIRTIO_VIRTQUEUE_H -#include - struct virtqueue; struct sglist; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r238051 - head
Author: obrien Date: Tue Jul 3 06:41:00 2012 New Revision: 238051 URL: http://svn.freebsd.org/changeset/base/238051 Log: Add "hier" as an alternate spelling of "hierarchy" to match hier(9). Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile == --- head/Makefile Tue Jul 3 05:01:00 2012(r238050) +++ head/Makefile Tue Jul 3 06:41:00 2012(r238051) @@ -92,7 +92,7 @@ TGTS= all all-man buildenv buildenvvars delete-old delete-old-dirs delete-old-files delete-old-libs \ depend distribute distributekernel distributekernel.debug \ distributeworld distrib-dirs distribution doxygen \ - everything hierarchy install installcheck installkernel \ + everything hier hierarchy install installcheck installkernel \ installkernel.debug packagekernel packageworld \ reinstallkernel reinstallkernel.debug \ installworld kernel-toolchain libraries lint maninstall \ Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jul 3 05:01:00 2012(r238050) +++ head/Makefile.inc1 Tue Jul 3 06:41:00 2012(r238051) @@ -1197,7 +1197,7 @@ cross-tools: # # hierarchy - ensure that all the needed directories are present # -hierarchy: +hierarchy hier: cd ${.CURDIR}/etc; ${MAKE} distrib-dirs # ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r238050 - head/sys/conf
Author: obrien Date: Tue Jul 3 05:01:00 2012 New Revision: 238050 URL: http://svn.freebsd.org/changeset/base/238050 Log: Revert r222186 per instructions for FreeBSD 10. (a 10-CURRENT share/mk is already required to build a 10-CURRENT kernel on 9-STABLE) Modified: head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Tue Jul 3 02:55:27 2012(r238049) +++ head/sys/conf/kern.post.mk Tue Jul 3 05:01:00 2012(r238050) @@ -270,8 +270,7 @@ kernel-install: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ -(defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -283,8 +282,7 @@ kernel-install: kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \ -(defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") +.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Jul 3 02:55:27 2012(r238049) +++ head/sys/conf/kmod.mk Tue Jul 3 05:01:00 2012(r238050) @@ -283,8 +283,7 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && \ -(defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no") +.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237794 - head/tools/regression/filemon
Author: obrien Date: Fri Jun 29 15:54:07 2012 New Revision: 237794 URL: http://svn.freebsd.org/changeset/base/237794 Log: Support also running a 32-bit test on 64-bit platforms. Modified: head/tools/regression/filemon/Makefile Modified: head/tools/regression/filemon/Makefile == --- head/tools/regression/filemon/Makefile Fri Jun 29 15:47:03 2012 (r237793) +++ head/tools/regression/filemon/Makefile Fri Jun 29 15:54:07 2012 (r237794) @@ -9,16 +9,18 @@ CFLAGS+= -I${.CURDIR}/../../../sys # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . test: ${PROG} clean-test +.for BIN in ${PROG} ${PROG}32 cd ${.CURDIR} ; \ for A in 1 2 3 4 5 6 7 8 9 0; do \ for B in 1 2 3 4 5 6 7 8 9 0; do \ for C in 1 2 3 4 5 6 7 8 9 0; do \ - ${.OBJDIR}/${PROG} ;\ + test -x ${BIN} && ${.OBJDIR}/${BIN} ;\ done ;\ done ;\ done @cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \ grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp format OK" +.endfor clean-test: cd ${.CURDIR} ; rm -f filemon_log.* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237625 - in head/usr.sbin/crunch: crunchgen crunchide
Author: obrien Date: Wed Jun 27 04:39:30 2012 New Revision: 237625 URL: http://svn.freebsd.org/changeset/base/237625 Log: Some amount of style(9) -- function definitions, header ordering, and $FreeBSD$. Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c head/usr.sbin/crunch/crunchgen/crunchgen.c head/usr.sbin/crunch/crunchide/crunchide.c Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c == --- head/usr.sbin/crunch/crunchgen/crunched_main.c Wed Jun 27 04:39:30 2012(r237624) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Wed Jun 27 04:39:30 2012(r237625) @@ -22,8 +22,6 @@ * Author: James da Silva, Systems Design and Analysis Group *Computer Science Department *University of Maryland at College Park - * - * $FreeBSD$ */ /* * crunched_main.c - main program for crunched binaries, it branches to a @@ -33,6 +31,10 @@ * or calls one of them based on argv[1]. This allows the testing of * the crunched binary without creating all the links. */ + +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -45,7 +47,8 @@ struct stub { extern char *__progname; extern struct stub entry_points[]; -int main(int argc, char **argv, char **envp) +int +main(int argc, char **argv, char **envp) { char *slash, *basename; struct stub *ep; @@ -68,7 +71,8 @@ int main(int argc, char **argv, char **e } -int crunched_here(char *path) +int +crunched_here(char *path) { char *slash, *basename; struct stub *ep; @@ -83,7 +87,8 @@ int crunched_here(char *path) } -int crunched_main(int argc, char **argv, char **envp) +int +crunched_main(int argc, char **argv, char **envp) { char *slash; struct stub *ep; @@ -99,7 +104,8 @@ int crunched_main(int argc, char **argv, } -int crunched_usage() +int +crunched_usage() { int columns, len; struct stub *ep; @@ -122,4 +128,3 @@ int crunched_usage() } /* end of crunched_main.c */ - Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c == --- head/usr.sbin/crunch/crunchgen/crunchgen.c Wed Jun 27 04:39:30 2012 (r237624) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Wed Jun 27 04:39:30 2012 (r237625) @@ -22,8 +22,6 @@ * Author: James da Silva, Systems Design and Analysis Group *Computer Science Department *University of Maryland at College Park - * - * $FreeBSD$ */ /* * @@ -32,9 +30,12 @@ * Generates a Makefile and main C file for a crunched executable, * from specs given in a .conf file. */ -#include -#include + +#include +__FBSDID("$FreeBSD$"); + #include +#include #include #include @@ -119,7 +120,8 @@ void parse_conf_file(void); void gen_outputs(void); -int main(int argc, char **argv) +int +main(int argc, char **argv) { char *p; int optc; @@ -223,7 +225,8 @@ int main(int argc, char **argv) } -void usage(void) +void +usage(void) { fprintf(stderr, "%s%s\n\t%s%s\n", "usage: crunchgen [-foq] ", "[-h ] [-m ]", @@ -255,7 +258,8 @@ prog_t *find_prog(char *str); void add_prog(char *progname); -void parse_conf_file(void) +void +parse_conf_file(void) { if (!is_nonempty_file(infilename)) errx(1, "fatal: input file \"%s\" not found", infilename); @@ -268,7 +272,8 @@ void parse_conf_file(void) } -void parse_one_file(char *filename) +void +parse_one_file(char *filename) { char *fieldv[MAXFIELDS]; int fieldc; @@ -334,7 +339,8 @@ void parse_one_file(char *filename) } -void parse_line(char *line, int *fc, char **fv, int nf) +void +parse_line(char *line, int *fc, char **fv, int nf) { char *p; @@ -365,7 +371,8 @@ void parse_line(char *line, int *fc, cha } -void add_srcdirs(int argc, char **argv) +void +add_srcdirs(int argc, char **argv) { int i; @@ -381,7 +388,8 @@ void add_srcdirs(int argc, char **argv) } -void add_progs(int argc, char **argv) +void +add_progs(int argc, char **argv) { int i; @@ -390,7 +398,8 @@ void add_progs(int argc, char **argv) } -void add_prog(char *progname) +void +add_prog(char *progname) { prog_t *p1, *p2; @@ -431,7 +440,8 @@ void add_prog(char *progname) } -void add_link(int argc, char **argv) +void +add_link(int argc, char **argv) { int i; prog_t *p = find_prog(argv[1]); @@ -452,7 +462,8 @@ void add_link(int argc, char **argv) } -void add_libs(int argc, char **argv) +void +add_libs(int argc, char **argv) { int i; @@ -466,7 +477,8 @@ void add_libs(int argc, char **argv) } -void add_libs_so(int argc, char **argv) +void +add_libs_so(int argc, char **argv) { int i;
svn commit: r237612 - head/share/mk
Author: obrien Date: Tue Jun 26 23:15:55 2012 New Revision: 237612 URL: http://svn.freebsd.org/changeset/base/237612 Log: Add -DWITH_INSTALL_AS_USER to the source build (naming matches the same functionality of The Ports Collection). This sets BINOWN, BINGRP, etc... to match current user. This this allows 'install', as used in 'make install', to succeed (assuming user has write permissions). Submitted by: Simon J Gerraty Discussed on: freebsd-arch Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkTue Jun 26 22:16:53 2012(r237611) +++ head/share/mk/bsd.own.mkTue Jun 26 23:15:55 2012(r237612) @@ -427,6 +427,7 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ ICONV \ IDEA \ +INSTALL_AS_USER \ LIBCPLUSPLUS \ NAND \ OFED \ @@ -645,6 +646,17 @@ CTFCONVERT_CMD= CTFCONVERT_CMD=@: .endif +.if ${MK_INSTALL_AS_USER} != "no" +_uid!= id -un +.if ${_uid} != 0 +_gid!= id -gn +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +$xOWN= ${_uid} +$xGRP= ${_gid} +.endfor +.endif +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target() ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237574 - in head: share/mk usr.sbin/crunch/crunchgen
Author: obrien Date: Mon Jun 25 21:56:36 2012 New Revision: 237574 URL: http://svn.freebsd.org/changeset/base/237574 Log: Ensure crunchen uses the same make binary as the rest of the build. Submitted by: Simon Gerraty Modified: head/share/mk/bsd.crunchgen.mk head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Mon Jun 25 21:51:40 2012 (r237573) +++ head/share/mk/bsd.crunchgen.mk Mon Jun 25 21:56:36 2012 (r237574) @@ -105,7 +105,7 @@ $(CONF): Makefile .MAKEFLAGS:= ${.MAKEFLAGS:N-P} .ORDER: $(OUTPUTS) objs $(OUTPUTS): $(CONF) - MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ + MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) $(PROG): $(OUTPUTS) objs Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c == --- head/usr.sbin/crunch/crunchgen/crunchgen.c Mon Jun 25 21:51:40 2012 (r237573) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Mon Jun 25 21:56:36 2012 (r237574) @@ -92,6 +92,7 @@ char outmkname[MAXPATHLEN], outcfname[MA char tempfname[MAXPATHLEN], cachename[MAXPATHLEN], curfilename[MAXPATHLEN]; char outhdrname[MAXPATHLEN] ; /* user-supplied header for *.mk */ char *objprefix; /* where are the objects ? */ +char *path_make; int linenum = -1; int goterror = 0; @@ -127,6 +128,10 @@ int main(int argc, char **argv) readcache = 1; *outmkname = *outcfname = *execfname = '\0'; + path_make = getenv("MAKE"); + if (path_make == NULL || *path_make == '\0') + path_make = "make"; + p = getenv("MAKEOBJDIRPREFIX"); if (p == NULL || *p == '\0') objprefix = "/usr/obj"; /* default */ @@ -599,7 +604,8 @@ void gen_outputs(void) gen_output_makefile(); status(""); fprintf(stderr, - "Run \"make -f %s\" to build crunched binary.\n", outmkname); + "Run \"%s -f %s\" to build crunched binary.\n", + path_make, outmkname); } /* @@ -720,16 +726,16 @@ void fillin_program_objs(prog_t *p, char fprintf(f, "loop:\n\t@echo 'OBJS= '${%s}\n", objvar); fprintf(f, "crunchgen_objs:\n" - "\t@cd %s && make -f %s $(BUILDOPTS) $(%s_OPTS)", - p->srcdir, tempfname, p->ident); + "\t@cd %s && %s -f %s $(BUILDOPTS) $(%s_OPTS)", + p->srcdir, path_make, tempfname, p->ident); for (s = p->buildopts; s != NULL; s = s->next) fprintf(f, " %s", s->str); fprintf(f, " loop\n"); fclose(f); - snprintf(line, MAXLINELEN, "cd %s && make -f %s -B crunchgen_objs", - p->srcdir, tempfname); + snprintf(line, MAXLINELEN, "cd %s && %s -f %s -B crunchgen_objs", +p->srcdir, path_make, tempfname); if ((f = popen(line, "r")) == NULL) { warn("submake pipe"); goterror = 1; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237402 - head/lib/libc/net
Author: obrien Date: Thu Jun 21 15:47:06 2012 New Revision: 237402 URL: http://svn.freebsd.org/changeset/base/237402 Log: Be explicit about the dependency on nsparser.h. Modified: head/lib/libc/net/Makefile.inc Modified: head/lib/libc/net/Makefile.inc == --- head/lib/libc/net/Makefile.inc Thu Jun 21 15:14:51 2012 (r237401) +++ head/lib/libc/net/Makefile.inc Thu Jun 21 15:47:06 2012 (r237402) @@ -36,7 +36,7 @@ LFLAGS+=-P_nsyy CLEANFILES+=nslexer.c -nslexer.c: nslexer.l +nslexer.c: nslexer.l nsparser.h ${LEX} ${LFLAGS} -o/dev/stdout ${.IMPSRC} | \ sed -e '/YY_BUF_SIZE/s/16384/1024/' >${.TARGET} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237344 - head/tools/regression/usr.bin/make
Author: obrien Date: Wed Jun 20 21:38:16 2012 New Revision: 237344 URL: http://svn.freebsd.org/changeset/base/237344 Log: Provide a mechanism to not clear out the work and output dirs when developing tests. Modified: head/tools/regression/usr.bin/make/common.sh Modified: head/tools/regression/usr.bin/make/common.sh == --- head/tools/regression/usr.bin/make/common.shWed Jun 20 21:34:03 2012(r237343) +++ head/tools/regression/usr.bin/make/common.shWed Jun 20 21:38:16 2012(r237344) @@ -239,8 +239,10 @@ eval_clean() if [ -n "${TEST_CLEANUP}" ] ; then . ${SRC_DIR}/cleanup fi - rm -rf ${WORK_DIR} - rm -rf ${OUTPUT_DIR} + if [ -z "${NO_TEST_CLEANUP}" ] ; then + rm -rf ${WORK_DIR} + rm -rf ${OUTPUT_DIR} + fi } # ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237282 - head/usr.bin/make
Author: obrien Date: Wed Jun 20 00:37:00 2012 New Revision: 237282 URL: http://svn.freebsd.org/changeset/base/237282 Log: Correct typo in version. Modified: head/usr.bin/make/Makefile Modified: head/usr.bin/make/Makefile == --- head/usr.bin/make/Makefile Wed Jun 20 00:17:29 2012(r237281) +++ head/usr.bin/make/Makefile Wed Jun 20 00:37:00 2012(r237282) @@ -15,7 +15,7 @@ NO_SHARED?= YES .endif # Version has the RMMDDX format, where R is from RELENG_ -CFLAGS+=-DMAKE_VERSION=\"10201120530\" +CFLAGS+=-DMAKE_VERSION=\"10201205300\" # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237279 - in head: etc/mtree include
Author: obrien Date: Wed Jun 20 00:09:47 2012 New Revision: 237279 URL: http://svn.freebsd.org/changeset/base/237279 Log: Install filemon.h into /usr/include for userland consumption. Modified: head/etc/mtree/BSD.include.dist head/include/Makefile Modified: head/etc/mtree/BSD.include.dist == --- head/etc/mtree/BSD.include.dist Tue Jun 19 23:45:17 2012 (r237278) +++ head/etc/mtree/BSD.include.dist Wed Jun 20 00:09:47 2012 (r237279) @@ -102,6 +102,8 @@ .. ciss .. +filemon +.. firewire .. hwpmc Modified: head/include/Makefile == --- head/include/Makefile Tue Jun 19 23:45:17 2012(r237278) +++ head/include/Makefile Wed Jun 20 00:09:47 2012(r237279) @@ -39,7 +39,7 @@ LDIRS=bsm cam geom net net80211 netatal sys vm LSUBDIRS= cam/ata cam/scsi \ - dev/acpica dev/an dev/bktr dev/ciss dev/firewire dev/hwpmc \ + dev/acpica dev/an dev/bktr dev/ciss dev/filemon dev/firewire dev/hwpmc \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236977 - head/tools/regression/usr.bin/make/variables/modifier_t
Author: obrien Date: Tue Jun 12 23:16:00 2012 New Revision: 236977 URL: http://svn.freebsd.org/changeset/base/236977 Log: Add a test for the :tl & :tu modifiers. Added: head/tools/regression/usr.bin/make/variables/modifier_t/ head/tools/regression/usr.bin/make/variables/modifier_t/Makefile (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.2 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.3 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.stderr.2 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.stderr.3 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.2 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.3 (contents, props changed) head/tools/regression/usr.bin/make/variables/modifier_t/test.t (contents, props changed) Added: head/tools/regression/usr.bin/make/variables/modifier_t/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/MakefileTue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# +# Test the t modifier. +# +# below is missing ' +ASCII= !"\#$$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + +test1: + @echo '${ASCII}' + +test2: + @echo '${ASCII:tl}' + +test3: + @echo '${ASCII:tu}' Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.1 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.1 Tue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.2 Tue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.3 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/expected.status.3 Tue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.stderr.1 == Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.stderr.2 == Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.stderr.3 == Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.1 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.1 Tue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1 @@ +!"#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.2 Tue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1 @@ +!"#$%&()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Added: head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.3 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/modifier_t/expected.stdout.3 Tue Jun 12 23:16:00 2012(r236977) @@ -0,0 +1 @@ +!"#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~ Added: head/tools/
svn commit: r236688 - head/share/man/man4
Author: obrien Date: Wed Jun 6 16:51:33 2012 New Revision: 236688 URL: http://svn.freebsd.org/changeset/base/236688 Log: Add to the description and spell check. Modified: head/share/man/man4/filemon.4 Modified: head/share/man/man4/filemon.4 == --- head/share/man/man4/filemon.4 Wed Jun 6 16:30:16 2012 (r236687) +++ head/share/man/man4/filemon.4 Wed Jun 6 16:51:33 2012 (r236688) @@ -10,7 +10,7 @@ .\"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: +.\"must display the following acknowledgment: .\"This product includes software developed by David E. O'Brien and .\"contributors. .\" 4. Neither the name of the author nor the names of its contributors @@ -19,7 +19,7 @@ .\" .\" 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 +.\" IMPLIED WARRANTIES OF MERCHANT ABILITY 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 @@ -87,12 +87,13 @@ following records can represent a single .Xr open 2 for R/W, -or two seperate +or two separate .Xr open 2 calls, one for .Ql R and one for .Ql W . +Note that only successful system calls are captured. .Sh IOCTLS User mode programs communicate with the .Nm @@ -168,7 +169,8 @@ buffer contents to it. .Sh SEE ALSO .Xr dtrace 1 , .Xr ktrace 1 , -.Xr truss 1 +.Xr truss 1 , +.Xr ioctl 2 .Sh HISTORY A .Nm ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236637 - head/share/man/man4
Author: obrien Date: Tue Jun 5 20:32:38 2012 New Revision: 236637 URL: http://svn.freebsd.org/changeset/base/236637 Log: mdoc police. Submitted by: ru Much thanks to: ru Modified: head/share/man/man4/filemon.4 Modified: head/share/man/man4/filemon.4 == --- head/share/man/man4/filemon.4 Tue Jun 5 20:27:41 2012 (r236636) +++ head/share/man/man4/filemon.4 Tue Jun 5 20:32:38 2012 (r236637) @@ -50,64 +50,70 @@ responds to two calls. .Pp System calls are denoted using the following single letters: +.Pp .Bl -tag -width indent -compact -.It Dq Li C +.It Ql C .Xr chdir 2 -.It Dq Li D +.It Ql D .Xr unlink 2 -.It Dq Li E +.It Ql E .Xr exec 2 -.It Dq Li F +.It Ql F .Xr fork 2 , .Xr vfork 2 -.It Dq Li L +.It Ql L .Xr link 2 , .Xr linkat 2 , .Xr symlink 2 , .Xr symlinkat 2 -.It Dq Li M +.It Ql M .Xr rename 2 -.It Dq Li R +.It Ql R .Xr open 2 for read -.It Dq Li S +.It Ql S .Xr stat 2 -.It Dq Li W +.It Ql W .Xr open 2 for write -.It Dq Li X +.It Ql X .Xr _exit 2 .El .Pp Note that -.Dq R +.Ql R following -.Dq W +.Ql W records can represent a single .Xr open 2 for R/W, or two seperate .Xr open 2 calls, one for -R +.Ql R and one for -W. +.Ql W . .Sh IOCTLS User mode programs communicate with the -.Nm filemon -driver through a -number of ioctls which are described below. +.Nm +driver through a number of ioctls which are described below. Each takes a single argument. -.Bl -tag -width FILEMON_SET_PID +.Bl -tag -width ".Dv FILEMON_SET_PID" .It Dv FILEMON_SET_FD Write the internal tracing buffer to the supplied open file descriptor. .It Dv FILEMON_SET_PID Child process ID to trace. .El .Sh RETURN VALUES -The ioctl returns zero on success and non-zero on failure. +.\" .Rv -std ioctl +The +.Fn ioctl +function returns the value 0 if successful; +otherwise the value \-1 is returned and the global variable +.Va errno +is set to indicate the error. .Sh FILES -.Bl -tag -width /dev/zero +.Bl -tag -width ".Pa /dev/filemon" .It Pa /dev/filemon .El .Sh EXAMPLES @@ -127,7 +133,7 @@ open_filemon(void) int fm_fd, fm_log; if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) - err(1, "open(\"/dev/filemon\", O_RDWR)"); + err(1, "open(\e"/dev/filemon\e", O_RDWR)"); if ((fm_log = open("filemon.out", O_CREAT | O_WRONLY | O_TRUNC, DEFFILEMODE)) == -1) err(1, "open(filemon.out)"); @@ -156,7 +162,9 @@ Creates a file named .Pa filemon.out and configures the .Nm -device to write the filemon buffer contents to it. +device to write the +.Nm +buffer contents to it. .Sh SEE ALSO .Xr dtrace 1 , .Xr ktrace 1 , ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236623 - head/share/man/man4
Author: obrien Date: Tue Jun 5 17:49:11 2012 New Revision: 236623 URL: http://svn.freebsd.org/changeset/base/236623 Log: RAID is an acronym. Modified: head/share/man/man4/mpt.4 Modified: head/share/man/man4/mpt.4 == --- head/share/man/man4/mpt.4 Tue Jun 5 17:46:50 2012(r236622) +++ head/share/man/man4/mpt.4 Tue Jun 5 17:49:11 2012(r236623) @@ -124,15 +124,15 @@ Dell PowerEdge 1750 thru 2850 IBM eServer xSeries 335 .El .Pp -These systems also contain Integrated Raid Mirroring and Integrated -Raid Mirroring Enhanced which this driver also supports. +These systems also contain Integrated RAID Mirroring and Integrated +RAID Mirroring Enhanced which this driver also supports. .Pp The .Tn SAS controller chips are also present on many new AMD/Opteron based systems, like the Sun 4100. Note that this controller can drive both SAS and SATA -drives or a mix of them at the same time. The Integrated Raid Mirroring +drives or a mix of them at the same time. The Integrated RAID Mirroring available for these controllers is poorly supported at best. .Pp The ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236621 - head/sys/modules
Author: obrien Date: Tue Jun 5 17:44:54 2012 New Revision: 236621 URL: http://svn.freebsd.org/changeset/base/236621 Log: Only build filemon(4) on x86. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Tue Jun 5 17:36:28 2012(r236620) +++ head/sys/modules/Makefile Tue Jun 5 17:44:54 2012(r236621) @@ -5,7 +5,8 @@ # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). -SUBDIR=${_3dfx} \ +SUBDIR=\ + ${_3dfx} \ ${_3dfx_linux} \ ${_aac} \ accf_data \ @@ -358,9 +359,12 @@ SUBDIR=${_3dfx} \ ${_zfs} \ zlib \ +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_filemon= filemon +.endif + .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" -_filemon= filemon _syscons= syscons _vpo= vpo .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236620 - in head: share/man/man4 tools/regression/filemon
Author: obrien Date: Tue Jun 5 17:36:28 2012 New Revision: 236620 URL: http://svn.freebsd.org/changeset/base/236620 Log: Correct examples to the latest version I had. Modified: head/share/man/man4/filemon.4 head/tools/regression/filemon/filemontest.c Modified: head/share/man/man4/filemon.4 == --- head/share/man/man4/filemon.4 Tue Jun 5 16:46:34 2012 (r236619) +++ head/share/man/man4/filemon.4 Tue Jun 5 17:36:28 2012 (r236620) @@ -127,18 +127,19 @@ open_filemon(void) O_CREAT | O_WRONLY | O_TRUNC, DEFFILEMODE)) == -1) err(1, "open(filemon.out)"); - if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) < 0) + if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1) err(1, "Cannot set filemon log file descriptor"); /* Set up these two fd's to close on exec. */ (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); if ((child = fork()) == 0) { + child = getpid(); + if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) + err(1, "Cannot set filemon PID"); /* Do something here. */ return 0; } else { - if (ioctl(fm_fd, FILEMON_SET_PID, &child) < 0) - err(1, "Cannot set filemon PID"); wait(&child); close(fm_fd); } Modified: head/tools/regression/filemon/filemontest.c == --- head/tools/regression/filemon/filemontest.c Tue Jun 5 16:46:34 2012 (r236619) +++ head/tools/regression/filemon/filemontest.c Tue Jun 5 17:36:28 2012 (r236620) @@ -54,22 +54,27 @@ main(void) { if ((fm_log = mkstemp(log_name)) == -1) err(1, "mkstemp(%s)", log_name); - if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) < 0) + if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1) err(1, "Cannot set filemon log file descriptor"); /* Set up these two fd's to close on exec. */ (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); - if ((child = fork()) == 0) { + switch (child = fork()) { + case 0: + child = getpid(); + if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) + err(1, "Cannot set filemon PID to %d", child); system("./test_script.sh"); - return 0; - } else { - if (ioctl(fm_fd, FILEMON_SET_PID, &child) < 0) - err(1, "Cannot set filemon PID"); + break; + case -1: + err(1, "Cannot fork"); + default: wait(&child); close(fm_fd); // printf("Results in %s\n", log_name); + break; } return 0; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"