summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make getcwd(3) faster, simpler and more compliant using *at syscalls.jilles2009-10-131-45/+18
| | | | | It is no longer necessary to construct long paths consisting of repeated "../" which may be slow to process and may exceed PATH_MAX.
* Add C message catalogue entries for newer errnos: EBADMSG, EMULTIHOP,rwatson2009-10-131-0/+10
| | | | | | | ENOLINK, EPROTO, ENOTCAPABLE. Submitted by: Alan R. S. Bueno <alan.bsd at gmail.com> MFC after: 3 days (most)
* Make openat(2) a cancellation point.jilles2009-10-116-0/+38
| | | | | | | This is required by POSIX and matches open(2). Reviewed by: kib, jhb MFC after: 1 month
* In nanosleep(2), note that the calling thread is put to sleep, not thekib2009-10-111-1/+3
| | | | | whole process. Also explicitely name the parameter that specifies sleep interval.
* Document errno codes added in r144530.das2009-10-111-0/+8
|
* Add a new errno, ENOTCAPABLE, to be returned when a process requests anrwatson2009-10-072-0/+4
| | | | | | | | operation on a file descriptor that is not authorized by the descriptor's capability flags. MFC after: 1 month Sponsored by: Google
* Add basename_r(3) to complement basename(3). basename_r(3) which acceptsrwatson2009-10-064-13/+33
| | | | | | | | a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer. MFC after: 1 month Sponsored by: Google
* fts_open() requires that the list passed as argument to contain at leastdelphij2009-10-052-2/+8
| | | | | | | | | one path. When the list is empty (contain only a NULL pointer), return EINVAL instead of pretending to succeed, which will cause a NULL pointer deference in a later fts_read() call. Noticed by: Christoph Mallon (via rdivacky@) MFC after: 2 weeks
* pam_ssh needs roaming_dummy to link correctly against libssh.des2009-10-051-0/+3
|
* Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.edwin2009-10-051-0/+6
| | | | | | Also modify the "-k list" option to display only fields with a certain prefix. MFC after: 1 week
* Better glibc compatibility for getline/getdelim:das2009-10-041-2/+2
| | | | | | | | | | | | | | - Tolerate applications that pass a NULL pointer for the buffer and claim that the capacity of the buffer is nonzero. - If an application passes in a non-NULL buffer pointer and claims the buffer has zero capacity, we should free (well, realloc) it anyway. It could have been obtained from malloc(0), so failing to free it would be a small memory leak. MFC After: 2 weeks Reported by: naddy PR: ports/138320
* Install x86 related man pages on x86 systems only.rpaulo2009-10-041-0/+2
| | | | Reviewed by: jkoshy
* Correct the pthread stub prototype for pthread_mutexattr_settype to allow formarcus2009-10-011-1/+1
| | | | | | | | | the type argument. This is known to fix some pthread_mutexattr_settype() invocations, especially when it comes to pulseaudio. Approved by: kib deischen (threads) MFC after: 3 days
* Fix bug, when RADIUS client gave up after single sendto() error, do notmav2009-09-291-9/+4
| | | | | | trying backup servers. PR: kern/103764, misc/139214
* Add two new fcntls to enable/disable read-ahead:delphij2009-09-281-1/+17
| | | | | | | | | | | | | | | | | | | | - F_READAHEAD: specify the amount for sequential access. The amount is specified in bytes and is rounded up to nearest block size. - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential access size. A third argument of zero disables the read-ahead behavior. Please note that the read-ahead amount is also constrainted by sysctl variable, vfs.read_max, which may need to be raised in order to better utilize this feature. Thanks Igor Sysoev for proposing the feature and submitting the original version, and kib@ for his valuable comments. Submitted by: Igor Sysoev <is rambler-co ru> Reviewed by: kib@ MFC after: 1 month
* - Add Galician NLS cataloggabor2009-09-272-0/+250
|
* Make malloc(3) superpage aware. Specifically, if getpagesizes(3) returnsalc2009-09-262-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | a large page size that is greater than malloc(3)'s default chunk size but less than or equal to 4 MB, then increase the chunk size to match the large page size. Most often, using a chunk size that is less than the large page size is not a problem. However, consider a long-running application that allocates and frees significant amounts of memory. In particular, it frees enough memory at times that some of that memory is munmap()ed. Up until the first munmap(), a 1MB chunk size is just fine; it's not a problem for the virtual memory system. Two adjacent 1MB chunks that are aligned on a 2MB boundary will be promoted automatically to a superpage even though they were allocated at different times. The trouble begins with the munmap(), releasing a 1MB chunk will trigger the demotion of the containing superpage, leaving behind a half-used 2MB reservation. Now comes the real problem. Unfortunately, when the application needs to allocate more memory, and it recycles the previously munmap()ed address range, the implementation of mmap() won't be able to reuse the reservation. Basically, the coalescing rules in the virtual memory system don't allow this new range to combine with its neighbor. The effect being that superpage promotion will not reoccur for this range of addresses until both 1MB chunks are freed at some point in the future. Reviewed by: jasone MFC after: 3 weeks
* don't report error if key was deleted.davidxu2009-09-251-1/+11
| | | | PR: threads/135462
* rwlock implemented from libthr need to fall through the 'hard path' andattilio2009-09-231-2/+5
| | | | | | | | | | | | | | | | | | | | query umtx also if the shared waiters bit is set on a shared lock. The writer starvation avoidance technique, infact, can lead to shared waiters on a shared lock which can bring to a missed wakeup and thus to a deadlock if the right bit is not checked (a notable case is the writers counterpart to be handled through expired timeouts). Fix that by checking for the shared waiters bit also when unlocking the shared locks. That bug was causing a reported MySQL deadlock. Many thanks go to Nick Esborn and his employer DesertNet which provided time and machines to identify and fix this issue. PR: thread/135673 Reported by: Nick Esborn <nick at desert dot net> Tested by: Nick Esborn <nick at desert dot net> Reviewed by: jeff
* Correct a section name; specifically, "AUTHOR" should be "AUTHORS". [1]alc2009-09-211-3/+4
| | | | | | Turn the "AUTHORS" section into a full sentence. Pointed out by: ru [1]
* Fixed markup (mostly) errors.ru2009-09-211-48/+54
|
* Disable a check on a disk size because it's too strict. This change isnyan2009-09-211-0/+2
| | | | | | | | | to avoid using incorrect geometry. It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c. Reviewed by: rink MFC after: 3 days
* Add getpagesizes(3). This functions either the number of supported pagealc2009-09-194-3/+183
| | | | | | | sizes or some number of the sizes themselves. It is functionally compatible with a function by the same name under Solaris. Reviewed by: jhb
* Correct BIOS header sanitizing on pc98.nyan2009-09-191-3/+6
| | | | MFC after: 3 days
* Fix setfib(1) section number.brueffer2009-09-181-2/+2
| | | | | | PR: 133765 Submitted by: Konstantin Zolotukhin <erebus@gorodok.net> MFC after: 3 days
* Make libc.a provide __stack_chk_fail_local weak alias. This iskan2009-09-171-0/+4
| | | | | | needed to satisfy static libraries that are compiled with -fpic and linked into static binary afterwards. Several libraries in gcc are examples of such static libs.
* Fix an off-by-one error in the marking of the O_CH operatordds2009-09-161-1/+1
| | | | | | | following an OOR2 operator. PR: 130504 MFC after: 2 weeks
* Add a couple of debugging statements.dds2009-09-161-0/+3
|
* Add EV_RECEIPT to kevents.sson2009-09-161-0/+9
| | | | | | | | EV_RECEIPT is useful to disambiguating error conditions when multiple events structures are passed to kevent(2). The error code is returned in the data field and EV_ERROR is set. Approved by: rwatson (co-mentor)
* Add the EV_DISPATCH flag to kevents.sson2009-09-161-0/+5
| | | | | | | | When the EV_DISPATCH flag is used the event source will be disabled immediately after the delivery of an event. This is similar to the EV_ONESHOT flag but it doesn't delete the event. Approved by: rwatson (co-mentor)
* Add EVFILT_USER to kevents.sson2009-09-161-1/+39
| | | | | | | | | Add user events support to kernel events which are not associated with any kernel mechanism but are triggered by user level code. This is useful for adding user level events to an event handler that may also be monitoring kernel events. Approved by: rwatson (co-mentor)
* Add two test cases from PR 130504.dds2009-09-151-0/+3
| | | | | | | | | | An additional one coming from http://www.research.att.com/~gsf/testregex/ was not added; at some point the entire AT&T regression test harness should be imported here. But that would also mean commitment to fix the uncovered errors. PR: 130504 Submitted by: Chris Kuklewicz
* Use explicit int values for the device states in order to allow,attilio2009-09-151-4/+4
| | | | | | | | if necessary, in the future, adds of new states without breaking ABI between revisions. Proposed by: kib Approved by: imp
* Improve the way failure of pthread_key_create() gets detected.edwin2009-09-141-2/+9
| | | | | | PR: threads/138603 Submitted by: Mikulas Patocka MFC after: 1 week
* ANSIfy, whitespace and comment adjustments, to simplify comparing theseemaste2009-09-133-108/+65
| | | | files with NetBSD / OpenBSD versions.
* Bump our namespace version for 9.0.deischen2009-09-131-1/+11
| | | | | Add a comment about keeping the private namespace at the end of the dependency chain.
* Add simple embedded RADIUS server support to libradius, by extending existingmav2009-09-114-90/+334
| | | | | | | | | API, keeping backward compatibility. First consumer for this functionality is going to become forthcoming MPD-5.4, supporting CoA and DR of RFC 3576: Dynamic Authorization Extensions to RADIUS. MFC after: 1 month
* Make the description of `b' a little better.ed2009-09-091-1/+1
| | | | | | | If you have a one-byte sequence, `w', `b' is the second character. Not the third. Submitted by: Christoph Mallon
* Revert r196976, now that <machine/param.h> behaves predictably.phk2009-09-091-1/+0
|
* - Teach vesa(4) and dpms(4) about x86emu. [1]delphij2009-09-091-0/+1
| | | | | | | | | | - Add vesa kernel options for amd64. - Connect libvgl library and splash kernel modules to amd64 build. - Connect manual page dpms(4) to amd64 build. - Remove old vesa/dpms files. Submitted by: paradox <ddkprog yahoo com> [1], swell k at gmail.com (with some minor tweaks)
* cr_groups is no longer embedded in struct ucred and is instead storedbrooks2009-09-081-1/+1
| | | | | | | | | | | in a seperate array. As such we need to use kvm_read rather than bcopy to populate the ki_groups field. This fixes a crash when running ps -ax on a coredump. Reported by: brucec Tested by: brucec MFC after: 3 days
* Add necessary includephk2009-09-081-0/+1
|
* Fiz /usr/bin/unzip: A bug deep in libarchive's read-ahead logickientzle2009-09-082-3/+6
| | | | | | | | | | | | (incorrect handling of zero-length reads before the copy buffer is allocated) is masked by the iso9660 taster. Tar and cpio both enable that taster so were protected from the bug; unzip is susceptible. This both fixes the bug and updates the test harness to exercise this case. Submitted by: Ed Schouten diagnosed the bug and drafted a patch MFC after: 7 days
* Update tests to match r195873, which corrected how hardlinked fileskientzle2009-09-083-18/+40
| | | | | | on iso9660 images were returned. While I'm poking around, update some comments around this area to try to clarify what's going on and what still remains to be improved.
* Synchornize description in manual page with strerror() output.pjd2009-09-061-2/+2
|
* Handle zero size for posix_memalign. Return NULL or unique addresskib2009-09-051-0/+9
| | | | | | | according to the 'V' option. PR: standards/138307 MFC after: 1 week
* Let the armchair generals handle this one.des2009-09-0422-218/+22
|
* Document the need for a cast when passing a char to a ctype function.des2009-09-0322-22/+218
| | | | MFC after: 2 weeks
* Use (unsigned char) cast for ctype macroache2009-09-021-1/+1
|
* Fix regression introduced with NFSv4 ACL support - make acl_to_text(3)trasz2009-09-012-11/+12
| | | | | | | | | and acl_calc_mask(3) return error instead of crashing when acl passed to them is NULL. Submitted by: markus Reviewed by: rwatson MFC after: 3 days
OpenPOWER on IntegriCloud