summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Correct wording.kib2016-05-031-1/+1
| | | | | Submitted by: David A. Bright MFC after: 2 weeks
* Add EVFILT_VNODE open, read and close notifications.kib2016-05-031-8/+26
| | | | | | | While there, order EVFILT_VNODE notes descriptions alphabetically. Based on submission, and tested by: Vladimir Kondratyev <wulf@cicgroup.ru> MFC after: 2 weeks
* Issue NOTE_EXTEND when a directory entry is added to or removed fromkib2016-05-021-2/+8
| | | | | | | | the monitored directory as the result of rename(2) operation. The renames staying in the directory are not reported. Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru> MFC after: 2 weeks
* As a reader service, explain NOTE_LINK reporting for the directories.kib2016-05-011-0/+4
| | | | | Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru> MFC after: 1 week
* lib: minor spelling fixes in comments.pfg2016-05-0114-19/+19
| | | | No functional change.
* Provide an example to the kqueue man page, showingbcr2016-05-011-1/+52
| | | | | | | | | | | | | a basic usage example. Although it is an untypical example for the use of kqueue, it is better than nothing and should get people started. PR: 196844 Submitted by: fernando.apesteguia@gmail.com Reviewed by: kib Approved by: kib MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D6082
* Remove useless calls to basename().ed2016-05-011-2/+1
| | | | | | | | | | | | | | There are a couple of places in the source three where we call basename() on constant strings. This is bad, because the prototype standardized by POSIX allows the implementation to use its argument as a storage buffer. This change eliminates some of these unportable calls to basename() in cases where it was only added for cosmetical reasons, namely to trim argv[0]. There's nothing wrong with setting argv[0] to the full path. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D6093
* Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) failsngie2016-04-301-0/+1
| | | | | | | MFC after: 1 week Reported by: Coverity CID: 1341474 Sponsored by: EMC / Isilon Storage Division
* Remove a -Wunused-but-set-variable variable -- `pa`ngie2016-04-301-2/+0
| | | | | Reported by: gcc 5.x Sponsored by: EMC / Isilon Storage Division
* Remove kvm_getfiles(3)ngie2016-04-305-319/+4
| | | | | | | | | | | This libcall has been broken since (at least) r174989/8.0-RELEASE. Bump SHLIB_MAJOR for the change Differential Revision: https://reviews.freebsd.org/D6052 Relnotes: yes Reviewed by: jhb, markj Sponsored by: EMC / Isilon Storage Division
* Fix memory allocation edgecases in kvm_argv(..)ngie2016-04-301-3/+12
| | | | | | | | | | | | | - Don't leak nbufp on realloc failure in kvm_argv - Catch malloc errors with bufp - Set buflen last in the "buflen == 0" case to ensure that bufp/nbufp is properly reallocated on the next go around Differential Revision: https://reviews.freebsd.org/D6051 MFC after: 1 week Reviewed by: jhb, markj Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division
* libc: spelling fixes.pfg2016-04-3034-43/+43
| | | | Mostly on comments.
* Fix including Kyuafile in packaged base system.gjb2016-04-294-4/+8
| | | | | | | | | | | | Fix a related typo while here. Note, this change results in the Kyuafile inclusion in the runtime package, which needs to be fixed, however addresses the PR as far as I can tell in my tests. PR: 209114 Submitted by: ngie Sponsored by: The FreeBSD Foundation
* Fix va_list handlingngie2016-04-281-38/+41
| | | | | | | | | | | | | | | | | - Add missing va_end's after corresponding va_start's to cleanup state - Eliminate questionable bzero'ing of va_list passed in to do_buff_decode(..) and do_encode(..) from buff_{de,en}code_visit(..) and csio_{de,en}code_visit(..). Make va_list a pointer instead and pass NULL into the underlying functions to handler this in a portable way. - Do some minor style(9) clean up in affected functions. Differential Revision: https://reviews.freebsd.org/D6072 MFC after: 3 days Reported by: cppcheck, Coverity CID: 1018500-1018503 Reviewed by: cem Sponsored by: EMC / Isilon Storage Division
* Add 'devctl delete' that calls device_delete_child().jhb2016-04-273-2/+36
| | | | | | | | | | | | | 'devctl delete' can be used to delete a device that is no longer present. As an anti-foot-shooting measure, 'delete' will not delete a device unless it's parent bus says it is no longer present. This can be overridden by passing the force ('-f') flag. Note that this command should be used with care. If a device is deleted that is actually present it can't be resurrected unless the parent bus device's driver supports rescans. Differential Revision: https://reviews.freebsd.org/D6019
* Add a new rescan method to the bus interface.jhb2016-04-273-2/+28
| | | | | | | | The BUS_RESCAN() method rescans a single bus device checking for devices that have been added or removed from the bus. A new 'rescan' command is added to devctl(8) to trigger a rescan. Differential Revision: https://reviews.freebsd.org/D6016
* libcuse: make more use of the howmany() macro when available.pfg2016-04-261-1/+1
| | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
* libstand: make more use of the howmany() macro when available.pfg2016-04-261-1/+1
| | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
* libc: make more use of the howmany() macro when available.pfg2016-04-262-3/+2
| | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
* regex: prevent two improbable signed integer overflows.pfg2016-04-231-2/+2
| | | | | | | | | | | In matcher() we used an integer to index nsub of type size_t. In print() we used an integer to index nstates of type sopno, typedef'd long. In both cases the indexes never take negative values. Match the types to avoid any error. MFC after: 5 days
* Fix up pointer issues with lib/libkvmngie2016-04-2210-35/+52
| | | | | | | | | | | | | | | | In particular, - avoid dereferencing NULL pointers - test pointers against NULL, not 0 - test for errout == NULL in the top-level functions (kvm_open, kvm_openfiles, kvm_open2, etc) - Replace a realloc and free on failure with reallocf Found with: devel/cocchinelle Differential Revision: https://reviews.freebsd.org/D5954 MFC after: 1 week Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division
* Completely disable fmaxmin_test (follow up to r297952)ngie2016-04-211-3/+9
| | | | | | | | | | COMPILER_TYPE/COMPILER_VERSION doesn't get passed down properly at buildworld/installworld with older build hosts MFC after: never PR: 208703, 208963 Reported by: Jenkins Sponsored by: EMC / Isilon Storage Division
* elftoolchain: Use ${SRCTOP} for the top of the FreeBSD treeemaste2016-04-213-7/+7
| | | | | | | | It's provided by sys.mk so there's no need to derive it from ${.CURDIR}. Suggested by: ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5998
* Restore the original ascii.c from prior to r290494bapt2016-04-211-13/+10
| | | | | | | | It was doing the right thing, there was no need to "fail" to reinvent it from none.c Pointy hat: bapt Submitted by: ache
* Check the returned value of memchr(3) before using itbapt2016-04-201-1/+4
| | | | | Reported by: Coverity CID: 1338530
* Minor indentation issue.pfg2016-04-201-2/+1
|
* libc: use our roundup2/rounddown2() macros when param.h is available.pfg2016-04-203-6/+6
| | | | | rounddown2 tends to produce longer lines than the original code but still it makes the code more readable.
* Fix double fclose of `fp1` when freopen failsngie2016-04-201-1/+0
| | | | | | | | | | | | freopen handles closing file descriptors on error, with the exception of fdopen'ed descriptors, so closing an already fclose'd file descriptor is incorrect CID: 1338525 Differential Revision: https://reviews.freebsd.org/D6013 MFC after: 2 weeks Reported by: Coverity Sponsored by: EMC / Isilon Storage Division
* Make sure fmemopen succeeds in :test_append_binary_pos before calling ftellngie2016-04-191-0/+2
| | | | | | | | | | | on the FILE object This fixes potential null pointer dereferences on failure CID: 1254952 MFC after: 2 weeks Reported by: Coverity Sponsored by: EMC / Isilon Storage Division
* Remove trailing whitespace and use `nitems(mib)` instead of `2` whenngie2016-04-191-2/+2
| | | | | | | calling sysctl(3) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Use GPIOTOGGLE to toggle the pin state instead of read, modify and write.loos2016-04-191-5/+5
|
* Unbreak the build if you enable WITH_NANDallanjude2016-04-191-2/+2
| | | | | | | Followup to r298230 Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com> (original version) Sponsored by: ScaleEngine Inc.
* A new implementation of the loader block cacheallanjude2016-04-188-103/+189
| | | | | | | | | | | | | | | | | The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy. Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks. Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device. The cache also implements limited read-ahead to increase performance. To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache. Booting from a virtual CD over IPMI: 0ms latency, before: 27 second, after: 7 seconds 60ms latency, before: over 12 minutes, after: under 5 minutes. Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: delphij (previous version), emaste (previous version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D4713
* libc: do not include <sys/types.h> where <sys/param.h> was already includedavos2016-04-1839-42/+3
| | | | | | According to style(9): > normally, include <sys/types.h> OR <sys/param.h>, but not both. (<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
* Re-use our roundup2() macro instead of reinventing the wheel.pfg2016-04-181-6/+4
| | | | Obtained from: DragonflyBSD
* libipsec: use NULL instead of zero for pointers.pfg2016-04-181-1/+1
|
* libstand: use NULL instead of zero for pointers.pfg2016-04-183-10/+10
|
* libbluetooth: use NULL instead of zero for pointers.pfg2016-04-181-2/+2
|
* rexec(3): use NULL instead of zero for pointers.pfg2016-04-181-5/+5
|
* Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchainemaste2016-04-183-3/+3
| | | | | | | This produces a nicer path in debug info and build logs. MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Fixed indentation, minor style.pluknet2016-04-181-12/+12
|
* MFV r298178:delphij2016-04-182-4/+7
| | | | | | | Update file to 5.26. MFC after: 2 weeks Relnotes: yes
* Fix markup on "\n" in printf so it renders correctly.wblock2016-04-171-4/+4
| | | | | | PR: 208852 Submitted by: coder@tuxfamily.org MFC after: 1 week
* Remove lib/libcapsicum and libexec/casper, brought back asgjb2016-04-1718-2534/+0
| | | | | | | part of a merge mishap. Reported by: junovitch Sponsored by: The FreeBSD Foundation
* libc: make some more use of the nitems() macro.pfg2016-04-1610-26/+22
| | | | | | | | We have an nitems() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Given that it is available already without adding additional headers and other parts of libc already use it, extend a bit more its use.
* MFHgjb2016-04-1628-68/+87
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Import to 0.6.1phil2016-04-152-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0.5.0: document "trim" modifier add xo_emit_field functions Add xo_set_file{,_h} functions Fix LIBXO_* variables; add -L and -I as needed add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url' fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it flush after transitions; fix flush call in xo_do_emit mkdir the version-specific packaging dir use "XO_" instead of LIBXO_ 0.6.0: Add --with-retain-size to set the size (in bits) of the retain hash buckets Add The Argument Modifier ({a:}) Add retain and no-retain to --libxo autoconf: Add test for monitor.h Document quote heuristic go deep with nroff backslashes Use "ULL" for 32 bit check add xo_retain_clear and xo_retain_clear_all docs: combine two 'handles' section; move command line argument section handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD) make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use. new xo_emit_f functions nuke some unused UNUSEDs test code: path must be static update test cases 0.6.1: fix version number (missed a commit during new-release) Reviewed by: sjg Approved by: sjg (mentor)
| * import libxo-0.4.7phil2016-04-152-8/+8
| | | | | | | | | | | | | | | | Fix bug w/ {e:} in html, where no default encoding format was built docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo) Reviewed by: sjg Approved by: sjg (mentor)
| * Initialize pointer with NULL instead of 0.araujo2016-04-151-2/+2
| | | | | | | | Submitted by: pfg
| * Clean up trailing whitespace in lib/libcam; no functional changengie2016-04-142-18/+18
| | | | | | | | | | MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud