Commit Graph

191674 Commits

Author SHA1 Message Date
Warner Losh
ddd812b850 Simplify comment to remove multiple negative and passive voice. 2014-07-23 16:18:54 +00:00
Warner Losh
1efe717e13 Fix typo in comment: noone -> no one.
Fix minor style(9) nits.
2014-07-23 16:18:51 +00:00
Roger Pau Monné
f5417a03e3 don't set CR4 PSE bit on amd64
Setting PSE together with PAE or in long mode just makes the PSE bit
completely ignored, so don't set it.

Sponsored by: Citrix Systems R&D
Reviewed by: kib
2014-07-23 15:53:29 +00:00
Pedro F. Giffuni
abcd8f4535 Fix mismatch.
MFC after:	3 days
2014-07-23 15:12:17 +00:00
Pedro F. Giffuni
1ab5381860 fparseln(3): Update from NetBSD sources.
-fix a condition so that fparseln() doesn't report spurious empty lines
 eg after 2 comment lines, or on EOF after a single comment line
-no escape character means no escaped characters

modify the previous fix so that no pointless realloc()s are done in
the case of multiple empty continuation lines, and comment the code
to make the logics obvious

fparseln is now part of libc in NetBSD so this changes the previous
revision numbering.

Obtained from:	NetBSD (CVS Rev. 1.6-1.7)
MFC after:	2 weeks
2014-07-23 14:57:15 +00:00
Xin LI
d6fb141e08 4976 zfs should only avoid writing to a failing non-redundant top-level vdev
4977 mdb error in ::spa_space from space_cb() if a metaslab's ms_sm is NULL
4978 ztest fails in get_metaslab_refcount()
4979 extend free space histogram to device and pool
4980 metaslabs should have a fragmentation metric
4981 remove fragmented ops vector from block allocator
4982 space_map object should proactively upgrade when feature is enabled
4983 need to collect metaslab information via mdb
4984 device selection should use fragmentation metric
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Adam Leventhal <adam.leventhal@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>

illumos/illumos-gate@2e4c998613
2014-07-23 08:00:34 +00:00
Adrian Chadd
fa4be7cc42 Fix the igb(4) redirection table to correctly populate.
This is similar to the ixgbe(4) fix.

Tested:

* Intel I350 gigabit adapter
2014-07-23 05:40:28 +00:00
Neel Natu
d665d229ce Emulate instructions emitted by OpenBSD/i386 version 5.5:
- CMP REG, r/m
- MOV AX/EAX/RAX, moffset
- MOV moffset, AX/EAX/RAX
- PUSH r/m
2014-07-23 04:28:51 +00:00
Pedro F. Giffuni
86727cc9c6 Avoid possible cast degradation.
For consistency with r268985 for fputs.c, assign iov_len
first, avoiding the cast to uio_resid (int in stdio)
from degrading the value.

We currently don't support lengths higher than INT_MAX so
this change is little more than cosmetic.

MFC after:	3 days
2014-07-22 23:29:54 +00:00
Devin Teske
95d45410b5 Add example script `add_some_packages.sh', demonstrating how to install
a list of packages using the bsdconfig(8) API, providing dialog(8) based
user experience (versus plain console output were you to use pkg(8)
directly to install the same list of packages).

Remove example script `browse_packages_ftp.sh', made obsolete because
the digests.txz and packagesite.txz databases for pkg(8) are not
available via FTP (HTTP only to pkg.freebsd.org SRV hosts).

Update example script `browse_packages_http.sh', made to work with new
pkg(8) demonstrating how to generate a local package repository.

Fix a bug in `bsdconfig packages' where packages were listed twice. This
fix requires pkg(8) version 1.2.7_4 or higher.

NB: It is the introduction of pkg(8) 1.2.7_4 wherein I am also able to
drastically reduce the generation time of package dependencies prior to
the dialog display (by utilizing the new `-I' flag to pkg-rquery(8)).

While here, fix a positional argument nit for f_index_initialize() of
`packages/index.subr' include (the one and only argument is positional
argument 1 to state the by-ref handle, indicating the variable to set
in the caller's namespace; the nit I'm fixing here is that we were
querying positional argument 2 for this information incorrectly; caused
by a missing hunk back around SVN r257795).

Fix a bug in sysrc(8) described by PR bin/187458 "sysrc(8) silently and
unexpectedly bootstraps pkg". This was caused by an explicit entry in
`/usr/share/bsdconfig/common.subr' (used by sysrc(8)) that called pkg(8)
to populate the $PKG_ABI global (called in a way that allows implicit
bootstrap of pkg(8)). The solution to which was to find every place in
bsdconfig(8) that requires the $PKG_ABI global and add a layer of
protection by way of introducing the new API call f_musthavepkg_init()
(provided by new include, `/usr/share/bsdconfig/packages/musthavepkg.subr'
intented to mirror `/usr/share/bsdconfig/mustberoot.subr'). When the
$PKG_ABI global is required, you can use `f_musthavepkg_init' to cause
graceful premature termination in the event that pkg(8) has not yet been
bootstrapped, and thus cannot be used to populate $PKG_ABI.

NB: If running interactively ($nonInteractive is NULL or unset), the
f_musthavepkg_init() API call will attempt to bootstrap pkg(8), but only
if the user chooses "Yes" to a Yes/No dialog confirming it is ok to
bootstrap.

While here, simplify an if-conditional in `media/http.subr' include to
use sh(1) inline assignment-with-break.

Also, fix a bug in `media/http.subr' and `media/httpproxy.subr' wherein
the error messages for various HTTP failures were not finding their way
to the console (needed to pass stdout to pass-thru descriptor).

While here, remove the executable bit from `packages/categories.subr',
`packages/index.subr', and `packages/packages.subr' includes.

Fix issues where pkg(8) complains about PACKAGESITE being defined.
Previously, we would set $PACKAGESITE and export it. Now we only set
$PACKAGESITE for invocations of "pkg update" -- getting rid of all the
spurious warnings about PACKAGESITE being deprecated (it's still used
in the case of "pkg update" for simplicity versus having to configure
a config-file).

Remove the leading argument from invocations of f_index_initialize() in
`packages/packages.subr' include. The leading argument no longer means
what it used to, pre SVN r257995).

PR:		bin/187458
Reviewed by:	nwhitehorn
MFC after:	1 week
X-MFC-to:	stable/10, stable/9
2014-07-22 23:10:12 +00:00
Gavin Atkinson
bad752d40f /usr/bin/sendbug and the sendbug(1) man page were part of send-pr and
are no longer installed since r267486.  Add them to ObsoleteFiles.inc1,
which should have been done in r267486.

PR:		192010
Submitted by:	Vick Khera
Pointyhat to:	gavin
MFC after:	3 days
2014-07-22 22:57:26 +00:00
Andrey A. Chernov
ecf84bf00a For "a"-mode files and rewind/fseek + fwrite combination return meaningful
value now, like Apple does, but avoid their __sflush physical write
performance degradation as much as possible.
2014-07-22 22:49:37 +00:00
Sergey Kandaurov
d0999e70b6 Re-sort synopsis, add includes. 2014-07-22 22:39:59 +00:00
Sergey Kandaurov
814de63043 s/PCBGROUPS/PCBGROUP/ manpage to match "options PCBGROUP". 2014-07-22 22:16:23 +00:00
Ian Lepore
fc6840cc02 Add FreeBSD to the list of environments that needs to handle R_ARM_TARGET2
relocations in unwind data as pc-relative indirect references.

MFC after:	1 week
2014-07-22 20:49:58 +00:00
Ian Lepore
1f6f6cd7e2 Fix EABI unwind function declarations to match the function definitions.
The mismatch was noticed by clang, when using it to compile the in-tree
gcc and libstdc++.
2014-07-22 20:32:24 +00:00
Andrey A. Chernov
4099894921 Back the whole change out until I figure out how to obtain O_APPEND,
it can't be used in this field at all.
2014-07-22 20:13:46 +00:00
Andrey A. Chernov
44575f7350 Checking for __SAPP alone is not enough because it is emulated O_APPEND
only, so works for only special fdopen() case. Add real O_APPEND too.
2014-07-22 19:55:25 +00:00
Michael Tuexen
e710ed26a3 Cleanup the definition of two structures which are
exposed to userland. Therefore no MFC.
2014-07-22 19:54:22 +00:00
Navdeep Parhar
c086e3d1b7 Add missing newline to an error message.
MFC after:	3 days
2014-07-22 19:48:21 +00:00
Sergey Kandaurov
0d93965f43 Grammar and spelling fixes. 2014-07-22 19:37:38 +00:00
Pedro F. Giffuni
a333236e63 Revert r268984:
Check for __SAPP flag before calling sflush.   This avoids
performance degradation compared to the previous approach.

Submitted by:	ache
MFC after:	2 weeks
2014-07-22 18:37:59 +00:00
Marcel Moolenaar
6c25615f39 In r264504, we prevented doing I/O for more than MAXPHYS by making
the assumption that consumers would respect bio_completed and/or
bio_resid to detect short reads. This assumption proved false and
file corruption was the result.
Create as many bios as we need to satisfy the original request.
Check the cached chunk every time we need to do I/O to increase the
hit rate.

Obtained from:	junipre Networks, Inc.
MFC after:	1 week
2014-07-22 17:30:05 +00:00
Pedro F. Giffuni
6393bfdac8 Mostly cosmetic cleanups.
In fputs() avoid implcit casting on iov.iov_len.

MFC after:	3 days
2014-07-22 16:39:11 +00:00
Pedro F. Giffuni
4a4e32a81d ftello: return 1 when seeking offset on an append stream.
Obtained from:	Apple Inc. (Libc 997.90.3)
Phabric:	D442
MFC after:	2 weeks
2014-07-22 16:19:01 +00:00
Pedro F. Giffuni
c03225695d rewind: always clear error indicator.
Required by POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/functions/rewind.html

Obtained from:	Apple Inc. (Libc 997.90.3)
MFC after:	1 week
2014-07-22 16:10:56 +00:00
Ed Maste
b47228854f Don't pass null kmdp to preload_search_info
On Xen PVH guests kmdp == NULL.

Submitted by:	royger
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-07-22 13:58:33 +00:00
Aleksandr Rybalko
b856b87699 Remove #ifdef-s to reduce difference to upstream.
Pointed by:	kib

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-07-22 08:52:49 +00:00
Xin LI
3d4d6b0883 Correct typo introduced with r268855.
MFC after:	10 days
X-MFC with:	r268855
2014-07-22 08:37:01 +00:00
Xin LI
8fcb9ca99b Don't save entropy inside jails.
As of r126744, we no longer feed the entropy device in jails upon
start, and collecting them is no longer useful.

PR:		conf/126744
Submitted by:	Eugene Grosbein <eugen grosbein net> (with minor changes)
MFC after:	1 week
Approved by:	so (des)
2014-07-22 06:40:27 +00:00
Sean Bruno
12857dd1ea copyin/copyout should return 0 if they are truly emulating copyin/copyout behavior.
remove stray %s in printf

rewrite printf to display 64bit type without warning.
2014-07-22 04:47:19 +00:00
Ruslan Bukin
40d7d6323b Enable Freescale i.MX I2C driver for i.MX6. 2014-07-22 04:39:32 +00:00
Sean Bruno
67bff9b155 Remove boot1.efi during clean target. 2014-07-22 04:38:28 +00:00
Sean Bruno
38d02a94fa Supress clang warning for FreeBSD printf %b and %D formats
MFC after:	2 weeks
2014-07-22 04:37:47 +00:00
Ruslan Bukin
484b4fd46c Rename i.MX I2C driver file. 2014-07-22 03:59:14 +00:00
Navdeep Parhar
c3fb772502 Simplify r267600, there's no need to distinguish between allocated and
inlined mbufs.

MFC after:	1 week
2014-07-22 02:02:39 +00:00
Simon J. Gerraty
49217bc51e bsd.lib.mk does not add OBJS etc to CLEANFILES so does not automatically
get them flagged as .NOPATH.  This hurts people who don't use obj dirs.
Since its clean target seprate rm's for things, use NOPATH_FILES as list
to collect things that need .NOPATH.

bsd.obj.mk will add CLEANFILES to NOPATH_FILES and do the deed if needed.

Reviewed by: sbruno
2014-07-22 00:42:55 +00:00
Peter Wemm
b177c333d4 Merge serf-1.3.6
+  Revert r2319 from serf 1.3.5: this change was making serf call handle_response
+    multiple times in case of an error response, leading to unexpected behavior.
2014-07-21 22:10:29 +00:00
Peter Wemm
b42ed20721 Vendor import serf-1.3.6
+  Revert r2319 from serf 1.3.5: this change was making serf call handle_response
+    multiple times in case of an error response, leading to unexpected behavior.
2014-07-21 22:08:49 +00:00
Dimitry Andric
1782c649a8 Run mtree for BSD.tests.dist during make xdev-install, if the tests are
enabled (which they are in the default configuration).  Otherwise, it
will fail because ${XDDESTDIR}/usr/include/atf-c does not exist.

MFC after:	3 days
2014-07-21 21:26:10 +00:00
Sean Bruno
77f3aefe61 Merge change from upstream linux kernel submitted by OpenBSD:
drm/radeon: fix-up some float to fixed conversion thinkos

Spotted by Brad Smith when porting to OpenBSD.
Noticed-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

ref: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1cd73ff7

Remove #ifdef DUMBBELL_WIP in favor of upstream fix.

Phabric:	https://phabric.freebsd.org/D423
Reviewed by:	dumbbell, jkim
MFC after:	2 weeks
2014-07-21 19:33:08 +00:00
Ed Maste
0dfe37f8f3 Remove redundant return statement after errx
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-07-21 17:43:37 +00:00
Ed Maste
54a7138bd8 Use the standard way of printing the usage string
Sponsored by:	The FreeBSD Foundation
2014-07-21 17:18:00 +00:00
Ed Maste
4a87818e07 Hide syscons-specific workaround under DEV_SC
This change is a bit ugly, but so is the coupling between the i915
driver and syscons.  It isn't worth developing a more elegant solution
only to support the legacy syscons console.
2014-07-21 16:38:05 +00:00
Pedro F. Giffuni
e19f362e28 Fix hdestroy() compliance issue.
The hcreate(3) implementation and related functions we inherited
from NetBSD used to free() the key value, something that is not
supported by the standard implementation.

This would cause a segmentation fault when attempting to run
the examples from the opengroup and linux manpages.  NetBSD
has added non-standard calls to provide the previous
behaviour but hdestroy is not very commonly used so at this
time it seems excessive to bring those to FreeBSD.

Bump the __FreeBSD_version as this is an ABI change.

Reference:
http://bugs.dragonflybsd.org/issues/1398

MFC after:	2 weeks
2014-07-21 15:44:59 +00:00
Pedro F. Giffuni
47ccc0c84f Update license.
NetBSD has removed the advertisement clause from this file.

Obtained from:	NetBSD (CVS rev. 1,8)
2014-07-21 15:26:52 +00:00
Pedro F. Giffuni
9823a90c79 Add re-entrant versions of the hash functions based on the GNU api.
While testing this I found a conformance issue in hdestroy()
that will be fixed in a subsequent commit.

Obtained from:	NetBSD (hcreate.c, CVS Rev. 1.7)
2014-07-21 15:22:48 +00:00
Sergey Kandaurov
b2cd178ea2 Fixed fallout from previous change. 2014-07-21 08:47:54 +00:00
Sergey Kandaurov
37d1fbc39f [mdoc] cleanup 2014-07-21 08:42:35 +00:00
Adrian Chadd
803b5af467 Add the PCBGROUPS manpage.
Thanks to wblock for helping me with this manpage.
2014-07-21 04:48:02 +00:00