summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-1941-41/+41
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* Correct AT_SYMLINK_FOLLOW flag name in linkat(2) man page.jilles2009-07-191-1/+1
| | | | Approved by: re (kib), ed (mentor)
* Store accurate offset information in CTF data. A large number ofnp2009-07-171-2/+2
| | | | | | | | | | | | | | | structs had incorrect member offsets, limiting dtrace's usefulness when working with them. An example of incorrect info (struct rtentry) from before this fix: <1738> STRUCT rtentry (200 bytes) rt_nodes type=1731 off=0 rt_gateway type=849 off=65280 <== WRONG, should be 8 * 96 rt_flags type=3 off=65344 <== wrong again, and so on.. ... Approved by: re (kib), gnn (mentor) MFC after: 2 weeks
* Implement RTLD_NOLOAD flag for dlopen(3).kib2009-07-171-1/+8
| | | | | | Requested and tested by: jkim Reviewed by: kan Approved by: re (kensmith)
* Second attempt at eliminating .text relocations in shared librarieskan2009-07-143-8/+2
| | | | | | | | | | | | | | compiled with stack protector. Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work every time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kib)
* - Change mmap() to fail requests with EINVAL that pass a length of 0. Thisjhb2009-07-141-2/+2
| | | | | | | | | | | | behavior is mandated by POSIX. - Do not fail requests that pass a length greater than SSIZE_MAX (such as > 2GB on 32-bit platforms). The 'len' parameter is actually an unsigned 'size_t' so negative values don't really make sense. Submitted by: Alexander Best alexbestms at math.uni-muenster.de Reviewed by: alc Approved by: re (kib) MFC after: 1 week
* Add missing MLINKS for acl_{get,set}_link_fd(3).trasz2009-07-141-0/+2
| | | | Approved by: re (kib)
* Move msg{snd,recv,get,ctl} manual pages from section 3 to 2.trasz2009-07-137-26/+27
| | | | Approved by: re (kib)
* Fix fwrite() to return 0 when size or nmemb are zero.ed2009-07-122-4/+9
| | | | | | | | Right now nmemb is returned when size is 0. In newer versions of the standards, it is explicitly required that fwrite() should return 0. Submitted by: Christoph Mallon Approved by: re (kib)
* Sync the libusb 1.0 exported api to the latest GSoC code.thompsa2009-07-105-506/+510
| | | | | | | | | | - Fix possible uninitialised variables and null derefs - Support big transfers - Various bug fixes and style changes Submitted by: Sylvestre Gallon Sponsored by: Google Summer of Code 2009 Approved by: re (kib)
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* There is an optimization in chmod(1), that makes it not to call chmod(2)trasz2009-07-083-3/+27
| | | | | | | | | | | | | if the new file mode is the same as it was before; however, this optimization must be disabled for filesystems that support NFSv4 ACLs. Chmod uses pathconf(2) to determine whether this is the case - however, pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't. This change adds lpathconf(3) to make it possible to solve that problem in a clean way. Reviewed by: rwatson (earlier version) Approved by: re (kib)
* In the current code, rdlock_count is not correctly handled for some cases.attilio2009-07-062-1/+4
| | | | | | | | | | | | | | | The most notable is that it is not bumped in rwlock_rdlock_common() when the hard path (__thr_rwlock_rdlock()) returns successfully. This can lead to deadlocks in libthr when rwlocks recursion in read mode happens. Fix the interested parts by correctly handling rdlock_count. PR: threads/136345 Reported by: rink Tested by: rink Reviewed by: jeff Approved by: re (kib) MFC: 2 weeks
* - Don't suggest opening file for writing in preparation for fexecve(2).pjd2009-07-051-6/+5
| | | | | | - execve(2)/fexecve(2) won't return ETXTBSY if file is open for reading. Approved by: re (kib)
* Make it clear where to look for for protocol-specific socket options.trasz2009-06-301-0/+9
| | | | | Reviewed by: rwatson Approved by: re (kib)
* Make the structure definitions in the man pages match the real code, andkib2009-06-293-25/+7
| | | | | | remove no longer valid caution. Approved by: re (kensmith)
* Back out previous revision until better tested fix is ready.kan2009-06-293-2/+8
| | | | Approved by: re (impliciti, by approving previos check-in)
* Eliminate .text relocations in shared libraries compiled with stack protector.kan2009-06-283-8/+2
| | | | | | | | | | | | Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work everys time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kensmith)
* Implement %z for strptime.delphij2009-06-251-0/+28
| | | | | | PR: kern/63064 Submitted by: Stefan `Sec` Zehl <sec 42 org> (with some small changes) MFC after: 1 month
* Fix dynamic (re)allocation logic in jailparam_set and jailparam_get.jamie2009-06-251-34/+72
| | | | | | Touch up jailparam_import a bit while I'm at it. Approved by: bz (mentor)
* Fix acl_set_fd(3) and acl_get_fd(3) for cases where the kernel doesn't knowtrasz2009-06-252-2/+3
| | | | anything about _PC_ACL_NFS4.
* Manual page tweaks.trasz2009-06-251-2/+2
|
* Fix c194955 - somehow I managed all the new files, tripling theirtrasz2009-06-2517-4664/+0
| | | | contents.
* Bump manual page timestamps.trasz2009-06-2519-19/+19
|
* Add NFSv4 ACL support to libc.trasz2009-06-2540-167/+7762
| | | | | | | | | | | This adds the following functions to the acl(3) API: acl_add_flag_np, acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np, acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np, acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np, acl_strip_np, acl_get_brand_np. Most of them are similar to what Darwin does. There are no backward-incompatible changes. Approved by: rwatson@
* Lock around access to nc_file and netconfig_info ("ni"). The RPCdelphij2009-06-241-3/+49
| | | | | | | | | part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun <snnn119 gmail com> MFC after: 2 weeks
* Change the ABI of some of the structures used by the SYSV IPC API:jhb2009-06-245-8/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1]
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getjamie2009-06-246-2/+1450
| | | | | | system calls and the security.jail.param sysctls. Approved by: bz (mentor)
* Fix copy-and-paste-o's from kinfo_getfile.3 in kinfo_getvmmap.3.rwatson2009-06-241-2/+2
| | | | MFC after: 3 days
* Update SCCS IDs for Berkeley DB 1.86 merge.delphij2009-06-242-2/+2
|
* style: operators should appear at the line end if we have to wrap.delphij2009-06-241-2/+2
|
* Use const instead of __const, and merge the license change from NetBSD.delphij2009-06-231-9/+3
| | | | Obtained from: NetBSD
* Merge NetBSD revision 1.14: humanize_number.c is now 2-clause BSD licensed.delphij2009-06-231-8/+1
| | | | | | | (humanize_number.3 intentionally hold back until I make sure why we didn't merged dehumanize_number(3)). Obtained from: NetBSD
* K&R -> ANSIdelphij2009-06-233-10/+5
|
* Remove duplicate if-statement on gmt_is_set in gmtsub().edwin2009-06-231-8/+6
| | | | MFC after: 1 week
* Usermode portion of the support for swap allocation accounting:kib2009-06-232-0/+10
| | | | | | | | | | | - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
* Add a limit for child jails via the "children.cur" and "children.max"jamie2009-06-231-7/+7
| | | | | | parameters. This replaces the simple "allow.jails" permission. Approved by: bz (mentor)
* Remove unneeded stdlib directories.ed2009-06-234-12/+0
| | | | | | | It's not necessary to add stdlib directories for each architecture, even if the architecture doesn't implement any files of its own. Submitted by: Christoph Mallon
* Simplify. We can just use .sinclude here.ed2009-06-231-3/+1
| | | | Submitted by: Christoph Mallon
* Remove hand-written labs/abs implementations. GCC is smart enough.ed2009-06-233-95/+1
| | | | | | | It turns out GCC generates code that's a couple of bytes big bigger, but performs no branching whatsoever. Submitted by: Christoph Mallon
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-3/+1
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* Add files missed in r194674.thompsa2009-06-235-0/+2861
| | | | | | | | | | | | | | | Add libusb 1.0 support which is compatible with the latest revision on Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and supersedes the original libusb released 10 years ago, it supports isochronous endpoints and asynchronous I/O. Many applications have already started using the interfaces. This has been developed as part of Google Summer of Code this year by Sylvestre Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0 Submitted by: Sylvestre Gallon Sponsored by: Google Summer of Code 2009 Reviewed by: Hans Petter Selasky
* Add libusb 1.0 support which is compatible with the latest revision onthompsa2009-06-235-799/+1227
| | | | | | | | | | | | | | Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and supersedes the original libusb released 10 years ago, it supports isochronous endpoints and asynchronous I/O. Many applications have already started using the interfaces. This has been developed as part of Google Summer of Code this year by Sylvestre Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0 Submitted by: Sylvestre Gallon Sponsored by: Google Summer of Code 2009 Reviewed by: Hans Petter Selasky
* free(3) won't mess with errno so return it as-is.delphij2009-06-221-5/+1
| | | | Submitted by: Jaakko Heinonen <jh saunalahti fi>
* Split tolower/toupper code from usual xlat16 kiconv table, and make itdelphij2009-06-223-25/+163
| | | | | | | | possible to do tolower/toupper independently without code conversion. Submitted by: imura (but bugs are mine) Obtained from: http://people.freebsd.org/~imura/kiconv/ (1_kiconv_wctype_kern.diff, 1_kiconv_wctype_user.diff)
* Add prototypes when the library is compiled static.delphij2009-06-222-2/+10
|
* - Fall-back to /etc/termcap.small if there is no /usr/share/misc/termcaprafan2009-06-221-1/+1
| | | | | | | | | | (i.e. /etc/termcap). This can be useful when using /rescue/vi while /usr is not (or unable to be) mounted. The termcap.small can be found in src/etc/termcap.small. PR: bin/80256 (audit-trail) Submitted by: Brian Candler <B.Candler at pobox.com>, Alex Kozlov <spam at rm-rf.kiev.ua> MFC after: 1 month
* Remove unneeded stores back into the function arguments.ed2009-06-222-4/+0
| | | | Submitted by: Christoph Mallon
* - Eliminate extra subcs instruction. I have not noticed before that westas2009-06-211-2/+1
| | | | | always perform substraction now, so no instruction could be rordered to eliminate the conditional substraction.
* - Fix strncmp on arm. Return 0 as result without performing thestas2009-06-211-5/+9
| | | | | | | | main cycle only if the len passed is equal to 0. If end address overflows use last possible address as the end address. Based on: discussion on arm@ MFC after: 1 month
OpenPOWER on IntegriCloud