Commit Graph

189110 Commits

Author SHA1 Message Date
Christian Brueffer
27e21758b8 Fix double fclose() in an error case.
CID:		1006120
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-14 21:44:34 +00:00
Eitan Adler
956c78c92b units(1): don't compare pointers with 0
For better readability, don't compare pointers with 0 or assign 0
to them. Use NULL instead.

Inspired by:	DragonflyBSD
2014-04-14 21:09:47 +00:00
Eitan Adler
dc8c916dcd units(1): Add 'static' and sort list.
Inspired by:	DragonflyBSD
2014-04-14 21:07:54 +00:00
Christian Brueffer
83a396ce95 Refine r264422: set buf to NULL only when we don't allocate memory,
and free buf unconditionally.

Requested by:	kib
MFC after:	1 week
2014-04-14 21:02:20 +00:00
Eitan Adler
9653775e6b units(1): Add v option: verbose
For increased compatibility with GNU units: support a -v option which
produces more verbose output when spitting out the answer.
GNU -v does additional work in the version, information, and check output which
we do not (yet?) replicate.
2014-04-14 20:51:04 +00:00
Rick Macklem
9387570f8a Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.

Reviewed by:	glebius
MFC after:	2 weeks
2014-04-14 20:34:48 +00:00
Tycho Nightingale
b96be57a2d Add support for emulating the slave PIC.
Reviewed by:	grehan, jhb
Approved by:	grehan (co-mentor)
2014-04-14 19:00:20 +00:00
Xin LI
8621ec029b Take into account when zpool history block grows exceeding 128KB in zpool(8)
and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in
spa_history_create_obj()).

PR:		bin/186574
Submitted by:	Andrew Childs <lorne cons org nz> (with changes)
MFC after:	2 weeks
2014-04-14 18:38:14 +00:00
Glen Barber
4fa056cdce Fix err() usage in libcapsicum(3) example.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-04-14 18:14:09 +00:00
Bryan Drewery
c0379dbd3e Prefer /etc/login.conf for some of these environment values.
PR:		conf/186085
Reported by:	Glen Neff <glen.neff@emc.com>
MFC after:	2 weeks
Sponsored by:	EMC
2014-04-14 18:07:00 +00:00
Eitan Adler
114022f58e units(1): Add U option
For increased compatibility with GNU units: support a -U option which tests for the
existence of the default units file and prints it to the screen.
2014-04-14 16:55:09 +00:00
Eitan Adler
3af082017a units(1): support reading multiple units files
GNU units(1) supports reading up to 25 -f options.  We support an arbitrary
number.
2014-04-14 16:43:36 +00:00
George V. Neville-Neil
cf07c70df7 Commit various fixes for the SolarFlare drivers, in particular
this set of patches fixes support for systems with > 32 cores.

Details include

sfxge: RXQ index (not label) comes from FW in flush done/failed events

Change the second argument name of the efx_rxq_flush_done_ev_t and
efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label)
comes from FW in flush done and failed events.

sfxge: TXQ index (not label) comes from FW in flush done event

Change the second argument name of the efx_txq_flush_done_ev_t prototype to
highlight that TXQ index (not label) comes from FW in flush done event.

sfxge: use TXQ type as label to support more than 32 TXQs

There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload)
in all other event queues.

Submitted by:	Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
2014-04-14 16:31:56 +00:00
Christian Brueffer
2eabb61ca2 Document the xdev* targets.
PR:		188519
Submitted by:	Idwer Vollering <vidwer at gmail.com>
Reviewed by:	bapt
MFC after:	1 week
2014-04-14 16:15:11 +00:00
Eitan Adler
cada55282a units(1): parse config file after setting defaults
Parse the config file after setting the defaults to permit the user to change
things (e.g., editing mode)
2014-04-14 14:40:12 +00:00
Eitan Adler
647be2c3a9 units(1): add libedit support
Add line editing and history support to units(1) via libedit.

Reviewed by:	bdrewery
2014-04-14 14:04:59 +00:00
Christian Brueffer
cd2fccbb47 Correct geli parameter.
PR:		188582
Submitted by:	Michael Hall
MFC after:	3 days
2014-04-14 06:59:49 +00:00
Gabor Pali
da64d3cf7e - Move davidxu to the alumni section
Approved by:	core (implicit)
2014-04-14 06:34:08 +00:00
Devin Teske
4c5d7fab2a Fix typo in debug/log statement.
Submitted by:	Rick Miller <vmiller@hostileadmin.com>
2014-04-14 05:35:01 +00:00
Mark Johnston
1e6b385830 Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.

MFC after:	2 weeks
2014-04-14 00:24:04 +00:00
Mark Johnston
38e6967f04 Ensure that all eight syscall arguments are available to dtrace_probe(),
rather than just the first five. This is done by calling dtrace_probe()
through a function pointer, as in illumos.

MFC after:	3 weeks
2014-04-14 00:23:18 +00:00
Mark Johnston
0626f3e435 DTrace's pid provider works by inserting breakpoint instructions at probe
sites and installing a hook at the kernel's trap handler. The fasttrap code
will emulate the overwritten instruction in some common cases, but otherwise
copies it out into some scratch space in the traced process' address space
and ensures that it's executed after returning from the trap.

In Solaris and illumos, this (per-thread) scratch space comes from some
reserved space in TLS, accessible via the fs segment register. This
approach is somewhat unappealing on FreeBSD since it would require some
modifications to rtld and jemalloc (for static TLS) to ensure that TLS is
executable, and would thus introduce dependencies on their implementation
details. I think it would also be impossible to safely trace static binaries
compiled without these modifications.

This change implements the functionality in a different way, by having
fasttrap map pages into the target process' address space on demand. Each
page is divided into 64-byte chunks for use by individual threads, and
fasttrap's process descriptor struct has been extended to keep track of
any scratch space allocated for the corresponding process.

With this change it's possible to trace all libc functions in a program,
e.g. with

  pid$target:libc.so.*::entry {@[probefunc] = count();}

Previously this would generally cause the victim process to crash, as
tracing memcpy on amd64 requires the functionality described above.

Tested by:	Prashanth Kumar <pra_udupi@yahoo.co.in> (earlier version)
MFC after:	6 weeks
2014-04-14 00:22:42 +00:00
Rui Paulo
4566dd369d Improve the i.MX53 / Digi DTS:
* Fix the IPU address.
* Fix the PATA definition.
* Add another I2C.
* Add more UARTs.
* Add SATA.
2014-04-13 22:35:39 +00:00
Warner Losh
a0f4cb1e7b r264402 builds fine, but turns out there are problems with
install. Back it out until they can be tracked down.
2014-04-13 21:52:27 +00:00
Christian Brueffer
a1761d7335 Free buf after usage.
CID:		1199377
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 21:23:15 +00:00
Christian Brueffer
7946c49fd8 Free resources and error cases; re-indent a curly brace while here.
CID:		1199366
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 21:13:33 +00:00
Bryan Drewery
eed74b2360 Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.
This file is used by pkg(8) from ports as well. Someone may
choose to not install pkg(7) but still want to consume
official packages by building or installing pkg(8) manually.

Discussed with:	bapt
MFC after:	1 day (Working on EN)
2014-04-13 20:21:56 +00:00
Christian Brueffer
b21e986087 Avoid double close() of a file descriptor.
CID:		1006089
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 20:12:21 +00:00
Christian Brueffer
2545695e6a Avoid double free in f_acl().
CID:		1018508
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 19:48:51 +00:00
Jilles Tjoelker
310c8f3c99 realpath(): Properly fail "." or ".." components after non-directories.
If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.

Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.

PR:		kern/82980
MFC after:	2 weeks
2014-04-13 19:48:28 +00:00
Christian Brueffer
48a098e360 Add a missing comma between error message definitions.
CID:		1199266
Found with:	Coverity Prevent(tm)
MFC after:	1 week
2014-04-13 18:51:39 +00:00
Christian Brueffer
90f5e7aa35 Bump Dd for r264384.
Requested by:	gjb
2014-04-13 18:21:53 +00:00
Nathan Whitehorn
5e1254e13b Apparently some of the i386 boot blocks are so close to full that adding
single lines to ufsread.c spills them over. Duplicate a whole bunch of
code to get file sizes into boot1.efi/boot1.c rather than modifying
ufsread.c.
2014-04-13 14:50:52 +00:00
Julio Merino
985e53cfcb Miscellaneous fixes to tests(7).
- Properly capitalize "FreeBSD Test Suite".
- At this point, the test suite first appeared in 10.1, not in 11.0.
- Use my FreeBSD.org address.
2014-04-13 11:59:42 +00:00
Julio Merino
6a3c084a1c Add FreeBSD 10.1 to the list of recognized releases for Fx.
This version is already mentioned by 4 manual pages.
2014-04-13 11:57:51 +00:00
Jilles Tjoelker
b547523eb4 find: Return normal exit status from -quit.
If there was an error, make the exit status reflect this even if -quit
caused the exit. Formerly, -quit always caused exit(0).

GNU find does the same.
2014-04-13 11:47:17 +00:00
Julio Merino
e1c6a283f3 Document how to install the test suite.
As part of this, install the tests(7) manual page unconditionally (not only
when WITH_TESTS=yes) so that users that have not yet enabled the build of
the test suite can read details on how to do so.
2014-04-13 11:35:42 +00:00
Julio Merino
0b41d3b0bc Regen after rewording of WITH_TESTS. 2014-04-13 11:31:41 +00:00
Julio Merino
3424c96f64 Fix test suite name in src.conf(5).
There is no such thing as the "Kyua test suite"; it is the "FreeBSD Test
Suite".

While doing this, point readers to tests(7).
2014-04-13 11:29:52 +00:00
Alexander Motin
2dfdd4ae19 Join CTL worker threads into one process for convenience.
Report their idle state as "-".
2014-04-13 11:10:36 +00:00
Alexander Motin
3710ae64b9 Report more readable state "-" for idle CAM scan thread. 2014-04-13 11:08:57 +00:00
Alexander Motin
7dc06c978d Fix periph listing when IOCTL buffer border hits result for wanted bus. 2014-04-13 09:31:22 +00:00
Nathan Whitehorn
2a11027fd3 Add my copyright here. Most of this is unmodified from the original sparc64
version, but at least some indication of changes that postdate the actual
invention of EFI is probably a good idea.
2014-04-13 06:30:02 +00:00
Nathan Whitehorn
40adc3db02 Fix buildworld. I had some local bits in my build tree that caused this
to work by accident.
2014-04-13 06:24:01 +00:00
Warner Losh
5bce97114a Convert NO_MANCOMPRESS to normal convention. 2014-04-13 05:22:26 +00:00
Warner Losh
0b8951c562 In tree makefile shouldn't be setting policy piecemeal. Don't set
NO_MANCOMPRESS here.
2014-04-13 05:22:22 +00:00
Warner Losh
3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Warner Losh
e0919954d5 Don't apply ctf conversions in POSIX mode. These can't happen there
because they pollute the POSIX environment, which doens't allow
for these extentions. ctf conversions are really only relevant when
used in coordination with the rest of the bsd*.mk system anyway.
Leave them in place for the normal, non-posix enviornment since
they are quite useful there.
2014-04-13 05:21:48 +00:00
Warner Losh
e1a85b3191 Check the right file for pwcache_groupdb. 2014-04-13 05:21:43 +00:00
Warner Losh
f40d4bd2af We no longer support upgrading from FreeBSD 4, so we don't need the
NOMAN and NOSHARED defines here. They have been obsolete for almost a
decade anyway.
2014-04-13 05:21:35 +00:00