summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Reimplement ctermid().ed2011-10-012-21/+35
| | | | | | | | | | | Even though POSIX allows us to return simply /dev/tty as a pathname identifying the controlling terminal of the running process, it is nicer if this function were actually useful, by returning the actual pathname of the controlling terminal. Implement ctermid() by using the kern.devname sysctl to resolve the actual name of /dev/tty. Don't use devname(3), since it may return bogus strings like #C:0x123.
* Get rid of major/minor number distinction.ed2011-09-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | As of FreeBSD 6, devices can only be opened through devfs. These device nodes don't have major and minor numbers anymore. The st_rdev field in struct stat is simply based a copy of st_ino. Simply display device numbers as hexadecimal, using "%#jx". This is allowed by POSIX, since it explicitly states things like the following (example taken from ls(1)): "If the file is a character special or block special file, the size of the file may be replaced with implementation-defined information associated with the device in question." This makes the output of these commands more compact. For example, ls(1) now uses approximately four columns less. While there, simplify the column length calculation from ls(1) by calling snprintf() with a NULL buffer. Don't be afraid; if needed one can still obtain individual major/minor numbers using stat(1).
* MFprojects/hid:mav2011-09-284-13/+61
| | | | | | | | | | | | | | Import the rest of HID improvements from the branch: - improve report descriptor parser in libusbhid to handle several kinds of reports same time; - add to the libusbhid API two functions wrapping respective kernel IOCTLs for reading and writing reports; - tune uhid IOCTL interface to allow reading and writing arbitrary report, when multiple supported by the device; - teach usbhidctl to set output and feature reports; - make usbhidaction support all the same item names as bhidctl. Sponsored by: iXsystems, inc.
* Update copyright dates and strip my middle name.des2011-09-278-8/+8
|
* Bump date.des2011-09-271-1/+1
|
* Think first, commit second.des2011-09-272-8/+19
| | | | | | 1. Allow the caller to select active mode. 2. Fix the envar logic so it *always* overrides the caller's flags. 3. Document the change from active to passive.
* Long overdue: make passive mode the default for ftp.des2011-09-271-2/+2
|
* Fix grammar.schweikh2011-09-271-3/+3
| | | | | | PR: 140457 Submitted by: jeremyhu AT apple.com MFC after: 2 weeks
* - Fix a trivial bug in iconv. When there is no space to perform thegabor2011-09-191-2/+1
| | | | | | | | | conversion, conversion must fail and errno must be set to E2BIG. PR: standards/160673 Submitted by: Henning Petersen <henning.petersen@t-online.de> Reviewed by: pluknet Approved by: re (kib), delphij (mentor)
* Implement missing USB debug information functions.hselasky2011-09-197-4/+184
| | | | | Approved by: re (kib) MFC after: 1 week
* Fix cpio on ARM.kientzle2011-09-132-4/+4
| | | | | | | PR: bin/160430 Submitted by: Ian Lepore Approved by: re (Kostik Belousov) MFC after: 7 days
* Upgrade to BIND version 9.8.1. Release notes at:dougb2011-09-031-0/+12
|\ | | | | | | | | | | | | | | https://deepthought.isc.org/article/AA-00446/81/ or /usr/src/contrib/bind9/ Approved by: re (kib)
| * Vendor import of BIND 9.8.1dougb2011-09-01126-1005/+1924
| |
| * Vendor import of BIND 9.8.0-P4dougb2011-07-16401-4055/+36976
| |
| * Vendor import of BIND 9.6-ESV-R4-P3dougb2011-07-0510-59/+78
| |
| * Vendor import of BIND 9.6-ESV-R4-P1dougb2011-05-27581-622/+629
| |
* | Cosmetic cleanup: remove #define LIBMEMSTAT used to prevent a nestedpluknet2011-09-021-1/+0
| | | | | | | | | | | | | | | | include of opt_vmpage.h from vm/vm_page.h. opt_vmpage.h was retired before 7.0 together with options PQ_NOOPT. Approved by: re (kib) MFC after: 3 days
* | Import additional bugfix for reading and extracting makefs-createdmm2011-09-021-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISO images with tar. Vendor revision 3648 (merge of 3647): Additional fix to issue 168 because the change of r3642 was not sufficient. - Make sure "CL" entry appear after its "RE" entry which the "CL" entry should be connected with. - Give consideration to the case that the top level "RE" entry has already been exposed outside before its tree. Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3648) MFC after: 3 days
* | Bump shared libraries version numbers in preparation for 9.0.kib2011-08-288-6/+9
| | | | | | | | | | | | | | | | This time, only libraries which ABI has been changed compared to stable/8, are bumped. ABI analysis done by: Gleb Kurtsou Approved by: re (kensmith)
* | Clarify the behaviour of sigwait() on signal interruption, and notekib2011-08-252-2/+20
| | | | | | | | | | | | the difference between sigwait() and sigtimedwait()/sigwaitinfo(). Approved by: re (bz)
* | Import bugfix for reading and extracting of FreeBSD ISO images with tar.mm2011-08-259-198/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream revision 3645 (merge of 3642): Change the mechanism handling a rr_moved directory, which is Rockridge extension that can exceed the limitation of a maximum directory depth of ISO 9660. - Stop reading all entries at a time. - Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE" have information to rebuild a full directory tree. - Tweak some related tests since we use Headsort for re-ordering entries and it cannot make a steady order when the keies of the entries are the same. http://code.google.com/p/libarchive/issues/detail?id=168 Reviewed by: kientzle Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3645) MFC after: 3 days
* | Spelling corrections for LibUSB manual page (2/2).hselasky2011-08-221-64/+70
| | | | | | | | | | | | MFC after: 1 week Approved by: re (kib) PR: docs/159898
* | Whitespace corrections for LibUSB manual page (1/2).hselasky2011-08-221-183/+118
| | | | | | | | | | | | MFC after: 1 week Approved by: re (kib) PR: docs/159898
* | Use correct enum instead of constant value.hselasky2011-08-201-1/+1
| | | | | | | | | | | | MFC after: 1 week Spotted by: scf @ Approved by: re (kib)
* | Add experimental support for process descriptorsjonathan2011-08-184-3/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "process descriptor" file descriptor is used to manage processes without using the PID namespace. This is required for Capsicum's Capability Mode, where the PID namespace is unavailable. New system calls pdfork(2) and pdkill(2) offer the functional equivalents of fork(2) and kill(2). pdgetpid(2) allows querying the PID of the remote process for debugging purposes. The currently-unimplemented pdwait(2) will, in the future, allow querying rusage/exit status. In the interim, poll(2) may be used to check (and wait for) process termination. When a process is referenced by a process descriptor, it does not issue SIGCHLD to the parent, making it suitable for use in libraries---a common scenario when using library compartmentalisation from within large applications (such as web browsers). Some observers may note a similarity to Mach task ports; process descriptors provide a subset of this behaviour, but in a UNIX style. This feature is enabled by "options PROCDESC", but as with several other Capsicum kernel features, is not enabled by default in GENERIC 9.0. Reviewed by: jhb, kib Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* | Update LibUSB v1.0 manual page:hselasky2011-08-162-22/+34
| | | | | | | | | | | | | | | | | | - fix some minor spelling - fix some style - add description of new function MFC after: 1 week Approved by: re (kib)
* | Add missing function to get device speed to the LibUSB v1.0 API.hselasky2011-08-162-0/+30
| | | | | | | | | | MFC after: 1 week Approved by: re (kib)
* | Cross-reference cap_new(2) from dup(2), as they have similar functionality.rwatson2011-08-141-1/+7
| | | | | | | | Approved by: re (kib)
* | Updates to libprocstat(3) and procstat(1) to allow monitoring Capsicumrwatson2011-08-142-11/+19
| | | | | | | | | | | | | | | | | | | | capability mode and capabilities. Right now no attempt is made to unwrap capabilities when operating on a crashdump, so further refinement is required. Approved by: re (bz) Sponsored by: Google Inc
* | Fix a pathname (s,netinet/if_ether.h,net/ethernet.h,).hrs2011-08-081-1/+1
| | | | | | | | | | | | PR: docs/159341 Submitted by: Garrett Cooper Approved by: re (kib)
* | Merge revision 3554 from libarchive's release/2.8 branch:mm2011-08-073-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | Partial merge of 2431 from trunk: Retry writes on EINTR. This should fix the SIGINT handler in bsdtar. Note: The rest of r2431 can't be merged, since it interacts with a big write-side rearchitecture. PR: bin/149409 Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days
* | Change lwp to int64_t as thr_pread_long() always uses a 64-bit valuemarius2011-08-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | in order to account for LP64 targets when cross-debugging on ILP32, allowing r224683 to compile on ILP32. Note that thr_p{read,write}_{long,ptr}() still incorrectly use the size of the respective types on the host rather than that on the target when accessing the target address space which still needs to be fixed. This means that r224683 alone may not be sufficient to solve the problem it's intended to fix when cross-debugging. Approved by: re (hrs)
* | Add compatibility for ISO images created with unfixed makefs thatmm2011-08-0711-35/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD. This allows tar to read FreeBSD distribution ISO images created with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1). In addition, merge following important bugfixes from libarchive's release/2.8 branch: Revision 2812: Merge 2811 from trunk: Don't try to verify that compression-level=0 produces larger results than the default compression, since this isn't true for all versions of liblzma. Revision 2817: Merge 2814 from trunk: Fix Issue 121 (mtree parser error) http://code.google.com/p/libarchive/issues/detail?id=121 Revision 2820: Fix issue 119. Change the file location check that a file location does not exceed volume block. New one is that a file content does not exceed volume block(end of an ISO image). It is better than previous check even if the issue did not happen. While reading an ISO image generated by an older version of mkisofs utility, a file location indicates the end the ISO image if its file size is zero and it is the last file of all files of the ISO image, so it is possible that the location value is the same as the number of the total block of the ISO image. http://code.google.com/p/libarchive/issues/detail?id=119 Revision 2955: Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when the open has failed and we're trying to write Zip format. http://code.google.com/p/libarchive/issues/detail?id=134 Revision 2958: Followup on Issue 134: 1) Port test_open_failure to libarchive 2.8 branch to test the problem reported in Issue 134. This test also shows that archive_read_open() sometimes fails to report open errors correctly. 2) Fix the bug in archive_read.c 3) Comment out the tests that close functions are invoked promptly when open fails; that's fully fixed in libarchive 3.0, but I don't think it's worth fixing here. Revision 3484: Use uintmax_t with %ju Revision 3487: Fix issue 163. Correctly allocate enough memory for a input buffer saved. http://code.google.com/p/libarchive/issues/detail?id=163 Revision 3542: Merge 2516, 2536 from trunk: Allow path table offset values of 0 and 18, which are used by some ISO writers. Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days
* | Implementmarius2011-08-061-5/+30
| | | | | | | | | | | | Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* | Use the size of struct fpreg rather than of the pointer to it when copyingmarius2011-08-061-2/+5
| | | | | | | | | | | | | | | | the FPU state. Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* | The tid member of struct pthread actually is long so read it as such.marius2011-08-061-8/+8
| | | | | | | | | | | | | | | | | | Accessing it as an int causes failure on big-endian LP64, i.e. mips64be, powerpc64 and sparc64. Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* | Add support for PBVM addresses. In a nutshell this means:marcel2011-08-061-7/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o get the physical address and size of the PBVM page table. This can be found in the bootinfo structure, of which the physical address is recorded as the ELF entry point. o translate region 4 virtual addresses to physical addresses using the PBVM page table. In _kvm_kvatop() make the distinction between physical address and core file offset a little clearer to avoid confusion. To further enhance readability, always store the translated address into pa so that it's obvious how the translation from va to pa happened. Approved by: re (blanket)
* | The result of a joint work between rrs@ and myself at the IETF:tuexen2011-08-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | * Decouple the path supervision using a separate HB timer per path. * Add support for potentially failed state. * Bring back RTO.min to 1 second. * Accept packets on IP-addresses already announced via an ASCONF * While there: do some cleanups. Approved by: re@ MFC after: 2 months.
* | fix a serious bug in libproc's proc_attachavg2011-08-031-2/+1
| | | | | | | | | | | | | | | | | | | | proc_attach always frees any struct proc_handle data that it allocates, but that is supposed to be done only in error conditions. PR: bin/158431 Approved by: re (kib) MFC after: 1 week
* | Get rid of MAXCPU knowledge used for internal needs only. Switch topluknet2011-08-016-64/+41
| | | | | | | | | | | | | | | | | | | | | | dynamic memory allocation to hold per-CPU memory types data (sized to mp_maxid for UMA, and to mp_maxcpus for malloc to match the kernel). That fixes libmemstat with arbitrary large MAXCPU values and therefore eliminates MEMSTAT_ERROR_TOOMANYCPUS error type. Reviewed by: jhb Approved by: re (kib)
* | MFprojects/hid:mav2011-07-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | - Fix usbhidctl and usbhidaction to handle HID devices with multiple report ids, such as multimedia keyboards. - Add collection type and report id to the `usbhidctl -r` output. They are important for proper device understanding and debugging. - Fix usbhidaction tool to properly handle items having report_count more then 1. Approved by: re (kib) MFC after: 2 weeks
* | Remove incorrect attribution.gnn2011-07-211-1/+1
| | | | | | | | | | | | Approved by: re (kib) Pointed out by: brueffer Pointy hat to: gnn
* | Make both stpcpy and strcpy be assembly language implementationsgnn2011-07-213-20/+60
| | | | | | | | | | | | | | | | | | on amd64. Submitted by: Guillaume Morin (guillaume at morinfr.org) Reviewed by: kib, jhb Approved by: re (bz) MFC after: 1 month
* | Add cap_new(2) and cap_getrights(2) symbols to libc.jonathan2011-07-203-1/+478
| | | | | | | | | | | | | | | | These system calls have already been implemented in the kernel; now we hook up libc symbols so userspace can drive them. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* | Fix building of 32-bit compat libraries on amd64 with clang, and usingdim2011-07-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | -g, by reverting r219139. The LLVM PR referenced in that revision was fixed in the mean time, and we imported a clang snapshot soon afterwards, so the temporary workaround of disabling clang's integrated assembler is no longer needed. In this particular case, using e.g. DEBUG_FLAGS=-g causes clang to output certain directives into assembly that our version of GNU as chokes on. Reported by: dougb Approved by: re (kib)
* | Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.bz2011-07-181-2/+2
| | | | | | | | | | | | | | | | | | Provide backward compatibility defines under BURN_BRIDGES. Suggested by: jhb Reviewed by: emaste Sponsored by: Sandvine Incorporated Approved by: re (kib)
* | Disable gvmat64.S, the assembler version of longest_match for now.delphij2011-07-181-10/+10
| | | | | | | | | | | | PR: kern/154073 MFC after: 3 days Approved by: re (kib)
* | - Update libarchive to 2.8.4mm2011-07-1745-103/+5799
| | | | | | | | | | | | | | | | - Add support for extracting xar and rpm archives - Add libarchive_fe subdir (common code for tar and cpio) Approved by: kientzle MFC after: 2 weeks
| |
| \
*-. \ Upgrade our copy of llvm/clang to r135360, from upstream's trunk.dim2011-07-1761-128/+228
|\ \ \
| | * | Vendor import of clang trunk r135360:dim2011-07-17209-9638/+25449
| | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/trunk@135360
OpenPOWER on IntegriCloud