MFhead@r325422

This commit is contained in:
Enji Cooper 2017-11-05 04:08:00 +00:00
commit 254d2760ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/runtime-coverage/; revision=325423
38 changed files with 2390 additions and 73 deletions

View File

@ -209,7 +209,7 @@ WANT_MAKE_VERSION= 20160604
# 20160220 - support .dinclude for FAST_DEPEND.
WANT_MAKE_VERSION= 20160220
.endif
MYMAKE= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}/${WANT_MAKE}
MYMAKE= ${OBJROOT}make.${MACHINE}/${WANT_MAKE}
.if defined(.PARSEDIR)
HAVE_MAKE= bmake
.else
@ -407,10 +407,13 @@ upgrade_checks: .PHONY
# headers, libraries and tools. Also, allow the location of
# the system bsdmake-like utility to be overridden.
#
MMAKEENV= MAKEOBJDIRPREFIX=${MYMAKE:H} \
MMAKEENV= \
DESTDIR= \
INSTALL="sh ${.CURDIR}/tools/install.sh"
MMAKE= ${MMAKEENV} ${MAKE} \
OBJTOP=${MYMAKE:H}/obj \
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
MAN= -DNO_SHARED \
-DNO_CPU_CFLAGS -DNO_WERROR \
-DNO_SUBDIR \

View File

@ -523,6 +523,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
BSARGS= DESTDIR= \
OBJTOP='${WORLDTMP}/obj-tools' \
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
BOOTSTRAPPING=${OSRELDATE} \
BWPHASE=${.TARGET:C,^_,,} \
SSP_CFLAGS= \
@ -566,6 +567,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} \
DESTDIR= \
OBJTOP='${WORLDTMP}/obj-kernel-tools' \
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
MK_COVERAGE=no MK_HTML=no -DNO_LINT MK_MAN=no \

View File

@ -108,8 +108,6 @@ LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \
# Yes, the flags are redundant.
LIBCOMPATWMAKEENV+= \
OBJTOP=${LIBCOMPAT_OBJTOP} \
OBJROOT='$${OBJTOP}/' \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \
SYSROOT=${LIBCOMPATTMP} \
@ -130,6 +128,9 @@ LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
-DNO_LINT \
MK_TESTS=no
LIBCOMPATWMAKE+= ${LIBCOMPATWMAKEENV} ${MAKE} ${LIBCOMPATWMAKEFLAGS} \
OBJTOP=${LIBCOMPAT_OBJTOP} \
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
MK_MAN=no MK_HTML=no
LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \
MK_TOOLCHAIN=no ${IMAKE_INSTALL} \
@ -186,9 +187,10 @@ build${libcompat}: .PHONY
${_+_}cd ${.CURDIR}/${_dir}; \
WORLDTMP=${WORLDTMP} \
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
${MAKE} SSP_CFLAGS= DESTDIR= \
OBJTOP=${LIBCOMPAT_OBJTOP} \
OBJROOT='$${OBJTOP}/' \
${MAKE} SSP_CFLAGS= DESTDIR= \
MAKEOBJDIRPREFIX= \
DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
build-tools
.endfor

View File

@ -38,6 +38,21 @@
# xargs -n1 | sort | uniq -d;
# done
# 20171104: libcap_random should be in /lib not in /usr/lib
OLD_LIBS+=usr/lib/libcap_random.so.0
# 20171104: Casper can work only as shared library
OLD_FILES+=usr/lib/libcasper.a
OLD_FILES+=usr/lib/libcasper_p.a
OLD_FILES+=usr/lib/libcap_dns.a
OLD_FILES+=usr/lib/libcap_dns_p.a
OLD_FILES+=usr/lib/libcap_grp.a
OLD_FILES+=usr/lib/libcap_grp_p.a
OLD_FILES+=usr/lib/libcap_pwd.a
OLD_FILES+=usr/lib/libcap_pwd_p.a
OLD_FILES+=usr/lib/libcap_random.a
OLD_FILES+=usr/lib/libcap_random_p.a
OLD_FILES+=usr/lib/libcap_sysctl.a
OLD_FILES+=usr/lib/libcap_sysctl_p.a
# 20171031: Removal of obsolete man files
OLD_FILES+=usr/share/man/man7/adding_user.7.gz
# 20171031: Disconnected libpathconv tests

View File

@ -427,7 +427,7 @@ std::error_code resize_file(int FD, uint64_t Size) {
// If we have posix_fallocate use it. Unlike ftruncate it always allocates
// space, so we get an error if the disk is full.
if (int Err = ::posix_fallocate(FD, 0, Size)) {
if (Err != EOPNOTSUPP)
if (Err != EINVAL && Err != EOPNOTSUPP)
return std::error_code(Err, std::generic_category());
}
#endif

View File

@ -1,6 +1,6 @@
# $FreeBSD$
FILES= include_ldap special_hosts special_media special_noauto special_null
FILES= include_ldap include_nis special_hosts special_media special_noauto special_null
NO_OBJ=
FILESDIR= /etc/autofs

180
etc/autofs/include_nis Normal file
View File

@ -0,0 +1,180 @@
#!/usr/bin/awk -f
#-
# Copyright (c) 2017 G. Paul Ziemba
# 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$
#
#
# /etc/autofs/include_nis
#
# automountd Directory Services script for NIS
#
# SYNOPSIS
# include_nis <mapname>
#
# include_nis <mapname> <key>
#
# DESCRIPTION
#
# This script provides a Directory Services map for automountd
# based on NIS. Please see auto_master(5) for general information.
#
# The first form, with one argument, emits the entire named NIS map.
# The second form, with two arguments, emits the map entry for the
# key given in the second argument.
#
# This script attempts to determine the names and IP addresses
# of the local host. Map entries matching the local host are
# rewritten to specify nullfs mounts (instead of the default
# NFS) to reduce access overhead in the kernel.
#
# If a map entry contains multiple location fields, it is not changed.
#
# Populate list of names and IP addrs thet mean "this host"
# into myhostnames array
BEGIN {
#
# Set self hostnames
#
"hostname -s" | getline;
myhostnames[$0] = 1;
"hostname -f" | getline;
myhostnames[$0] = 1;
myhostnames["localhost"] = 1
"hostname -f" | getline;
localdomain=$0
myhostnames["localhost."localdomain] = 1
while ("ifconfig" | getline) {
if ($1 == "inet") {
myhostnames[$2] = 1;
}
}
# debug
# print "--- hostname list start ----"
# for (i in myhostnames) {
# print i
# }
# print "--- hostname list end ----"
if (ARGC == 2) {
# mapname only
while ("ypcat -k " ARGV[1] | getline) {
proc_mapline(1)
}
}
if (ARGC == 3) {
# mapname and keyname
while ("ypmatch " ARGV[2] " " ARGV[1] | getline) {
proc_mapline(0)
}
}
exit 0
}
function is_self(hostname)
{
if (myhostnames[hostname]) {
return 1
}
return 0
}
#
# Lines are of the form [key] [-opts] location1 [... locationN]
#
# indicate index of key field with first positional parameter
# 1 means keyfield is the first field
# 0 means keyfield is not present
#
function proc_mapline(keyfield)
{
optionsfield = 0
locationfield = 0
locationcount = 0
for (i=keyfield+1; i <= NF; ++i) {
if (!optionsfield) {
if ($i ~ /^-/) {
# the first options field found on the line
optionsfield = i;
continue
}
}
# Assumption: location contains colon (":")
if (optionsfield && ($i ~ /:/) && ($i !~ /^-/)) {
++locationcount
if (!locationfield) {
# the first location field found on the line
locationfield = i
}
}
}
#
# If location not found, do not modify.
#
# If there is more than one location, do not modify. Rationale:
# Options are applied to all locations. We ca not have "nullfs"
# for only some locations and "nfs" for others for a given
# map key (i.e., a line). The usual reason for multiple
# locations is for redundancy using replicated volumes on
# multiple hosts, so multiple hosts imply fstype=nfs (the
# FreeBSD default for automounter maps).
#
# Hypothetically there could be a map entry with multiple
# locations all with host parts matching "me". In that case,
# it would be safe to rewrite the locations and specify
# nullfs, but the code does not handle this case.
#
if (locationcount == 1) {
#
# We have a line with exactly one location field
#
# Assumption: location has no more than one colon (":")
#
n=split($locationfield,location,":")
if (is_self(location[1])) {
$locationfield = ":" location[2]
if (optionsfield) {
# append to existing options
$optionsfield = $optionsfield ",fstype=nullfs"
} else {
# sneak in ahead of location
$locationfield = "-fstype=nullfs " $locationfield
}
}
}
print
}

View File

@ -5,6 +5,7 @@
# PROVIDE: automount
# REQUIRE: nfsclient automountd
# BEFORE: DAEMON
# KEYWORD: nojail shutdown
. /etc/rc.subr

View File

@ -4,7 +4,8 @@
#
# PROVIDE: automountd
# REQUIRE: DAEMON
# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig
# BEFORE: DAEMON
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -4,7 +4,8 @@
#
# PROVIDE: autounmountd
# REQUIRE: DAEMON
# REQUIRE: FILESYSTEMS
# BEFORE: DAEMON
# KEYWORD: nojail
. /etc/rc.subr

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 13, 2014
.Dd November 4, 2017
.Dt QUICK_EXIT 3
.Os
.Sh NAME
@ -44,6 +44,17 @@ with
.Xr at_quick_exit 3
but not any C++ destructors or cleanup code registered with
.Xr atexit 3 .
The
.Xr stdio 3
file buffers are not flushed.
.Pp
The function
.Fn quick_exit
is
.Em async-signal safe
when the functions registered with
.Xr at_quick_exit 3
are.
.Sh RETURN VALUES
The
.Fn quick_exit

View File

@ -26,6 +26,8 @@
* $FreeBSD$
*/
#include <sys/types.h>
#include <machine/atomic.h>
#include <stdlib.h>
#include <pthread.h>
@ -60,6 +62,7 @@ at_quick_exit(void (*func)(void))
h->cleanup = func;
pthread_mutex_lock(&atexit_mutex);
h->next = handlers;
__compiler_membar();
handlers = h;
pthread_mutex_unlock(&atexit_mutex);
return (0);
@ -74,7 +77,9 @@ quick_exit(int status)
* XXX: The C++ spec requires us to call std::terminate if there is an
* exception here.
*/
for (h = handlers; NULL != h; h = h->next)
for (h = handlers; NULL != h; h = h->next) {
__compiler_membar();
h->cleanup();
}
_Exit(status);
}

View File

@ -28,7 +28,7 @@
.\" @(#)open.2 8.2 (Berkeley) 11/16/93
.\" $FreeBSD$
.\"
.Dd October 12, 2017
.Dd November 4, 2017
.Dt POSIX_FALLOCATE 2
.Os
.Sh NAME
@ -106,9 +106,10 @@ A signal was caught during execution.
.It Bq Er EINVAL
The
.Fa len
argument was less than or equal to zero or the
argument was less than or equal to zero, the
.Fa offset
argument was less than zero.
argument was less than zero,
or the operation is not supported by the file system.
.It Bq Er EIO
An I/O error occurred while reading from or writing to a file system.
.It Bq Er ENODEV

View File

@ -1,14 +1,14 @@
# $FreeBSD$
SHLIBDIR?= /lib
.include <src.opts.mk>
PACKAGE=${LIB}
SHLIB_MAJOR= 0
SHLIBDIR?= /lib
.if ${MK_CASPER} != "no"
LIB= casper
SHLIB= casper
SHLIB_MAJOR= 0
SRCS= libcasper.c
SRCS+= libcasper_impl.c

View File

@ -10,7 +10,7 @@ SHLIB_MAJOR= 0
INCSDIR?= ${INCLUDEDIR}/casper
.if ${MK_CASPER} != "no"
LIB= cap_dns
SHLIB= cap_dns
SRCS= cap_dns.c
.endif

View File

@ -10,7 +10,7 @@ SHLIB_MAJOR= 0
INCSDIR?= ${INCLUDEDIR}/casper
.if ${MK_CASPER} != "no"
LIB= cap_grp
SHLIB= cap_grp
SRCS= cap_grp.c
.endif

View File

@ -10,7 +10,7 @@ SHLIB_MAJOR= 0
INCSDIR?= ${INCLUDEDIR}/casper
.if ${MK_CASPER} != "no"
LIB= cap_pwd
SHLIB= cap_pwd
SRCS= cap_pwd.c
.endif

View File

@ -1,15 +1,16 @@
# $FreeBSD$
SHLIBDIR?= /lib/casper
.include <src.opts.mk>
PACKAGE=libcasper
SHLIB_MAJOR= 0
SHLIBDIR?= /lib/casper
INCSDIR?= ${INCLUDEDIR}/casper
.if ${MK_CASPER} != "no"
LIB= cap_random
SHLIB= cap_random
SRCS= cap_random.c
.endif

View File

@ -10,7 +10,7 @@ SHLIB_MAJOR= 0
INCSDIR?= ${INCLUDEDIR}/casper
.if ${MK_CASPER} != "no"
LIB= cap_sysctl
SHLIB= cap_sysctl
SRCS= cap_sysctl.c
.endif

View File

@ -760,7 +760,8 @@ MLINKS+=devstat.9 devicestat.9 \
devstat.9 devstat_end_transaction.9 \
devstat.9 devstat_remove_entry.9 \
devstat.9 devstat_start_transaction.9
MLINKS+=disk.9 disk_alloc.9 \
MLINKS+=disk.9 disk_add_alias.9 \
disk.9 disk_alloc.9 \
disk.9 disk_create.9 \
disk.9 disk_destroy.9 \
disk.9 disk_gone.9 \

View File

@ -61,11 +61,17 @@ __objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMASK:U002}; \
.endif
# This causes make to use the specified directory as .OBJDIR
.OBJDIR: ${__objdir}
.if ${.OBJDIR:tA} != ${__objdir:tA} && ${__objdir_made:Uno:M${__objdir}/*} != ""
.if ${.OBJDIR:tA} != ${__objdir:tA}
# we did not get what we want - do we care?
.if ${__objdir_made:Uno:M${__objdir}/*} != ""
# watch out for __objdir being relative path
.if !(${__objdir:M/*} == "" && ${.OBJDIR:tA} == ${${.CURDIR}/${__objdir}:L:tA})
.error could not use ${__objdir}: .OBJDIR=${.OBJDIR}
.endif
.endif
# apparently we can live with it
# make sure we know what we have
.OBJDIR: ${.CURDIR}
.endif
.endif
.endif

View File

@ -327,6 +327,10 @@ cleandepend:
.endif
.ORDER: cleandepend all
.ORDER: cleandepend depend
.if ${MK_AUTO_OBJ} == "yes"
.ORDER: cleanobj depend
.ORDER: cleandir depend
.endif
.if !target(checkdpadd) && (defined(DPADD) || defined(LDADD))
_LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g}

View File

@ -10,6 +10,14 @@
__<bsd.init.mk>__:
.include <bsd.opts.mk>
.-include "local.init.mk"
.if ${MK_AUTO_OBJ} == "yes"
# This is also done in bsd.obj.mk
.if defined(NO_OBJ)
.OBJDIR: ${.CURDIR}
.endif
.endif
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
.endif
@ -56,7 +64,8 @@ _SKIP_BUILD= not building at level 0
${.TARGETS:M*install*} == ${.TARGETS} || \
${.TARGETS:Mclean*} == ${.TARGETS} || \
${.TARGETS:Mdestroy*} == ${.TARGETS} || \
make(obj) || make(analyze) || make(print-dir)
${.TARGETS:Mobj} == ${.TARGETS} || \
make(analyze) || make(print-dir)
# Skip building, but don't show a warning.
_SKIP_BUILD=
.endif

View File

@ -47,6 +47,7 @@ __<bsd.obj.mk>__:
objwarn:
obj:
CANONICALOBJDIR= ${.OBJDIR}
# This is also done in bsd.init.mk
.if defined(NO_OBJ)
# but this makefile does not want it!
.OBJDIR: ${.CURDIR}
@ -84,6 +85,11 @@ OBJTOP?= ${MAKEOBJDIR}
CANONICALOBJDIR:=/usr/obj${.CURDIR}
.endif
.if defined(SRCTOP) && \
(${CANONICALOBJDIR} == /${RELDIR} || ${.OBJDIR} == /${RELDIR})
.error .OBJDIR incorrectly set to /${RELDIR}
.endif
OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
#
@ -158,7 +164,8 @@ whereobj:
.endif
# Same check in bsd.progs.mk
.if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/)
.if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/) && \
(${MK_AUTO_OBJ} == "no" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} == "")
cleanobj:
-rm -rf ${CANONICALOBJDIR}
.else
@ -182,6 +189,10 @@ clean:
.endif
.endif
.ORDER: clean all
.if ${MK_AUTO_OBJ} == "yes"
.ORDER: cleanobj all
.ORDER: cleandir all
.endif
.include <bsd.subdir.mk>

View File

@ -77,13 +77,6 @@ OBJTOP:= ${OBJROOT}${TARGET:D${TARGET}.${TARGET_ARCH}:U${MACHINE}.${MACHINE_ARCH
OBJTOP:= ${OBJROOT:H}
.endif # ${MK_UNIFIED_OBJDIR} == "yes"
# Wait to validate MAKEOBJDIR until OBJTOP is set.
.if defined(MAKEOBJDIR)
.if ${MAKEOBJDIR:M/*} == ""
.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}'
.endif
.endif
# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone
# for DIRDEPS_BUILD which really wants to know the absolute top at
# all times. This intenionally comes after adding TARGET.TARGET_ARCH
@ -94,9 +87,24 @@ OBJTOP:= ${MAKEOBJDIRPREFIX}${SRCTOP}
OBJROOT:= ${OBJTOP}/
.endif
# Try to enable MK_AUTO_OBJ by default if we can write to the OBJROOT. Only
# do this if AUTO_OBJ is not disabled by the user, not cleaning, and this
# is the first make ran.
# Wait to validate MAKEOBJDIR until OBJTOP is set.
.if defined(MAKEOBJDIR)
.if ${MAKEOBJDIR:M/*} == ""
.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}'
.endif
.endif
# __objdir is the expected .OBJDIR we want to use and that auto.obj.mk will
# try to create.
.if !empty(MAKEOBJDIRPREFIX)
__objdir:= ${MAKEOBJDIRPREFIX}${.CURDIR}
.elif !empty(MAKEOBJDIR)
__objdir:= ${MAKEOBJDIR}
.endif
# Try to enable MK_AUTO_OBJ by default if we can write to the __objdir. Only
# do this if AUTO_OBJ is not disabled by the user, not cleaning, and this is
# the first make ran.
.if 0 && ${.MAKE.LEVEL} == 0 && \
${MK_AUTO_OBJ} == "no" && empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) && \
!defined(WITHOUT_AUTO_OBJ) && !make(showconfig) && !make(print-dir) && \
@ -138,15 +146,13 @@ CheckAutoObj() { \
echo no; \
fi; \
}
.if !empty(MAKEOBJDIRPREFIX)
WANTED_OBJDIR= ${MAKEOBJDIRPREFIX}${.CURDIR}
.else
WANTED_OBJDIR= ${MAKEOBJDIR}
.if !empty(__objdir)
__objdir_writable!= \
${CheckAutoObj}; CheckAutoObj "${__objdir}" || echo no
.endif
OBJDIR_WRITABLE!= \
${CheckAutoObj}; CheckAutoObj "${WANTED_OBJDIR}" || echo no
__objdir_writable?= no
# Export the decision to sub-makes.
MK_AUTO_OBJ:= ${OBJDIR_WRITABLE}
MK_AUTO_OBJ:= ${__objdir_writable}
.export MK_AUTO_OBJ
.elif make(showconfig)
# Need to export for showconfig internally running make -dg1. It is enabled
@ -154,14 +160,11 @@ MK_AUTO_OBJ:= ${OBJDIR_WRITABLE}
.export MK_AUTO_OBJ
.endif # ${MK_AUTO_OBJ} == "no" && ...
# Assign this directory as .OBJDIR if possible after determining if AUTO_OBJ
# can be enabled by default.
.if ${MK_AUTO_OBJ} == "no"
# Assign this directory as .OBJDIR if possible.
#
# The expected OBJDIR already exists, set it as .OBJDIR.
.if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}${.CURDIR})
.OBJDIR: ${MAKEOBJDIRPREFIX}${.CURDIR}
.elif exists(${MAKEOBJDIR})
.OBJDIR: ${MAKEOBJDIR}
.if !empty(__objdir) && exists(${__objdir})
.OBJDIR: ${__objdir}
# Special case to work around bmake bug. If the top-level .OBJDIR does not yet
# exist and MAKEOBJDIR is passed into environment and yield a blank value,
# bmake will incorrectly set .OBJDIR=${SRCTOP}/ rather than the expected
@ -169,5 +172,10 @@ MK_AUTO_OBJ:= ${OBJDIR_WRITABLE}
.elif ${MAKE_VERSION} <= 20170720 && \
${.CURDIR} == ${SRCTOP} && ${.OBJDIR} == ${SRCTOP}/
.OBJDIR: ${.CURDIR}
.else
# The OBJDIR we wanted does not yet exist, ensure we default to safe .CURDIR
# in case make started with a bogus MAKEOBJDIR, that expanded before OBJTOP
# was set, that happened to match some unexpected directory. Either
# auto.obj.mk or bsd.obj.mk will create the directory and fix .OBJDIR later.
.OBJDIR: ${.CURDIR}
.endif
.endif # ${MK_AUTO_OBJ} == "no"

View File

@ -79,11 +79,11 @@ Kyuafile: Makefile
KYUA= ${LOCALBASE}/bin/kyua
MAKE_CHECK_SANDBOX_DIR= ${.OBJDIR}/checkdir
MAKE_CHECK_SANDBOX_DIR= checkdir
CLEANDIRS+= ${MAKE_CHECK_SANDBOX_DIR}
.if ${MK_MAKE_CHECK_USE_SANDBOX} != "no" && make(check)
DESTDIR:= ${MAKE_CHECK_SANDBOX_DIR}
DESTDIR:= ${.OBJDIR}/${MAKE_CHECK_SANDBOX_DIR}
.if ${MK_MAKE_CHECK_TEST_WITH_COVERAGE} != "no"
GCOV?= gcov

View File

@ -125,12 +125,6 @@ NO_META_IGNORE_HOST_HEADERS= 1
# is not expected.
.if !make(showconfig) && !make(print-dir)
.sinclude <auto.obj.mk>
# The .OBJDIR was not set, disable MK_AUTO_OBJ so downstream checks won't
# assume .OBJDIR is proper.
.if defined(__objdir) && ${.OBJDIR} != ${__objdir}
.MAKEOVERRIDES+= MK_AUTO_OBJ
MK_AUTO_OBJ= no
.endif
.endif
.endif # ${MK_AUTO_OBJ} == "yes"
.else # bmake

View File

@ -81,7 +81,6 @@ ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
ASSYM(TD_PFLAGS, offsetof(struct thread, td_pflags));
ASSYM(TD_PROC, offsetof(struct thread, td_proc));
ASSYM(TD_TID, offsetof(struct thread, td_tid));
ASSYM(TD_FRAME, offsetof(struct thread, td_frame));
ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);

View File

@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$");
#define TX_SKIP(n, o) (((n) + (o)) & (TX_DESC_COUNT - 1))
#define RX_NEXT(n) (((n) + 1) & (RX_DESC_COUNT - 1))
#define TX_MAX_SEGS 10
#define TX_MAX_SEGS 20
#define SOFT_RST_RETRY 1000
#define MII_BUSY_RETRY 1000
@ -192,6 +192,7 @@ struct awg_softc {
struct resource *res[_RES_NITEMS];
struct mtx mtx;
if_t ifp;
device_t dev;
device_t miibus;
struct callout stat_ch;
struct task link_task;
@ -421,14 +422,18 @@ awg_setup_txbuf(struct awg_softc *sc, int index, struct mbuf **mp)
sc->tx.buf_map[index].map, m, segs, &nsegs, BUS_DMA_NOWAIT);
if (error == EFBIG) {
m = m_collapse(m, M_NOWAIT, TX_MAX_SEGS);
if (m == NULL)
if (m == NULL) {
device_printf(sc->dev, "awg_setup_txbuf: m_collapse failed\n");
return (0);
}
*mp = m;
error = bus_dmamap_load_mbuf_sg(sc->tx.buf_tag,
sc->tx.buf_map[index].map, m, segs, &nsegs, BUS_DMA_NOWAIT);
}
if (error != 0)
if (error != 0) {
device_printf(sc->dev, "awg_setup_txbuf: bus_dmamap_load_mbuf_sg failed\n");
return (0);
}
bus_dmamap_sync(sc->tx.buf_tag, sc->tx.buf_map[index].map,
BUS_DMASYNC_PREWRITE);
@ -1613,6 +1618,7 @@ awg_attach(device_t dev)
int error;
sc = device_get_softc(dev);
sc->dev = dev;
sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
node = ofw_bus_get_node(dev);

View File

@ -141,6 +141,7 @@ powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt
powerpc/mpc85xx/ds1553_core.c optional ds1553
powerpc/mpc85xx/fsl_diu.c optional mpc85xx diu
powerpc/mpc85xx/fsl_espi.c optional mpc85xx spibus
powerpc/mpc85xx/fsl_sata.c optional mpc85xx ata
powerpc/mpc85xx/i2c.c optional iicbus fdt
powerpc/mpc85xx/isa.c optional mpc85xx isa
powerpc/mpc85xx/lbc.c optional mpc85xx

View File

@ -88,7 +88,6 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
ASSYM(TD_PFLAGS, offsetof(struct thread, td_pflags));
ASSYM(TD_PROC, offsetof(struct thread, td_proc));
ASSYM(TD_MD, offsetof(struct thread, td_md));
ASSYM(TD_TID, offsetof(struct thread, td_tid));
ASSYM(TDP_CALLCHAIN, TDP_CALLCHAIN);

View File

@ -258,7 +258,6 @@ sw1:
movl %eax,(%esp)
movl %edx, PCPU(CURPCB)
movl TD_TID(%ecx),%eax
movl %ecx, PCPU(CURTHREAD) /* into next thread */
/*

View File

@ -97,8 +97,7 @@ CTASSERT(MAXSHELLCMDLEN >= MAXINTERP + 3);
* 6.x branch on May 28, 2005 (matching __FreeBSD_version 600029).
*/
int
exec_shell_imgact(imgp)
struct image_params *imgp;
exec_shell_imgact(struct image_params *imgp)
{
const char *image_header = imgp->image_header;
const char *ihp, *interpb, *interpe, *maxp, *optb, *opte, *fname;
@ -125,7 +124,7 @@ exec_shell_imgact(imgp)
* However, we don't know how far into the page the contents are
* valid -- the actual file might be much shorter than the page.
* So find out the file size.
*/
*/
error = VOP_GETATTR(imgp->vp, &vattr, imgp->proc->p_ucred);
if (error)
return (error);

View File

@ -1579,8 +1579,7 @@ umtx_pi_setowner(struct umtx_pi *pi, struct thread *owner)
uq_owner = owner->td_umtxq;
mtx_assert(&umtx_lock, MA_OWNED);
if (pi->pi_owner != NULL)
panic("pi_owner != NULL");
MPASS(pi->pi_owner == NULL);
pi->pi_owner = owner;
TAILQ_INSERT_TAIL(&uq_owner->uq_pi_contested, pi, pi_link);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,141 @@
/*-
* Copyright (c) 1998 - 2008 Søren Schmidt <sos@FreeBSD.org>
* Copyright (c) 2009-2012 Alexander Motin <mav@FreeBSD.org>
* Copyright (c) 2015-2016 Justin Hibbits <jhibbits@FreeBSD.org>
* 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,
* without modification, immediately at the beginning of the file.
* 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$
*/
/* ATA register defines */
#define ATA_FEATURE 1 /* (W) feature */
#define ATA_F_DMA 0x01 /* enable DMA */
#define ATA_F_OVL 0x02 /* enable overlap */
#define ATA_COUNT 2 /* (W) sector count */
#define ATA_SECTOR 3 /* (RW) sector # */
#define ATA_CYL_LSB 4 /* (RW) cylinder# LSB */
#define ATA_CYL_MSB 5 /* (RW) cylinder# MSB */
#define ATA_DRIVE 6 /* (W) Sector/Drive/Head */
#define ATA_D_LBA 0x40 /* use LBA addressing */
#define ATA_D_IBM 0xa0 /* 512 byte sectors, ECC */
#define ATA_COMMAND 7 /* (W) command */
#define ATA_ERROR 8 /* (R) error */
#define ATA_E_ILI 0x01 /* illegal length */
#define ATA_E_NM 0x02 /* no media */
#define ATA_E_ABORT 0x04 /* command aborted */
#define ATA_E_MCR 0x08 /* media change request */
#define ATA_E_IDNF 0x10 /* ID not found */
#define ATA_E_MC 0x20 /* media changed */
#define ATA_E_UNC 0x40 /* uncorrectable data */
#define ATA_E_ICRC 0x80 /* UDMA crc error */
#define ATA_E_ATAPI_SENSE_MASK 0xf0 /* ATAPI sense key mask */
#define ATA_IREASON 9 /* (R) interrupt reason */
#define ATA_I_CMD 0x01 /* cmd (1) | data (0) */
#define ATA_I_IN 0x02 /* read (1) | write (0) */
#define ATA_I_RELEASE 0x04 /* released bus (1) */
#define ATA_I_TAGMASK 0xf8 /* tag mask */
#define ATA_STATUS 10 /* (R) status */
#define ATA_ALTSTAT 11 /* (R) alternate status */
#define ATA_S_ERROR 0x01 /* error */
#define ATA_S_INDEX 0x02 /* index */
#define ATA_S_CORR 0x04 /* data corrected */
#define ATA_S_DRQ 0x08 /* data request */
#define ATA_S_DSC 0x10 /* drive seek completed */
#define ATA_S_SERVICE 0x10 /* drive needs service */
#define ATA_S_DWF 0x20 /* drive write fault */
#define ATA_S_DMA 0x20 /* DMA ready */
#define ATA_S_READY 0x40 /* drive ready */
#define ATA_S_BUSY 0x80 /* busy */
#define ATA_CONTROL 12 /* (W) control */
#define ATA_A_IDS 0x02 /* disable interrupts */
#define ATA_A_RESET 0x04 /* RESET controller */
#define ATA_A_4BIT 0x08 /* 4 head bits */
#define ATA_A_HOB 0x80 /* High Order Byte enable */
/* SATA register defines */
#define ATA_SSTATUS 13
#define ATA_SS_DET_MASK 0x0000000f
#define ATA_SS_DET_NO_DEVICE 0x00000000
#define ATA_SS_DET_DEV_PRESENT 0x00000001
#define ATA_SS_DET_PHY_ONLINE 0x00000003
#define ATA_SS_DET_PHY_OFFLINE 0x00000004
#define ATA_SS_SPD_MASK 0x000000f0
#define ATA_SS_SPD_NO_SPEED 0x00000000
#define ATA_SS_SPD_GEN1 0x00000010
#define ATA_SS_SPD_GEN2 0x00000020
#define ATA_SS_SPD_GEN3 0x00000030
#define ATA_SS_IPM_MASK 0x00000f00
#define ATA_SS_IPM_NO_DEVICE 0x00000000
#define ATA_SS_IPM_ACTIVE 0x00000100
#define ATA_SS_IPM_PARTIAL 0x00000200
#define ATA_SS_IPM_SLUMBER 0x00000600
#define ATA_SS_IPM_DEVSLEEP 0x00000800
#define ATA_SERROR 14
#define ATA_SE_DATA_CORRECTED 0x00000001
#define ATA_SE_COMM_CORRECTED 0x00000002
#define ATA_SE_DATA_ERR 0x00000100
#define ATA_SE_COMM_ERR 0x00000200
#define ATA_SE_PROT_ERR 0x00000400
#define ATA_SE_HOST_ERR 0x00000800
#define ATA_SE_PHY_CHANGED 0x00010000
#define ATA_SE_PHY_IERROR 0x00020000
#define ATA_SE_COMM_WAKE 0x00040000
#define ATA_SE_DECODE_ERR 0x00080000
#define ATA_SE_PARITY_ERR 0x00100000
#define ATA_SE_CRC_ERR 0x00200000
#define ATA_SE_HANDSHAKE_ERR 0x00400000
#define ATA_SE_LINKSEQ_ERR 0x00800000
#define ATA_SE_TRANSPORT_ERR 0x01000000
#define ATA_SE_UNKNOWN_FIS 0x02000000
#define ATA_SE_EXCHANGED 0x04000000
#define ATA_SCONTROL 15
#define ATA_SC_DET_MASK 0x0000000f
#define ATA_SC_DET_IDLE 0x00000000
#define ATA_SC_DET_RESET 0x00000001
#define ATA_SC_DET_DISABLE 0x00000004
#define ATA_SC_SPD_MASK 0x000000f0
#define ATA_SC_SPD_NO_SPEED 0x00000000
#define ATA_SC_SPD_SPEED_GEN1 0x00000010
#define ATA_SC_SPD_SPEED_GEN2 0x00000020
#define ATA_SC_SPD_SPEED_GEN3 0x00000030
#define ATA_SC_IPM_MASK 0x00000f00
#define ATA_SC_IPM_NONE 0x00000000
#define ATA_SC_IPM_DIS_PARTIAL 0x00000100
#define ATA_SC_IPM_DIS_SLUMBER 0x00000200
#define ATA_SC_IPM_DIS_DEVSLEEP 0x00000400

View File

@ -36,6 +36,7 @@ OSRELDATE?= 0
BSARGS= DESTDIR= \
OBJTOP='${WORLDTMP}/obj-tools' \
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
BOOTSTRAPPING=${OSRELDATE} \
BWPHASE=${.TARGET} \
SSP_CFLAGS= \

View File

@ -435,7 +435,7 @@ login_chap(struct connection *conn, struct auth_group *ag)
* Yay, authentication succeeded!
*/
log_debugx("authentication succeeded for user \"%s\"; "
"transitioning to Negotiation Phase", auth->a_user);
"transitioning to operational parameter negotiation", auth->a_user);
login_send_chap_success(request, auth);
pdu_delete(request);