summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* MFC r318780:kib2017-06-071-4/+4
| | | | Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE.
* MFC: r292180 (partial), r297127 (partial), r311911, r311923, r312939,marius2017-05-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r313250, r313712, r314811 (partial), r314887 (partial), r315430, r317981, r315466 o Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of the various bridge drivers out of dev/mmc.c and into the bridge drivers. o Add ACPI platform support for SDHCI driver. o Fix some overly long lines, whitespace and other bugs according to style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4). o In the mmc(4) bridges and sdhci(4) (bus) front-ends: - Remove redundant assignments of the default bus_generic_print_child device method, - use DEVMETHOD_END, - use NULL instead of 0 for pointers. o Trim/adjust includes. o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges as kernel drivers and their dependency onto mmc(4). o Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute) Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions. CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation. o Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications. o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter have been added to ports as sysutils/mmc-utils. Among others, the `mmc` tool of mmc-utils allows for partitioning eMMC devices (tested working). o For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly. o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required.
* MFC r291310:ian2017-04-132-8/+4
| | | | | | | | | | | | | | | Stop building vers.c in include/ and only build the needed osreldate.h. Because of how osreldate.h was being built with newvers.sh, which always spat out a vers.c dependent on SVN or git, the meta mode build was considering osreldate.h to depend on the current git or SVN index. This would lead to entire tree rebuilds when modifying git's index. There's no reason to be generating vers.c here so just skip it. While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which newvers.sh already has a default for) and remove unneeded export. Sponsored by: EMC / Isilon Storage Division
* MFC r313819:pfg2017-02-191-1/+1
| | | | | | | Remove outdated claim. Despite wishful thinking the removal of these old functions hasn't happened yet.
* MFC r310630: libkvm: support access to vmm guest memory, allow writes toavg2017-01-181-0/+1
| | | | | | fwmem and vmm Sponsored by: Panzura
* MFC 310048,310101sephe2017-01-041-0/+8
| | | | | | | | | | | | | | | | | | 310048 hyperv: Implement "enlightened" time counter, which is rdtsc based. Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8763 310101 hyperv: Allow userland to ro-mmap reference TSC page This paves way to implement VDSO for the enlightened time counter. Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8768
* MFC 308664,308742,308743sephe2016-12-291-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 308664 hyperv/vss: Add driver and tools for VSS VSS stands for "Volume Shadow Copy Service". Unlike virtual machine snapshot, it only takes snapshot for the virtual disks, so both filesystem and applications have to aware of it, and cooperate the whole VSS process. This driver exposes two device files to the userland: /dev/hv_fsvss_dev Normally userland programs should _not_ mess with this device file. It is currently used by the hv_vss_daemon(8), which freezes and thaws the filesystem. NOTE: currently only UFS is supported, if the system mounts _any_ other filesystems, the hv_vss_daemon(8) will veto the VSS process. If hv_vss_daemon(8) was disabled, then this device file must be opened, and proper ioctls must be issued to keep the VSS working. /dev/hv_appvss_dev Userland application can opened this device file to receive the VSS freeze notification, hold the VSS for a while (mainly to flush application data to filesystem), release the VSS process, and receive the VSS thaw notification i.e. applications can run again. The VSS will still work, even if this device file is not opened. However, only filesystem consistency is promised, if this device file is not opened or is not operated properly. hv_vss_daemon(8) is started by devd(8) by default. It can be disabled by editting /etc/devd/hyperv.conf. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: kib, mckusick Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8224 308742 hyperv/vss: Nuke unused variables. Submitted by: markj Reported by: markj Sponsored by: Microsoft 308743 hyperv/vss: Install the userland daemon to /usr/sbin instead of / Submitted by: markj Reported by: markj Sponsored by: Microsoft
* MFC 309274:jhb2016-12-161-1/+1
| | | | Use the correct name for the GCC macro indicating max_align_t is defined.
* MFC r296133:ngie2016-12-031-1/+1
| | | | | | | | | | | r296133 (by pfg): RPC: update the getrpcbyname() definition to include a const qualifier. Add const qualifier making getrpcbyname() and getrpcbyname_r() prototypes match those used in latest Sun RPC code (TI-RPC 2.3). Obtained from: NetBSD
* MFC 307756: Define max_align_t for C11.jhb2016-11-281-0/+8
| | | | | | | | | | | libc++'s stddef.h includes an existing definition of max_align_t for C++11, but it is only defined for C++, not for C. In addition, GCC and clang both define an alternate version of max_align_t that uses a union of multiple types rather than a plain long double as in libc++. This adds a __max_align_t to <sys/_types.h> that matches the GCC and clang definition that is mapped to max_align_t in <stddef.h>. PR: 210890
* Add posix_tnode to <search.h>.ed2016-10-291-0/+2
| | | | | | | | | In r307227 I've refactored the binary search tree functions to use the posix_tnode type. As this change does not apply cleanly to this version of FreeBSD, only make the change that matters: add the definition of the newly introduced type. This will ease source-level compatibility going forward.
* MFC r307131: install header files required development with libzfs_coreavg2016-10-281-0/+11
|
* MFC r306568, r306569vangyzen2016-10-081-2/+2
| | | | | | | Add the __printflike attribute to the declarations of dprintf(3) and vdprintf(3). Sponsored by: Dell EMC
* MFC r304703, r304755ache2016-08-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | 1) _locale.h LC_*_MASK bit shifting order was partially broken from the initial commit time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the right order. The order here should match XLC_* from "xlocale_private.h" which, in turn, match LC_* publicly visible order from <locale.h> which determines how locale components are stored in the structure. LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale() and equivalent shift loop in the newlocale(), so mapped to some wrong components (excluding two mentioned above). Formally the fix is ABI breakage, but old code using those masks never works properly in any case. Only newlocale() and querylocale() are affected. 2) msgcat.c Use current locale (f.e. set by thread). It was global locale always previously. PR: 211743
* MFC r300998:ed2016-06-181-0/+7
| | | | | | | Add missing va_list to <wchar.h>. It looks like va_list should always be defined when XSI is enabled. It moved over to the POSIX base in the 2008 edition.
* MFC r297212:dim2016-03-301-1/+1
| | | | | | For C++, expose long long types and functions (lldiv_t, llabs, lldiv, etc) in stdlib.h. These will be needed for newer versions of libc++, which uses them for defining overloaded versions of abs() and div().
* MFC r296394:pfg2016-03-251-9/+5
| | | | | | | | | | | | | | xdr: Fix xdr_rpc* defines. The defines for xdr_rpc* in xdr.h are wrong. It could be very well that Solaris did strip the '_t' from xdr_u_int32_t, but Solaris has a xdr_u_int32 function, we don't have this. So all of this defines will lead to an unresolved symbol. This explains why we do not use these functions in FreeBSD while they are used in Illumos/Solaris. Obtained from: linux libtirpc (git 7864122e61ffe4db1aa8ace89117358a1e3a391b)
* MFC r293491:kevlo2016-01-131-3/+6
| | | | | | | | | - Add the definition of CHARCLASS_NAME_MAX, as per POSIX.1-2001. - Avoid namespace pollution and move definitions of _POSIX2_CHARCLASS_NAME_MAX and _POSIX2_COLL_WEIGHTS_MAX into the .2001 section. With input from bde. Reviewed by: bde
* MFC r292514:ume2015-12-271-1/+1
| | | | | | addrinfo.ai_family is an address family, not a protocol family. PR: 162434
* Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).ume2015-12-251-1/+1
| | | | PR: 198092
* MFC r284289,r288267:bdrewery2015-12-041-1/+1
| | | | | | | r284289: Misc fixes from projects/bmake r288267: Remove redundant .NOPATH.
* MFC r289393:bdrewery2015-12-041-0/+1
| | | | Add more SUBDIR_PARALLEL.
* MFC r285140:ngie2015-12-011-0/+1
| | | | | | | | | | | | | | r285140 (by oshogbo): Add fdclose(3) function. This function is equivalent to fclose(3) function except that it does not close the underlying file descriptor. fdclose(3) is step forward to make FILE structure private. Reviewed by: wblock, jilles, jhb, pjd Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D2697
* MFC: r289863,r289931,r290110,r290230,r290231,r290232ache2015-11-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r290232: Microoptimize. r290231: Addition to prev. commit. In some edge cases fp->_p can be changed in _sseek(), recalculate. r290230: Don't seek to the end if write buffer is empty (in append modes). PR: 204156 r290110: Add _flags2 per jhb@ suggestion since no room left in _flags. Rewrite O_APPEND flag checking using new __S2OAP flag. r289931: According to POSIX, a write operation shall start at the current size of the stream (if mode had 'a' as the first character). r289863: Since no room left in the _flags, reuse __SALC for O_APPEND. It helps to remove _fcntl() call from _ftello() and optimize seek position calculation in _swrite().
* MFC r275805:tijl2015-04-301-2/+2
| | | | | | | | | | | | | Fix incorrect type of "invalids" argument in __iconv() prototype. MFC r281550,281591: Remove the const qualifier from iconv(3) to comply with POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html Adjust all code that calls iconv. PR: 199099
* MFC r278600:bdrewery2015-04-031-1/+1
| | | | Correct and clarify comment for __SMBF.
* MFC r278204:ngie2015-03-241-11/+10
| | | | | | Sort the entries by build knob, then MACHINE_ARCH like other areas of the tree Sponsored by: EMC / Isilon Storage Division
* MFC r278135,r278202:ngie2015-03-241-1/+5
| | | | | | | | | | | | | | | | | r278135 (by amdmi3): - Remove more files when MK_USB == no Reviewed by: ngie Approved by: ngie Differential Revision: D1600 r278202: Clean up more usb related files when MK_USB == no when dealing with manpages, libraries, and binaries Sponsored by: EMC / Isilon Storage Division
* MFC 273598 273602 273607 273613 273647:rpaulo2014-11-031-1/+3
| | | | Userland HPET support.
* MFC r258580:hrs2014-10-0916-423/+454
| | | | | | | | | | | | | | | | | | | | | Replace Sun RPC license in TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. MFC r258581, 258582: Replace Sun Industry Standards Source License for Sun RPC code with a 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. MFC r259117, 259118: Replace Sun RPC license with a 3-clause BSD license. This license change was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. MFC r259417: Replace Sun RPC license for TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. The code in question in this file was copied from lib/libc/rpc/pmap_getport.c.
* MFC r269867:ume2014-08-305-54/+159
| | | | | | | Update our stub resolver to final version of libbind (libbind-6.0). Obtained from: ISC
* MFC 268531,269079,269204:jhb2014-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various edge cases with rewinddir(), seekdir(), and telldir(): - In the unionfs case, opendir() and fdopendir() read the directory's full contents and cache it. This cache is not refreshed when rewinddir() is called, so rewinddir() will not notice updates to a directory. Fix this by splitting the code to fetch a directory's contents out of __opendir_common() into a new _filldir() function and call this from rewinddir() when operating on a unionfs directory. - If rewinddir() is called on a directory opened with fdopendir() before any directory entries are fetched, rewinddir() will not adjust the seek location of the backing file descriptor. If the file descriptor passed to fdopendir() had a non-zero offset, the rewinddir() will not rewind to the beginning. Fix this by always seeking back to 0 in rewinddir(). This means the dd_rewind hack can also be removed. - Add missing locking to rewinddir() - POSIX says that passing a location returned by telldir() to seekdir() after an intervening call to rewinddir() is undefined, so reclaim any pending telldir() cookies in the directory when rewinddir() is called. - If telldir() is called immediately after a call to seekdir(), POSIX requires the return value of telldir() to equal the value passed to seekdir(). The current seekdir code with SINGLEUSE enabled breaks this case as each call to telldir() allocates a new cookie. Instead, remove the SINGLEUSE code and change telldir() to look for an existing cookie for the directory's current location rather than always creating a new cookie. PR: 121656
* MFC r267441:tijl2014-06-201-2/+7
| | | | | | | | Don't install GSS-API headers when the GSSAPI option has been disabled. Some ports assume GSS-API is supported when they find the headers. PR: 189156 Submitted by: Garrett Cooper <yanegomi@gmail.com>
* MFC r266865;pfg2014-06-144-3/+53
| | | | | | | | | | | | | | | | Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance. POSIX.1-2008 specifies that those two functions should be declared by including <strings.h>, not <string.h> (the latter only has strcoll_l() and strxfrm_l()): http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html Bump __FreeBSD_version for ports that may be using the non-standard reference. Obtained from: DragonFlyBSD Reviewed by: theraven
* MFC r260913,266895:nwhitehorn2014-06-081-0/+1
| | | | | | | | | | Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles
* MFC r263998:tijl2014-04-154-4/+4
| | | | | Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions.
* Merge r257485: install netpfil/pf includes.glebius2014-03-191-0/+5
|
* Bulk sync of pf changes from head, in attempt to fixup broken build Iglebius2014-03-121-0/+7
| | | | | | | | | made in r263029. Merge r257186,257215,257349,259736,261797. These changesets split pfvar.h into several smaller headers and make userland utilities to include only some of them.
* MFC r258578, r258580, r258581 (by hrs):mav2014-01-2224-641/+596
| | | | | Replace Sun RPC license in TI-RPC library with a 3-clause BSD license with the explicit permissions.
* MFC r258537, r258587:gjb2013-11-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | r258537 (hrs): Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ when there is an invalid character in the output codeset while it is valid in the input. However, POSIX requires iconv() to perform an implementation-defined conversion on the character. So, Citrus iconv converts such a character to a special character which means it is invalid in the output codeset. This is not a problem in most cases but some software like libxml2 depends on GNU's behavior to determine if a character is output as-is or another form such as a character entity (&#NNN;). r258587 (peter): Move the iconv wrapper source from libc_nonshared to libc/iconv so that it is all in the one place again. Rename libc/iconv/iconv.c to bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT works again. Approved by: re (kib) Sponsored by: The FreeBSD Foundation
* MFC r258283 - move iconv* symbols out of libc.so.7 namespace withpeter2013-11-201-6/+1
| | | | | | compatibility symbols to aid transition for existing 10.x installs. Approved by: re (kib)
* MFC r257583, r258012, r258013:gjb2013-11-162-28/+1
| | | | | | | | | | | | | | | | | | | r257583 (peter): Remove the WITH_LIBICONV_COMPAT hack that seems to do more harm than good. This caused libc to spoof the ports libiconv namespace and provide a colliding libiconv.so.3 to fool rtld. This should have been removed some time ago. r258012: Remove WITH_LIBICONV_COMPAT file to chase after r257583. r258013: Regenerate src.conf.5 after removal of WITH_LIBICONV_COMPAT. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Sponsored by: The FreeBSD Foundation
* MFC r256925:tijl2013-10-251-0/+1
| | | | | | | | | | | Add a dummy statement to the beginning of the pthread_cleanup_pop() macro to allow a call of the macro to be labelled as in: label: pthread_cleanup_pop(); Reviewed by: imp Approved by: re (glebius)
* Set proper permissions on the generated osreldate.h file; a file readableian2013-09-301-0/+1
| | | | | | | only by root can cause install problems, especially over nfs. Submitted by: jilles@ Approved by: re (gjb)
* Remove BIND.des2013-09-301-5/+0
| | | | Approved by: re (gjb)
* Allow the path to the system source directory to be passed in toian2013-09-281-2/+4
| | | | | | | | | | | | | | | | newvers.sh. Pass it in from include/Makefile. If it isn't passed in, fall back to the old logic of using dirname $0. Using dirname $0 does not yield the path to the script if it was sourced in from another script in another directory; you end up with the parent script's path. That was causing newvers.sh to look one level below the FreeBSD src/ directory when building osreldate.h and it may find something like a git or svn repo there that has nothing to do with FreeBSD. PR: 174422 Approved by: re () MFC after: 2 weeks
* Prevent the set -e from mk-osreldate.sh from propagating into newvers.sh.nwhitehorn2013-09-281-1/+3
| | | | | | | | | This would cause detection of old versions of SVN to cause fatal errors instead of being caught and handled, which would make the build fail if the tree had been checked out with an older version of SVN (e.g. 1.6). Discussed with: gjb Approved by: re (marius)
* Launch the bourne shell using "sh" rather than "${SHELL}", as the latterian2013-09-231-1/+1
| | | | | | | | | | may come in from the environment and reflect the user's interactive shell. Using bare "sh" is the dominant pattern in existing makefiles. MFC this together with r255775. Approved by: re () MFC after: 2 weeks
* Launch the shell, passing it the path to the mk-osreldate script, ratherian2013-09-221-1/+1
| | | | | | | | | | than launching the script directly and relying on #! to launch the shell. This avoids problems when the source is mounted with the noexec flag. MFC this together with r255775. Approved by: re (kib) MFC after: 2 weeks
* Create a separate script to generate osreldate.h rather than sourcingian2013-09-212-13/+59
| | | | | | | | | | | | | | | | | newvers.sh into a temporary subshell with inline make rules. Using a separate script fixes a variety of problems, including establishing the correct dependencies in the makefiles. It also eliminates a problem with the way newvers.sh uses `realpath $0`, because $0 expands differently within a script sourced into a rule in a makefile depending on the version of make and of /bin/sh being used. The latter can cause build breakage in a cross-build environment, and can also make it difficult to compile 10.0 on older pre-10.0 systems. PR: 160646 174422 Submitted by: Garrett Cooper <yaneurabeya@gmail.com> Approved by: re (gjb) MFC after: 2 weeks
OpenPOWER on IntegriCloud