Commit Graph

194984 Commits

Author SHA1 Message Date
Gleb Smirnoff
03fcebe6a2 Do not include buf.h. 2014-11-23 10:26:28 +00:00
Mateusz Guzik
dff9862c0e 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.
2014-11-23 08:25:44 +00:00
Gleb Smirnoff
dbfd8ef2e4 buf.h is not needed here, and pollutes when ufsmount.h is included
from userland code.

Sponsored by:	Nginx, Inc.
2014-11-23 01:02:19 +00:00
Gleb Smirnoff
8c7f0b92b4 Include required files directly instead of pollution via ufs/ufsmount.h.
Sponsored by:	Nginx, Inc.
2014-11-23 01:01:14 +00:00
Baptiste Daroussin
b43edc06e6 Fix comments 2014-11-23 00:30:32 +00:00
Mateusz Guzik
0c0d16e8ac filedesc: plug a test for impossible condition in fgetvp_rights 2014-11-23 00:12:27 +00:00
Baptiste Daroussin
f17575acc9 Fix typo 2014-11-23 00:08:43 +00:00
Baptiste Daroussin
d6096801f1 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
2014-11-23 00:08:04 +00:00
Dimitry Andric
b9cfeb20f6 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
2014-11-22 23:50:18 +00:00
Jilles Tjoelker
fafeab4393 sh: Prepend "$0: " to error messages if there is no command name. 2014-11-22 23:28:41 +00:00
Dimitry Andric
f28c40aee0 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
2014-11-22 23:04:33 +00:00
Baptiste Daroussin
c3e5ebe1fc Lower warnings to fix build with gcc 2014-11-22 22:13:00 +00:00
Baptiste Daroussin
71bcdff764 Lower warning to allow building with gcc 2014-11-22 22:11:35 +00:00
Baptiste Daroussin
2421b90f47 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
2014-11-22 21:11:17 +00:00
Baptiste Daroussin
beb7fbfc0d Define LIBSQLITE3 and LIBMANDOC 2014-11-22 21:03:05 +00:00
Baptiste Daroussin
4357ec0f20 Add the preconv utility from mandoc project
it recodes multibyte UNIX manual files into mandoc(1)
2014-11-22 20:55:36 +00:00
Baptiste Daroussin
6cfe9d90da Rework mandoc Makefile to ease maintainance
Add compat_reallocarray into libmandoc given other mandoc components will use
it.
2014-11-22 20:48:21 +00:00
Baptiste Daroussin
6d7ad21f45 Rework makefile in something closer to upstream Makefile to ease maintainance 2014-11-22 20:42:32 +00:00
Warner Losh
4c52dc451b There never was a PC Card joystick attachment that worked. Kill the
current stub one until such time as one shows up.
2014-11-22 20:31:20 +00:00
Baptiste Daroussin
9baa4ecddb Add missing bits svn merge did not catch 2014-11-22 20:18:38 +00:00
Baptiste Daroussin
afbd1be57d Forgot to update libmandoc 2014-11-22 19:48:14 +00:00
Baptiste Daroussin
362492e53e 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
2014-11-22 19:44:49 +00:00
Baptiste Daroussin
912bdb4db7 Update sqlite3 to 3.8.7.2 2014-11-22 19:18:08 +00:00
Baptiste Daroussin
d08b6add14 Add missing dependencies on pthread (sqlite being built with threadsafety on) 2014-11-22 19:17:05 +00:00
Baptiste Daroussin
c7f18236d6 Import sqlite3 3.8.7.2 2014-11-22 19:09:54 +00:00
Baptiste Daroussin
6653664b44 Update mandoc to 1.13.1 2014-11-22 18:57:23 +00:00
Warner Losh
2f1c4b0c87 Retire old, transition code for managing the FreeBSD 5 -> 6 migration. 2014-11-22 18:40:14 +00:00
Konstantin Belousov
64779280c9 The size value should be asserted when it is known.
Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
2014-11-22 18:15:02 +00:00
Baptiste Daroussin
52c0e9552d Import mandoc 1.13.1 2014-11-22 18:08:25 +00:00
Alan Cox
09e5f3c4b8 By the time that vm_reserv_init() runs, vm_phys_segs[] is initialized. Use
it instead of phys_avail[].

Discussed with:	Svatopluk Kraus
2014-11-22 17:46:30 +00:00
Hans Petter Selasky
5ada1acc02 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.
2014-11-22 17:26:43 +00:00
Edward Tomasz Napierala
e3d5f1fe3b Implement "automount -c".
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-22 16:48:29 +00:00
Edward Tomasz Napierala
a0252a0a82 Cross-reference autounmountd(8) from umount(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-22 16:46:00 +00:00
Edward Tomasz Napierala
9df66c85e3 Cross-reference automount(8) from mount(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-22 16:43:36 +00:00
Dimitry Andric
5008830b51 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
2014-11-22 16:30:31 +00:00
Jilles Tjoelker
08dc8cf90c sh: Use DQSYNTAX only while expanding, not SQSYNTAX.
Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.
2014-11-22 16:03:18 +00:00
Alexander Motin
8b94b5836c 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
2014-11-22 15:09:18 +00:00
Steven Hartland
14730efd7e 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
2014-11-22 14:59:50 +00:00
Ian Lepore
dbd3f10702 Add libm to eliminate "undefined reference to sqrt" on arm 'softfp' builds. 2014-11-22 14:53:50 +00:00
Baptiste Daroussin
dec0135828 Enforce -lpthread and -lc to always be the 2 last components of the link list
Differential Revision:	https://reviews.freebsd.org/D1118
Suggested by:		kib
2014-11-22 12:48:09 +00:00
Dimitry Andric
0c4bf57982 Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:

usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^~~

The problem is that ntohl() always returns an unsigned quantity.  In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.

Reviewed by:	ngie
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1196
2014-11-22 12:13:05 +00:00
Dimitry Andric
fdaadf20c4 Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):

contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        if (abs(mtime - now) > (365/2)*86400)
            ^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
        if (abs(mtime - now) > (365/2)*86400)
            ^~~
            labs
1 error generated.

This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.

Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1198
2014-11-22 12:10:09 +00:00
Alexander Motin
73e2e95d94 Fix use-after-free introduced in r274843.
I've missed that iscsi_outstanding_remove() frees the second pointer,
so it should no longer be used.  And in fact we don't really need to.

MFC after:	2 weeks
2014-11-22 09:45:32 +00:00
Alexander Motin
c215ad3aa8 Move icl_pdu_get_data() and xpt_done() out of initiator's session lock.
During heavy reads data copying in icl_pdu_get_data() may consume large
percent of CPU time.  Moving it out of the lock significantly reduces
lock hold time and respectively lock congestion on read operations.

MFC after:	2 weeks
2014-11-22 09:05:54 +00:00
Hans Petter Selasky
4f27ddac0e Use correct length mask for split transactions. The hardware would
sometimes put non-zero values in the upper length bits, which are
available for high-speed-only USB transactions, breaking the reception
of data.
2014-11-22 08:47:04 +00:00
Hiroki Sato
c474372803 Remove examples of gif_interfaces and gifconfig. These have already been
marked as deprecated in rc.conf(5) manual page but these examples
were still here.

Spotted by:	jmg
2014-11-22 08:09:26 +00:00
Alexander Motin
94ab1f3693 Make iSCSI frontend less chatty while waiting for tasks termination.
MFC after:	1 week
2014-11-22 04:40:24 +00:00
Ian Lepore
0beab155a6 When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of
the first cacheline if the buffer start address is not on a cacheline
boundary.  Normally a buffer which is not cacheline-aligned is bounced,
but a special rule applies for mbufs, which are always misaligned due to
the header.  We know the cpu will not write to the header while dma is in
progress (so we've been told anyway), but it may have written to the
header shortly before starting a read, so we need to flush that write out
to memory before invalidating the whole buffer.

In collaboration with Mical Meloun and Svata Kraus.
2014-11-22 03:03:11 +00:00
Baptiste Daroussin
c501e7de0a Revert accidently message Makefile from 274836 and connect soeliminate(1) 2014-11-22 01:27:45 +00:00
Baptiste Daroussin
68d12e1fae Add a new soeliminate(1) command
mandoc(1) does not provide an equivalent of the GNU groff's soelim(1) as an
external binary. It does provide the funcitonnality but internally.

Lots if manpages in ports uses ".so" directives to include the content of
another manpage, which works properly if the manpages are not compressed.
With compressed manpages it will fail. So we need to preprocess those manpages
with soelim(1) before compressing them.

soeliminate(1) add the minimum functionnality from soelim(1) required for that
task, in order to still be able to prepare properly those manpages in case we
ship the base system only with mandoc as a manpage renderer.

soeliminate(1) accept all the arguments from soelim(1) for compatibility but
only '-I dir' is really functionnal.

Name it soeliminate and not soelim, so groff from base or ports can still call
soelim(1) for its internal use and avoid potential incompatibilities

MFC after:	1 month
2014-11-22 01:22:03 +00:00