Commit Graph

169963 Commits

Author SHA1 Message Date
Baptiste Daroussin
faf66437f8 Add two special directives to libmap.conf:
include <file>:
  Parse the contents of file before continuing with the current file.
includedir <dir>:
  Parse the contents of every file in dir that ends in .conf before continuing
  with the current file.
Any file or directory encountered while processing include or includedir
directives will be parsed exactly once, even if it is encountered multiple
times.

Reviewed by:	kib, des
Approved by:	des (mentor)
MFC after:	1 month
2012-04-30 21:26:35 +00:00
Baptiste Daroussin
bdb6d17264 Respect mathematical operation order piority with the exponent gnu extension
Obtained from:	OpenBSD
Approved by:	des (mentor)
2012-04-30 21:02:57 +00:00
Alexander Motin
00f32ecbd0 Add to GEOM RAID class module, supporting the DDF metadata format, as
defined by the SNIA Common RAID Disk Data Format Specification v2.0.

Supports multiple volumes per array and multiple partitions per disk.
Supports standard big-endian and Adaptec's little-endian byte ordering.
Supports all single-layer RAID levels. Dual-layer RAID levels except
RAID10 are not supported now because of GEOM RAID design limitations.

Some work is still to be done, but the present code already manages basic
interoperation with RAID BIOS of the Adaptec 1430SA SATA RAID controller.

MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2012-04-30 17:53:02 +00:00
Jean-Sébastien Pédron
fa268e5523 Add myself. 2012-04-30 16:16:37 +00:00
Edward Tomasz Napierala
e35497f13b Improve growfs(8) in a few ways; unfortunately, it's somewhat hard to untangle
them and commit separately.

1. Rewrite the way growfs(8) finds the device and mount point.  This makes
   it possible to use e.g. "growfs /mnt"; it's also used to display more
   helpful messages.

2. Be more user-friendly, using descriptive messages, like this:

   OK to grow filesystem on /dev/md0, mounted on /mnt, from 9.8GB to 20GB? [Yes/No]"

3. Allow to specify the size (-s option) just like with mdconfig(8), i.e. with
   postfixes ("mdconfig -s 10g").

4. Reload read-only filesystem after growing.

Reviewed by:	kib, mckusick (earlier version)
Sponsored by:	The FreeBSD Foundation
2012-04-30 16:08:02 +00:00
Konstantin Belousov
f62651920d Add GNU hash support for rtld.
Based on dragonflybsd support for GNU hash by John Marino <draco marino st>
Reviewed by:	kan
Tested by:	bapt
MFC after:	2 weeks
2012-04-30 13:31:10 +00:00
Konstantin Belousov
34cb87ba95 Split the symlook_obj1 into a loop iterating over the ELF object symbol
hash elements, and a helper matched_symbol() which match the given hash
entry and request, performing needed type and version checks.

Based on dragonflybsd support for GNU hash by John Marino <draco marino st>
Reviewed by:	kan
Tested by:	bapt
MFC after:	2 weeks
2012-04-30 13:29:21 +00:00
Dag-Erling Smørgrav
f51b84bcc4 Don't reuse credentials if redirected to a different host.
Submitted by:	Niels Heinen <heinenn@google.com>
MFC after:	3 weeks
2012-04-30 12:12:48 +00:00
Dag-Erling Smørgrav
30787285b5 Since the socket is non-blocking, it is necessary to use select(2) even
when there is no timeout, because read(2) will return immediately if there
is no data waiting in the TCP buffer, causing fetch_read() to busy-loop on
slow connections.

MFC after:	3 weeks
Noticed by:	Yanhui Shen <shen.elf@gmail.com>
2012-04-30 12:11:45 +00:00
Jean-Sébastien Pédron
671c033623 Remove incorrect __restrict qualifier on several pointers
The typical case was:
static __inline int
convert_ccl(FILE *fp, char * __restrict p, [...])
{
        [...]

        if (p == SUPPRESS_PTR) {
		[...]
	} else {
		[...]
	}

	[...]
}

This qualifier says that the pointer is the only one at that time
pointing to the resource.

Here, clang considers that "p" will never match "SUPPRESS_PTR" and
optimize the if{} block out. This leads to segfaults in programs calling
vfscanf(3) and vfwscanf(3) with just the format string (no arguments
following it).

The following softwares were reported to abort with segmentation fault
and this patch fixes it:
    o  cmake
    o  smartd
    o  devel/ORBit2

dim@ opened an LLVM PR to discuss this clang optimization:
    http://llvm.org/bugs/show_bug.cgi?id=12656

Tested by:	bsam@
2012-04-30 11:28:17 +00:00
Alexander V. Chernikov
7bd5e9b143 Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
Remove ipfw/ip_fw_private.h header from non-ipfw code.

Approved by:        ae(mentor)
MFC after:          2 weeks
2012-04-30 10:22:23 +00:00
Navdeep Parhar
7a32954c40 Change the default to not use packet counters to generate rx interrupts.
Rely solely on the timer based mechanism.

Update man page to reflect this change.

MFC after:	1 week
2012-04-30 09:46:05 +00:00
Michael Tuexen
5fc8d746ee Add support for missing gauth_number_of_chunks field. This Bug was
found by Irene Ruengeler.

MFC after: 1 week
2012-04-30 08:44:21 +00:00
Navdeep Parhar
e07f03e8fc Make sure that the firmware version is available in
dev.t4nex.X.firmware_version even if the driver fails to attach
properly.  At least it'll be easy to tell what we're dealing with.

MFC after:	1 week
2012-04-30 08:44:10 +00:00
Robert Watson
ceebc4ca95 fix a further typo in the pdfork(2) man page.
Submitted by:	Norman Hardy
MFC after:	3 days
2012-04-30 08:00:52 +00:00
Robert Watson
aa5d4b9247 The returned file descriptor from pdfork(2) is via fdp, not pidp.
Submitted by:	Norman Hardy
MFC after:	3 days
2012-04-30 07:32:39 +00:00
Garance A Drosehn
7574a1c16e Print out a warning message if a `lpc setstatus' is done when
the queue is not 'lpc stop'-ed.  In that situation `lpq' will
not display the status message to the user, and the operator
may think the queue is already stopped when it is not.

MFC after:	3 weeks
2012-04-30 01:10:13 +00:00
David Schultz
cbd3cbbae0 Fix a bug in *wscanf's handling of non-wide %s, %c, and %[
conversions.  Both the specification and the documentation say the
width is interpreted as the max number of wide characters to read, but
the implementation was interpreting it as the number of bytes to convert.
(See also r105317.)

This change has security implications for any applications that depend
on the buggy behavior, but the impact in practice is probably nil.
Any such application would already be buggy on other platforms that
get the semantics right.  Also, these conversions are rarely used;
%ls, %lc, and %l[ are more appropriate.
2012-04-30 01:08:18 +00:00
Garance A Drosehn
aa318fd726 Catch the user-error when no queue name was specified on an
lpc-command which supports '-msg' (e.g.: setstatus).  Print
out a helpful error message instead hitting a seg-fault.

MFC after:	3 weeks
2012-04-30 00:54:10 +00:00
Eitan Adler
c11c655c32 Copy recent changes from etc/root/dot.cshrc that make the defaults more
user friendly

Approved by:	cperciva
MFC after:	3 days
2012-04-29 22:29:48 +00:00
Eitan Adler
c7cb82daf9 Add support for:
Olympus FE-210 camera
	LG UP3S MP3 player
	Laser MP3-2GA13 MP3

PR:		usb/119201
Submitted by:	Peter Jeremy <peterjeremy@optushome.com.au>
Approved by:	cperciva
MFC after:	1 week
2012-04-29 22:28:15 +00:00
Eitan Adler
74af13c61a pread(2) might fail with EBUSY, so document it
PR:		docs/167201
Submitted by:	Kurt Jaeger <fbsd-ports@opsec.eu>
Approved by:	cperciva
MFC after:	3 days
2012-04-29 22:23:00 +00:00
Eitan Adler
be8490925a Allow users of gprof to get per run output files (using the pid)
PR:		bin/99800
Submitted by:	Peter Jeremy <peterjeremy@optushome.com.au>
Reviewed by:	jilles (code)
Reviewed by:	dwhite (doc)
Approved by:	cperciva
MFC after:	1 week
2012-04-29 22:19:58 +00:00
Alexander Motin
c9f545e5f9 s/gmirror/graid/ 2012-04-29 19:40:50 +00:00
Hans Petter Selasky
0a4cc48fe5 Add support for Multi-TT mode of modern USB HUBs.
This will give you more bandwidth for isochronous
FULL speed applications connected through a
High Speed HUB.

This patch has been tested with XHCI and EHCI.

MFC after:	1 week
2012-04-29 17:12:33 +00:00
David Schultz
d7af8cf14b Previously, vfscanf()'s wide character processing functions were
reading wide characters manually.  With this change, they now use
fgetwc().  To make this work, we use an internal version of fgetwc()
with a few extensions: it takes an mbstate * because non-wide streams
don't have a built-in mbstate, and it indicates the number of bytes
read.

vfscanf() now resembles vfwscanf() more closely.  Minor functional
improvements include working xlocale support in vfscanf(), setting the
stream error indicator on encoding errors, and proper handling of
shift-based encodings.  (Actually, making shift-based encodings work
with non-wide streams is hopeless, but the implementation now matches
the broken specification.)
2012-04-29 16:28:39 +00:00
Marius Strobl
35225ae651 Partially revert r232938; ZFS only requires nfs4 but not posix1e.
Submitted by:	jhb
2012-04-29 16:21:47 +00:00
Marius Strobl
c9716b3491 Drag in subr_acl_nfs4.c for ZFS automatically, otherwise it's
unintuitive that "options zfs" requires "options ufs_acl".
2012-04-29 16:14:09 +00:00
Marius Strobl
1a7f270047 Add multiple inclusion protection.
PR:		165025
Submitted by:	Gavin Mu
MFC after:	1 week
2012-04-29 15:54:40 +00:00
Bernhard Schmidt
620c4e951f Fix WITHOUT_EXAMPLES build:
While removing unnecessary entries from .PATH.c I missed that for the
examples WPA_SUPPLICANT_DISTDIR/HOSTAPD_DISTDIR is explicitly added to
.PATH.

Tested by:	lev
MFC after:	2 weeks
2012-04-29 12:48:52 +00:00
Dimitry Andric
460378bf13 Add a convenience macro for the returns_twice attribute, and apply it to
the prototypes of the appropriate functions (getcontext, savectx,
setjmp, sigsetjmp and vfork).

MFC after:	2 weeks
2012-04-29 11:04:31 +00:00
Konstantin Belousov
3d388f0798 Regenerate src.conf(5) 2012-04-29 09:37:02 +00:00
Konstantin Belousov
4f20e4f263 Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked.  Option is disabled by
default.

Reviewed by:	ru (previous version)
MFC after:	2 weeks
2012-04-29 09:32:44 +00:00
Jeremie Le Hen
3c2ded8bbc Use standard getopt(3) error message.
Submitted by:	jilles
Approved by:	kib (mentor)
2012-04-29 08:17:44 +00:00
Adrian Chadd
ab07718555 Change cc -> bc : "bc" is "busy count", which is the % of time the channel
is considered "busy but not doing any active TX or frame RX."

Just keep in mind that "frame RX" is "decoding what looks like a wifi
signal", not necessarily "frame successfully decoded for this particular
device."
2012-04-28 23:13:09 +00:00
Glen Barber
f85ad80c6f As cron(8) is started with '-s' by default, timezones that observe
DST should not need to worry about scheduling jobs when the DST time
changes.

Rather than removing the BUGS section in crontab(5) regarding this,
note that disabling '-s' may still cause jobs to be executed twice or
not at all.

PR:		166318
Submitted by:	Florian k Unglaub (f.unglaub%googlemail!com)
MFC After:	1 week
2012-04-28 22:48:00 +00:00
Adrian Chadd
6af850068c After thinking about this a bit more, let's not keep statistics per-channel
in the HAL.  That's very memory hungry (32k just for channel statistics)
which would be better served by keeping a summary in the ANI state.

Or, later, keep a survey history in net80211.

So:

* Migrate the ah_chansurvey array to be a single entry, for the current
  channel.
* Change the ioctl interface and ANI code to just reference that.
* Clear the ah_chansurvey array during channel reset, both in the AR5212
  and AR5416 reset path.
2012-04-28 22:03:19 +00:00
Jeremie Le Hen
5a239e7000 Fix small documentation mistakes.
Submitted by:	brueffer
Approved by:	kib (mentor)
2012-04-28 21:50:30 +00:00
Jeremie Le Hen
6486b015fc Import stdbuf(1) and the shared library it relies on.
This tool changes the default buffering behaviour of standard
stdio streams.

It only works on dynamic binaries.  To make it work for static
ones it would require cluttering stdio because there no single
entry point.

PR:		166660
Reviewed by:	current@, jhb
Approved by:	kib (mentor)
MFC after:	1 week
2012-04-28 20:52:20 +00:00
Glen Barber
64cc18cc01 As of r226840, GELI starts one thread per CPU.
PR:		167382
Submitted by:	John W. O'Brien (john%saltant.com)
X-Needs-MFC:	r226840
2012-04-28 20:23:13 +00:00
Konstantin Belousov
ed8ddc6ea0 Fix several memory and lock leaks on the out of memory condition.
Reported by:	Matt Miller <matt matthewjmiller net>
MFC after:	1 week
2012-04-28 18:57:27 +00:00
Adrian Chadd
641d61c78e Although not strictly needed, quieten a compiler warning by a user. 2012-04-28 18:56:17 +00:00
Michael Tuexen
ed72abc07d Whitespace changes.
MFC after: 3 days
2012-04-28 16:32:49 +00:00
Nathan Whitehorn
284ea61312 Fix build on 32-bit systems. 2012-04-28 14:42:49 +00:00
Bernhard Schmidt
d9246288a0 Move crypto stuff into a common Makefile. While here fix the
WITHOUT_OPENSSL build by using the wpa's internal crypto support if
openssl is not available, this allows us to unconditionally enable
EAP support.

MFC after:	2 weeks
2012-04-28 11:11:53 +00:00
Bernhard Schmidt
80bcb7437d not only the file names have changed from eap_xxx.c to eap_server_xxx.c,
the defines too

MFC after:	2 weeks
2012-04-28 11:02:32 +00:00
Bernhard Schmidt
2e8de11a06 enable EAP_GTC and EAP_OTP to match upstream's default configuration
MFC after:	2 weeks
2012-04-28 11:01:12 +00:00
Bernhard Schmidt
9243c06122 Follow up r234711 and do same for the supplicant, one file/option per
line. While here merge the options which are always enabled.

MFC after:	2 weeks
2012-04-28 10:59:29 +00:00
Adrian Chadd
af5336e30b Extend the ANI code to implement basic channel survey support.
* Always call ar5416GetListenTime()
* Modify ar5416GetListenTime() to:
  + don't update the ANI state if there isn't any ANI state;
  + don't update the channel survey state if there's no active
    channel - just to be paranoid
  + copy the channel survey results into the current sample slot
    based on the current channel; then increment the sample counter
    and sample history counter.
* Modify ar5416GetMIBCyclesPct() to simply return a HAL_SURVEY_SAMPLE,
  rather than a set of percentages.  The ANI code wasn't using the
  percentages anyway.

TODO:

* Create a new function which fetches the survey results periodically
* .. then modify the ANI code to use the pre-fetched values rather than
  fetching them again
* Roll the 11n ext busy function from ar5416_misc.c to update all the
  counters, then do the result calculation
* .. then, modify the MIB counter routine to correctly fetch a snapshot -
  freeze the counters, fetch the values, then reset the counters.
2012-04-28 08:29:46 +00:00
Adrian Chadd
dd025d9a62 Add a tool to print out min, average and max channel survey information
from the current channel.

There seem to be some occasional issues with the extension channel
counters reporting more than 100% of use.  I'll investigate that
soon.
2012-04-28 08:17:19 +00:00