]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agolibvers and libsl are internal libraries
bapt [Tue, 25 Nov 2014 09:54:05 +0000 (09:54 +0000)]
libvers and libsl are internal libraries

9 years agoThe fallback flag in nsdispatch prevents the fallback implementation of
des [Tue, 25 Nov 2014 09:47:15 +0000 (09:47 +0000)]
The fallback flag in nsdispatch prevents the fallback implementation of
getgroupmembership() from invoking the correct backend in the compat case.
Replace it with a nesting depth counter so it only blocks one level (the
first is the group -> group_compat translation, the second is the actual
backend).  This is one of two bugs that break getgrouplist() in the compat
case, the second being that the backend's own getgroupmembership() method
is ignored.  Unfortunately, that is not easily fixable without a redesign
of our nss implementation (which is also needed to implement the +@group
syntax in /etc/passwd).

PR: 190055
MFC after: 1 week

9 years agoFix make depends with libnetbsd
bapt [Tue, 25 Nov 2014 07:47:44 +0000 (07:47 +0000)]
Fix make depends with libnetbsd

9 years agoAdd definitions of kerberos libraries
bapt [Tue, 25 Nov 2014 07:13:31 +0000 (07:13 +0000)]
Add definitions of kerberos libraries

9 years agoAdjust some checks missed in r274637, now that pi_rname can be NULL.
markj [Tue, 25 Nov 2014 07:01:38 +0000 (07:01 +0000)]
Adjust some checks missed in r274637, now that pi_rname can be NULL.

Additionally fix a misparenthesization in the same check, noticed while
fixing the first bug. This bug only appears to cause problems if the same
USDT probe appears twice within a static function.

X-MFC-With: r274637

9 years agoThe module load address always needs to be included when setting the dm_*_va
markj [Tue, 25 Nov 2014 06:43:17 +0000 (06:43 +0000)]
The module load address always needs to be included when setting the dm_*_va
fields of dt_module_t. Previously, this was only done on architectures where
kernel modules have type ET_REL; this change fixes that. As a result, symbol
name resolution in the stack() action now works properly for kernel modules
on i386.

Reported by: Shrikanth Kamath <shrikanth07@gmail.com>
Tested by: Shrikanth Kamath
Discussed with: avg
MFC after: 2 weeks

9 years agoAdd Apple Intrepid USB controller ID.
jhibbits [Tue, 25 Nov 2014 06:15:00 +0000 (06:15 +0000)]
Add Apple Intrepid USB controller ID.

MFC after: 2 weeks

9 years agoUse ctl_set_success() instead of direct inlining.
mav [Tue, 25 Nov 2014 06:11:05 +0000 (06:11 +0000)]
Use ctl_set_success() instead of direct inlining.

MFC after: 1 week

9 years agoRemove cokane@ from MAINTAINERS for 3dfx(4)/tdfx(4) because their email
ngie [Tue, 25 Nov 2014 05:25:12 +0000 (05:25 +0000)]
Remove cokane@ from MAINTAINERS for 3dfx(4)/tdfx(4) because their email
addresses on file bounce (see r252463 for more details)

Reviewed by: accounts (dhw)

9 years agoRevert r274772: it is not valid on MIPS
emaste [Tue, 25 Nov 2014 03:50:31 +0000 (03:50 +0000)]
Revert r274772: it is not valid on MIPS

Reported by: sbruno

9 years agoAdd missing headers needed by write().
kevlo [Tue, 25 Nov 2014 02:58:38 +0000 (02:58 +0000)]
Add missing headers needed by write().

9 years agoFix the fix
bapt [Tue, 25 Nov 2014 01:12:57 +0000 (01:12 +0000)]
Fix the fix

9 years agolibevent is an internallib
bapt [Tue, 25 Nov 2014 00:51:49 +0000 (00:51 +0000)]
libevent is an internallib

9 years agolibatf-c++ exposes libatf-c abi hence we need to explicit link to atf-c if
bapt [Tue, 25 Nov 2014 00:28:27 +0000 (00:28 +0000)]
libatf-c++ exposes libatf-c abi hence we need to explicit link to atf-c if
atf-c++ is requested

9 years agoDo not overwrite any LIBNETBSD or LIBNETBSDDIR if they are already defined
bapt [Tue, 25 Nov 2014 00:12:25 +0000 (00:12 +0000)]
Do not overwrite any LIBNETBSD or LIBNETBSDDIR if they are already defined

9 years agoFix build.
delphij [Tue, 25 Nov 2014 00:07:56 +0000 (00:07 +0000)]
Fix build.

9 years agoDefine special case for atf which libraries names are different from their
bapt [Tue, 25 Nov 2014 00:01:53 +0000 (00:01 +0000)]
Define special case for atf which libraries names are different from their
declaration

9 years agos/cft/ctf
bapt [Mon, 24 Nov 2014 23:58:04 +0000 (23:58 +0000)]
s/cft/ctf

9 years agoForgot to convert demandoc along with mandoc
bapt [Mon, 24 Nov 2014 23:29:56 +0000 (23:29 +0000)]
Forgot to convert demandoc along with mandoc

9 years agoFix typo
bapt [Mon, 24 Nov 2014 22:35:32 +0000 (22:35 +0000)]
Fix typo

9 years agoFix dependencies in case of building statically
bapt [Mon, 24 Nov 2014 22:32:18 +0000 (22:32 +0000)]
Fix dependencies in case of building statically

9 years agoAvoid code duplication by directly adding _INSTALLLIBS and _PRIVATELIBS into
bapt [Mon, 24 Nov 2014 22:29:16 +0000 (22:29 +0000)]
Avoid code duplication by directly adding _INSTALLLIBS and _PRIVATELIBS into
_LIBRARIES

Reported by: emaste

9 years agoEach time something links to sqlite3 it should link to pthread
bapt [Mon, 24 Nov 2014 22:17:35 +0000 (22:17 +0000)]
Each time something links to sqlite3 it should link to pthread

9 years agoConvert makefs to LIBADD
bapt [Mon, 24 Nov 2014 22:15:30 +0000 (22:15 +0000)]
Convert makefs to LIBADD

Add definition of libnetbsd in src.libnames.mk

9 years agoConvert mandoc to LIBADD
bapt [Mon, 24 Nov 2014 22:12:27 +0000 (22:12 +0000)]
Convert mandoc to LIBADD

While here remove the ugly LDMANDOC

9 years agoSkip L2 addresses lookups for p2p interfaces.
ae [Mon, 24 Nov 2014 21:51:43 +0000 (21:51 +0000)]
Skip L2 addresses lookups for p2p interfaces.

Discussed with: melifaro
Sponsored by: Yandex LLC

9 years agoImport libgpio.
rpaulo [Mon, 24 Nov 2014 21:49:40 +0000 (21:49 +0000)]
Import libgpio.

This is a thin wrapper around the kernel interface which should make
it easier to write GPIO applications.  gpioctl(8) will be converted to
use this library in a separate commit.

Differential Revision: https://reviews.freebsd.org/D1183
Reviewed by: adrian, loos
Discussed on: arm@, embedded@
Relnotes: yes

9 years agoConvert to LIBADD.
brd [Mon, 24 Nov 2014 21:49:01 +0000 (21:49 +0000)]
Convert to LIBADD.

Reviewed by: bapt

9 years agoCorrectly specify -L for internal and private libs
bapt [Mon, 24 Nov 2014 21:39:28 +0000 (21:39 +0000)]
Correctly specify -L for internal and private libs

9 years agoImplement LIBADD
bapt [Mon, 24 Nov 2014 21:31:08 +0000 (21:31 +0000)]
Implement LIBADD

LIBADD will automatically set DPADD and LDADD when needed including their
dependencies, LIBADD automatically handles private and internal libs so that
the end user Makefile does not have to care about it.

This allows to reduce overlinking on the base system leaving the framework get
the dependencies properly.

It also allows to built components binaries statically.

To use it:

Replace:
DPADD= ${LIBARCHIVE} ${LIBSSL}
LDADD= -larchive -lssl

by:
LIBADD= archive ssl

Differential Revision: https://reviews.freebsd.org/D1209
Reviewed by: brooks imp

9 years agoFor now, disable using -fsanitize=bounds for the libc ssp tests, when
dim [Mon, 24 Nov 2014 20:07:09 +0000 (20:07 +0000)]
For now, disable using -fsanitize=bounds for the libc ssp tests, when
using clang 3.5.0, until the runtime support (via compiler-rt) is added.
Otherwise, this would lead to link errors about missing support
libraries.

9 years agoAdd a bus_get_domain() wrapper around BUS_GET_DOMAIN(). Use this to add
jhb [Mon, 24 Nov 2014 19:55:45 +0000 (19:55 +0000)]
Add a bus_get_domain() wrapper around BUS_GET_DOMAIN().  Use this to add
a new per-device '%domain' sysctl node that returns the NUMA domain a
device is associated with if it is associated with one.

Note that this API is still a WIP and might change before 11.0 actually
ships.

Differential Revision: https://reviews.freebsd.org/D930
Reviewed by: kib, adrian

9 years agoProperly initialize the capability rights for vnodes exported to procstat
jhb [Mon, 24 Nov 2014 18:34:11 +0000 (18:34 +0000)]
Properly initialize the capability rights for vnodes exported to procstat
that aren't for file descriptors (cwd, jdir, tracevp, etc.).

Submitted by: Mikhail <mp@lenta.ru>

9 years agoAdd busdma sync ops before reading and after modifying the descriptor rings.
ian [Mon, 24 Nov 2014 16:12:11 +0000 (16:12 +0000)]
Add busdma sync ops before reading and after modifying the descriptor rings.

This was previously working by accident because BUSDMA_COHERENT_MEMORY has
always been set to strongly-ordered on arm.  Now we're moving towards
normal-uncacheable (what might be called write-combining on other platforms)
and using the proper sync ops will be more important.  Of course, that
opens the question of just what is the "proper" sync op for shared
concurrent dma access as opposed to accesses where the handoff of control
of the memory has well-defined sequence points that match the available
busdma sync operations.

9 years agoAdd a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap
philip [Mon, 24 Nov 2014 14:00:27 +0000 (14:00 +0000)]
Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap
should delete configured addresses and routes when the interface is
closed.  Default is enabled (preserve current behaviour).

MFC after: 1 week

9 years agoMake it possible to specify flags for autofs daemons in rc.conf.
trasz [Mon, 24 Nov 2014 13:02:39 +0000 (13:02 +0000)]
Make it possible to specify flags for autofs daemons in rc.conf.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd ip_gre.h to ObsoleteFiles.inc.
ae [Mon, 24 Nov 2014 12:53:56 +0000 (12:53 +0000)]
Add ip_gre.h to ObsoleteFiles.inc.

Sponsored by: Yandex LLC

9 years agoReplace home-grown CTL IO allocator with UMA.
mav [Mon, 24 Nov 2014 11:37:27 +0000 (11:37 +0000)]
Replace home-grown CTL IO allocator with UMA.

Old allocator created significant lock congestion protecting its lists
of preallocated I/Os, while UMA provides much better SMP scalability.
The downside of UMA is lack of reliable preallocation, that could guarantee
successful allocation in non-sleepable environments.  But careful code
review shown, that only CAM target frontend really has that requirement.
Fix that making that frontend preallocate and statically bind CTL I/O for
every ATIO/INOT it preallocates any way.  That allows to avoid allocations
in hot I/O path.  Other frontends either may sleep in allocation context
or can properly handle allocation errors.

On 40-core server with 6 ZVOL-backed LUNs and 7 iSCSI client connections
this change increases peak performance from ~700K to >1M IOPS!  Yay! :)

MFC after: 1 month
Sponsored by: iXsystems, Inc.

9 years agoLimit descriptors and enter capability mode.
brueffer [Mon, 24 Nov 2014 09:31:38 +0000 (09:31 +0000)]
Limit descriptors and enter capability mode.

Differential: D1009
Reviewed by: jonathan, pjd
MFC after: 2 weeks
Relnotes: yes

9 years agoRemove the pidfile clause from the ctl.conf example. Why do everyone
trasz [Mon, 24 Nov 2014 08:13:44 +0000 (08:13 +0000)]
Remove the pidfile clause from the ctl.conf example.  Why do everyone
just copy/paste this line into their configs, it's beyond me.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix rendering of manpages with mandoc(1)
bapt [Mon, 24 Nov 2014 08:13:21 +0000 (08:13 +0000)]
Fix rendering of manpages with mandoc(1)

9 years agoWe already have "int i" in this scope.
glebius [Mon, 24 Nov 2014 07:57:20 +0000 (07:57 +0000)]
We already have "int i" in this scope.

Submitted by: alc

9 years agoThe arm PJ4B cpu is armv7 architecture, not v6.
ian [Mon, 24 Nov 2014 01:13:58 +0000 (01:13 +0000)]
The arm PJ4B cpu is armv7 architecture, not v6.

If this feels like deja vu... the last time this was fixed in this file
only ARM_MMU_V6 was fixed, this time it's ARM_ARCH_V6 (and this time I
searched for other occurrances of pj4b in here).

9 years agoRead cs_outstanding_ctl_pdus before incrementing it for NEXUS RESET task.
mav [Mon, 24 Nov 2014 00:59:51 +0000 (00:59 +0000)]
Read cs_outstanding_ctl_pdus before incrementing it for NEXUS RESET task.

This removes extra log noise on idle connection termination.

MFC after: 1 week

9 years agoFix rendering with mandoc
bapt [Mon, 24 Nov 2014 00:34:49 +0000 (00:34 +0000)]
Fix rendering with mandoc

9 years agoAdd ARMV6 as an arm option. This will cause obscure magic in config(8)
ian [Mon, 24 Nov 2014 00:02:15 +0000 (00:02 +0000)]
Add ARMV6 as an arm option.  This will cause obscure magic in config(8)
to automatically set the armv6 option when MACHINE_ARCH is armv6.  That
allows replacing ever-growing lists of cpu names as options to compile
a given file with the using either "optional armv6" or "optional !armv6".

9 years agoFix the negation (!) operator so that it binds only to the word that
ian [Sun, 23 Nov 2014 23:58:47 +0000 (23:58 +0000)]
Fix the negation (!) operator so that it binds only to the word that
immediately follows it, which means 'not' has to be reset every time an
option word or device name is processed.

9 years agoFix rendering with mandoc
bapt [Sun, 23 Nov 2014 23:56:01 +0000 (23:56 +0000)]
Fix rendering with mandoc

9 years agoFix rendering with mandoc
bapt [Sun, 23 Nov 2014 23:55:04 +0000 (23:55 +0000)]
Fix rendering with mandoc

9 years agoTa is only allowed with Bl -column not in Bl -item
bapt [Sun, 23 Nov 2014 23:35:16 +0000 (23:35 +0000)]
Ta is only allowed with Bl -column not in Bl -item

9 years agoWorkaround help2man defficiency that prevents mandoc from rendering
bapt [Sun, 23 Nov 2014 23:17:18 +0000 (23:17 +0000)]
Workaround help2man defficiency that prevents mandoc from rendering

9 years agoChange the lower bound for guest vmspace allocation to 0 instead of
grehan [Sun, 23 Nov 2014 23:07:21 +0000 (23:07 +0000)]
Change the lower bound for guest vmspace allocation to 0 instead of
using the VM_MIN_ADDRESS constant.

HardenedBSD redefines VM_MIN_ADDRESS to be 64K, which results in
bhyve VM startup failing. Guest memory is always assumed to start
at 0 so use the absolute value instead.

Reported by: Shawn Webb, lattera at gmail com
Reviewed by: neel, grehan
Obtained from: Oliver Pinter via HardenedBSD
https://github.com/HardenedBSD/hardenedBSD/commit/23bd719ce1e3a8cc42fc8317b1c7c6d9e74dcba0
MFC after: 1 week

9 years agoInstall mdoc(7) and man(7) from mdoc instead of the one from groff
bapt [Sun, 23 Nov 2014 22:28:46 +0000 (22:28 +0000)]
Install mdoc(7) and man(7) from mdoc instead of the one from groff

9 years agoRegenerate the manpage in mdoc(7) format using pod2mdoc
bapt [Sun, 23 Nov 2014 22:16:43 +0000 (22:16 +0000)]
Regenerate the manpage in mdoc(7) format using pod2mdoc

Now mandoc can render the manpage properly

9 years agoCorrect the functions declaration.
br [Sun, 23 Nov 2014 22:09:05 +0000 (22:09 +0000)]
Correct the functions declaration.

9 years agoFix an error (case on a .Nm) preventing mandoc from rendering the manpage
bapt [Sun, 23 Nov 2014 22:01:43 +0000 (22:01 +0000)]
Fix an error (case on a .Nm) preventing mandoc from rendering the manpage
Fix mandoc warnings: extrat space at end of lines

9 years agoSquelch a (bogus) used before init warning when building with gcc.
ian [Sun, 23 Nov 2014 21:37:33 +0000 (21:37 +0000)]
Squelch a (bogus) used before init warning when building with gcc.

9 years agoMisc mdoc fixes:
joel [Sun, 23 Nov 2014 21:00:00 +0000 (21:00 +0000)]
Misc mdoc fixes:

- Remove superfluous paragraph macros.
- Remove/fix empty or incorrect macros.
- Sort sections into conventional order.
- Terminate quoted strings properly.
- Remove EOL whitespace.

9 years agoConsider the negation operator (!) to be a word even if it is not followed
ian [Sun, 23 Nov 2014 19:13:17 +0000 (19:13 +0000)]
Consider the negation operator (!) to be a word even if it is not followed
by whitespace.  This allows "optional !foo" which is what most programmers
are naturally going to tend to do as opposed to "optional ! foo".

9 years ago\n at end of panicstr is redundant.
glebius [Sun, 23 Nov 2014 18:32:21 +0000 (18:32 +0000)]
\n at end of panicstr is redundant.

Submitted by: alc

9 years agoFix the following -Werror warning from clang 3.5.0, while building the
dim [Sun, 23 Nov 2014 18:31:55 +0000 (18:31 +0000)]
Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, so the
subtraction expression is also unsigned, and calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by: adrian
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1212

9 years agoDon't use the synchronization endpoint unless referenced by the
hselasky [Sun, 23 Nov 2014 16:27:31 +0000 (16:27 +0000)]
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.

MFC after: 1 week

9 years agoMerge from projects/sendfile:
glebius [Sun, 23 Nov 2014 12:01:52 +0000 (12:01 +0000)]
Merge from projects/sendfile:

o Provide a new VOP_GETPAGES_ASYNC(), which works like VOP_GETPAGES(), but
  doesn't sleep. It returns immediately, and will execute the I/O done handler
  function that must be supplied as argument.
o Provide VOP_GETPAGES_ASYNC() for the FFS, which uses vnode_pager.
o Extend pagertab to support pgo_getpages_async method, and implement this
  method for vnode_pager.

Reviewed by: kib
Tested by: pho
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoDo not include buf.h.
glebius [Sun, 23 Nov 2014 10:26:28 +0000 (10:26 +0000)]
Do not include buf.h.

9 years agoifdef RACCT ui_racct_foreach and struct uidinfo's ui_racct
mjg [Sun, 23 Nov 2014 08:25:44 +0000 (08:25 +0000)]
ifdef RACCT ui_racct_foreach and struct uidinfo's ui_racct

Change racct_ create and destroy to macros evaluating to nothing without RACCT
so that their callers passing ui_racct don't have to be ifdefed.

9 years agobuf.h is not needed here, and pollutes when ufsmount.h is included
glebius [Sun, 23 Nov 2014 01:02:19 +0000 (01:02 +0000)]
buf.h is not needed here, and pollutes when ufsmount.h is included
from userland code.

Sponsored by: Nginx, Inc.

9 years agoInclude required files directly instead of pollution via ufs/ufsmount.h.
glebius [Sun, 23 Nov 2014 01:01:14 +0000 (01:01 +0000)]
Include required files directly instead of pollution via ufs/ufsmount.h.

Sponsored by: Nginx, Inc.

9 years agoFix comments
bapt [Sun, 23 Nov 2014 00:30:32 +0000 (00:30 +0000)]
Fix comments

9 years agofiledesc: plug a test for impossible condition in fgetvp_rights
mjg [Sun, 23 Nov 2014 00:12:27 +0000 (00:12 +0000)]
filedesc: plug a test for impossible condition in fgetvp_rights

9 years agoFix typo
bapt [Sun, 23 Nov 2014 00:08:43 +0000 (00:08 +0000)]
Fix typo

9 years agoChange man(1) to use mandoc to render manpages
bapt [Sun, 23 Nov 2014 00:08:04 +0000 (00:08 +0000)]
Change man(1) to use mandoc to render manpages

man(1) now first test the manpage to run with mandoc to make sure it can be
rendered.
In case groff cannot be found (because base has been built WITHOUT_GROFF) it
recommands to install groff from the packages

9 years agoFix the following -Werror warnings from clang 3.5.0, while building
dim [Sat, 22 Nov 2014 23:50:18 +0000 (23:50 +0000)]
Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module:

usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^~~
                          labs
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^~~
                            labs

Since tm::tm_gmtoff is a long, use labs(3) instead.

MFC after: 3 days

9 years agosh: Prepend "$0: " to error messages if there is no command name.
jilles [Sat, 22 Nov 2014 23:28:41 +0000 (23:28 +0000)]
sh: Prepend "$0: " to error messages if there is no command name.

9 years agoFix the following -Werror warnings from clang 3.5.0, while building
dim [Sat, 22 Nov 2014 23:04:33 +0000 (23:04 +0000)]
Fix the following -Werror warnings from clang 3.5.0, while building
usr.sbin/rtadvd:

usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^~~
usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^~~
2 errors generated.

These warnings occur because both preferred_time and pfx_pltimeexpire
are uint32_t's, so the subtraction expression is also unsigned, and
calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by: hrs
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1197

9 years agoLower warnings to fix build with gcc
bapt [Sat, 22 Nov 2014 22:13:00 +0000 (22:13 +0000)]
Lower warnings to fix build with gcc

9 years agoLower warning to allow building with gcc
bapt [Sat, 22 Nov 2014 22:11:35 +0000 (22:11 +0000)]
Lower warning to allow building with gcc

9 years agoAdd the demandoc utility from the mandoc project
bapt [Sat, 22 Nov 2014 21:11:17 +0000 (21:11 +0000)]
Add the demandoc utility from the mandoc project

This is a modern version of the deroff utility, useful for example to do
spellchecking on manpages

9 years agoDefine LIBSQLITE3 and LIBMANDOC
bapt [Sat, 22 Nov 2014 21:03:05 +0000 (21:03 +0000)]
Define LIBSQLITE3 and LIBMANDOC

9 years agoAdd the preconv utility from mandoc project
bapt [Sat, 22 Nov 2014 20:55:36 +0000 (20:55 +0000)]
Add the preconv utility from mandoc project

it recodes multibyte UNIX manual files into mandoc(1)

9 years agoRework mandoc Makefile to ease maintainance
bapt [Sat, 22 Nov 2014 20:48:21 +0000 (20:48 +0000)]
Rework mandoc Makefile to ease maintainance
Add compat_reallocarray into libmandoc given other mandoc components will use
it.

9 years agoRework makefile in something closer to upstream Makefile to ease maintainance
bapt [Sat, 22 Nov 2014 20:42:32 +0000 (20:42 +0000)]
Rework makefile in something closer to upstream Makefile to ease maintainance

9 years agoThere never was a PC Card joystick attachment that worked. Kill the
imp [Sat, 22 Nov 2014 20:31:20 +0000 (20:31 +0000)]
There never was a PC Card joystick attachment that worked. Kill the
current stub one until such time as one shows up.

9 years agoAdd missing bits svn merge did not catch
bapt [Sat, 22 Nov 2014 20:18:38 +0000 (20:18 +0000)]
Add missing bits svn merge did not catch

9 years agoForgot to update libmandoc
bapt [Sat, 22 Nov 2014 19:48:14 +0000 (19:48 +0000)]
Forgot to update libmandoc

9 years agoPromote SQLite3 as a privatelib as it will also be used by mandoc
bapt [Sat, 22 Nov 2014 19:44:49 +0000 (19:44 +0000)]
Promote SQLite3 as a privatelib as it will also be used by mandoc

While here ensure sqlite3 is using pread(2) and enable the suppot for FTS4

9 years agoUpdate sqlite3 to 3.8.7.2
bapt [Sat, 22 Nov 2014 19:18:08 +0000 (19:18 +0000)]
Update sqlite3 to 3.8.7.2

9 years agoAdd missing dependencies on pthread (sqlite being built with threadsafety on)
bapt [Sat, 22 Nov 2014 19:17:05 +0000 (19:17 +0000)]
Add missing dependencies on pthread (sqlite being built with threadsafety on)

9 years agoUpdate mandoc to 1.13.1
bapt [Sat, 22 Nov 2014 18:57:23 +0000 (18:57 +0000)]
Update mandoc to 1.13.1

9 years agoRetire old, transition code for managing the FreeBSD 5 -> 6 migration.
imp [Sat, 22 Nov 2014 18:40:14 +0000 (18:40 +0000)]
Retire old, transition code for managing the FreeBSD 5 -> 6 migration.

9 years agoThe size value should be asserted when it is known.
kib [Sat, 22 Nov 2014 18:15:02 +0000 (18:15 +0000)]
The size value should be asserted when it is known.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation

9 years agoImport mandoc 1.13.1
bapt [Sat, 22 Nov 2014 18:08:25 +0000 (18:08 +0000)]
Import mandoc 1.13.1

9 years agoBy the time that vm_reserv_init() runs, vm_phys_segs[] is initialized. Use
alc [Sat, 22 Nov 2014 17:46:30 +0000 (17:46 +0000)]
By the time that vm_reserv_init() runs, vm_phys_segs[] is initialized.  Use
it instead of phys_avail[].

Discussed with: Svatopluk Kraus

9 years agoFix the host mode ISOCHRONOUS transfer interval programming in the
hselasky [Sat, 22 Nov 2014 17:26:43 +0000 (17:26 +0000)]
Fix the host mode ISOCHRONOUS transfer interval programming in the
SAF1761 OTG driver. Currently the driver logic is very simple and
double buffering the USB transactions is not done.  Also you need to
use an external USB high speed USB HUB for reliable FULL speed
outgoing ISOCHRONOUS traffic, because the internal one chokes on
so-called split transfers above 188 bytes.

9 years agoImplement "automount -c".
trasz [Sat, 22 Nov 2014 16:48:29 +0000 (16:48 +0000)]
Implement "automount -c".

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoCross-reference autounmountd(8) from umount(8).
trasz [Sat, 22 Nov 2014 16:46:00 +0000 (16:46 +0000)]
Cross-reference autounmountd(8) from umount(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoCross-reference automount(8) from mount(8).
trasz [Sat, 22 Nov 2014 16:43:36 +0000 (16:43 +0000)]
Cross-reference automount(8) from mount(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAvoid undefined behaviour in gas's rotate_left() macro for n == 0.
dim [Sat, 22 Nov 2014 16:30:31 +0000 (16:30 +0000)]
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.

Obtained from: joerg at netbsd
MFC after: 3 days

9 years agosh: Use DQSYNTAX only while expanding, not SQSYNTAX.
jilles [Sat, 22 Nov 2014 16:03:18 +0000 (16:03 +0000)]
sh: Use DQSYNTAX only while expanding, not SQSYNTAX.

Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.

9 years agoFor both iSCSI initiator and target increase socket buffer sizes before
mav [Sat, 22 Nov 2014 15:09:18 +0000 (15:09 +0000)]
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.

This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.

MFC after: 1 week

9 years agoFix build with asr driver
smh [Sat, 22 Nov 2014 14:59:50 +0000 (14:59 +0000)]
Fix build with asr driver

This was broken by r274819 as asr is not in GENERIC because its not 64bit
safe.

MFC after: 1 month
X-MFC-With: r274819
Sponsored by: Multiplay