summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary variable and fix the usage of sysctl(3).araujo2015-06-111-7/+5
| | | | | Differential Revision: D2733 Reviewed by: ngie, kib
* MFV r284234:delphij2015-06-101-3/+15
| | | | | | Update file to 5.23. MFC after: 2 weeks
* Add support for '_' occurring at the beginning or end of a nameume2015-06-101-3/+3
| | | | | | | | component. PR: 176093 Submitted by: landonf__at__bikemonkey.org MFC after: 1 week
* List kinfo_getfile.c only once.brooks2015-06-101-1/+1
| | | | | MFC after: 3 days Sponsored by: DARPA, AFRL
* o Rework ARMv7 events list using aliases - same way as we have for arm64.br2015-06-101-10/+53
| | | | o Extend it with Cortex A9-specific events.
* Add support for reading MAM attributes to camcontrol(8) and libcam(3).ken2015-06-094-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAM is Medium Auxiliary Memory and is most commonly found as flash chips on tapes. This includes support for reading attributes and decoding most known attributes, but does not yet include support for writing attributes or reporting attributes in XML format. libsbuf/Makefile: Add subr_prf.c for the new sbuf_hexdump() function. This function is essentially the same function. libsbuf/Symbol.map: Add a new shared library minor version, and include the sbuf_hexdump() function. libsbuf/Version.def: Add version 1.4 of the libsbuf library. libutil/hexdump.3: Document sbuf_hexdump() alongside hexdump(3), since it is essentially the same function. camcontrol/Makefile: Add attrib.c. camcontrol/attrib.c: Implementation of READ ATTRIBUTE support for camcontrol(8). camcontrol/camcontrol.8: Document the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.c: Add the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.h: Add a function prototype for scsiattrib(). share/man/man9/sbuf.9: Document the existence of sbuf_hexdump() and point users to the hexdump(3) man page for more details. sys/cam/scsi/scsi_all.c: Add a table of known attributes, text descriptions and handler functions. Add a new scsi_attrib_sbuf() function along with a number of other related functions that help decode attributes. scsi_attrib_ascii_sbuf() decodes ASCII format attributes. scsi_attrib_int_sbuf() decodes binary format attributes, and will pass them off to scsi_attrib_hexdump_sbuf() if they're bigger than 8 bytes. scsi_attrib_vendser_sbuf() decodes the vendor and drive serial number attribute. scsi_attrib_volcoh_sbuf() decodes the Volume Coherency Information attribute that LTFS writes out. sys/cam/scsi/scsi_all.h: Add a number of attribute-related structure definitions and other defines. Add function prototypes for all of the functions added in scsi_all.c. sys/kern/subr_prf.c: Add a new function, sbuf_hexdump(). This is the same as the existing hexdump(9) function, except that it puts the result in an sbuf. This also changes subr_prf.c so that it can be compiled in userland for includsion in libsbuf. We should work to change this so that the kernel hexdump implementation is a wrapper around sbuf_hexdump() with a statically allocated sbuf with a drain. That will require a drain function that goes to the kernel printf() buffer that can take a non-NUL terminated string as input. That is because an sbuf isn't NUL-terminated until it is finished, and we don't want to finish it while we're still using it. We should also work to consolidate the userland hexdump and kernel hexdump implemenatations, which are currently separate. This would also mean making applications that currently link in libutil link in libsbuf. sys/sys/sbuf.h: Add the prototype for sbuf_hexdump(), and add another copy of the hexdump flag values if they aren't already defined. Ideally the flags should be defined in one place but the implemenation makes it difficult to do properly. (See above.) Sponsored by: Spectra Logic Corporation MFC after: 1 week
* Sync with NetBSD:bapt2015-06-072-19/+20
| | | | | | | | | | - fix types of rl_completion_entry_function and rl_add_defun - call update pos before completion to refresh the screen From Thomas Eriksson Adjust API to a more modern readline (Ryo Onodera) remove duplicate declaration
* Set the correct register when calling sigprocmask in longjmp.andrew2015-06-061-1/+1
| | | | | Submitted by: Patrick Wildt <patrick@bitrig.org> Obtained from: drahn@bitrig.org
* strchr(3): Mdoc fixes.jilles2015-06-041-3/+5
|
* revert r283969,283970 not needed anymore after r283981bapt2015-06-044-53/+4
|
* Remove unused variable and silence clang warnings.araujo2015-06-041-2/+0
| | | | | Differential Revision: D2681 Reviewed by: rodrigc
* Clean up unused variable and silence clang warnings.araujo2015-06-041-3/+0
| | | | | Differential Revision: D2682 Reviewed by: rodrigc
* Remove unused variables and silence clang warnings.araujo2015-06-041-4/+2
| | | | | Differential Revision: D2686 Reviewed by: rodrigc
* Capitalize the list of accepted variablesbapt2015-06-031-3/+3
| | | | Suggested by: wblock
* Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) exceptbapt2015-06-034-4/+53
| | | | | | | | it takes a new argument allowing to specify the endianness of the database to generate Differential Revision: https://reviews.freebsd.org/D2730 Reviewed by: ian
* Fix typobapt2015-06-031-2/+2
|
* Remove unused variable allocated_ctx reported by clang.araujo2015-06-021-5/+1
| | | | | Differential Revision: D2684 Reviewed by: rodrigc
* Remove unused variable spotted by clang.araujo2015-06-011-2/+2
| | | | | Differential Revision: D2685 Reviewed by: rodrigc, stas
* Fix a debug statement. Only the callback function (performing thedteske2015-06-011-1/+1
| | | | | | | | incrementing of dpv_overall_oread) knows what its purpose is (and often times it was bytes, not lines). MFC after: 3 days X-MFC-to: stable/10
* Use proper prototype for harmless().rodrigc2015-05-311-1/+1
|
* Make x_putlong() and x_putbytes() prototypes match therodrigc2015-05-311-2/+2
| | | | prototypes in <rpc/xdr.h>
* Use ANSI C prototypes.rodrigc2015-05-318-275/+116
|
* Add the needed if-then instructions to build as Thumb-2.andrew2015-05-316-0/+53
|
* Remove __ARM_EABI__ from more places in libc as this is the only ARM ABIandrew2015-05-313-19/+7
| | | | we support.
* Use a register to set the cpsr bits. The ip register is safe to be changedandrew2015-05-312-8/+12
| | | | | | | | within all of these functions, and is only stored in some to correctly pad the stack. This will be needed to build as Thumb-2 as, unlike with ARM instructions, the msr instruction only takes a register as the input.
* Removed unused special fork() implementations.brooks2015-05-293-107/+1
| | | | | | | | | | | The arm version hasn't been used in ages. The mips version uses a valid, but pointless check of v1 and has been unhooked from the build since r276630. Differential Revision: https://reviews.freebsd.org/D2592 Reviewed by: emaste Sponsored by: DARPA, AFRL
* Fix __fpclassifyl when double == long double. As with r283693 this isandrew2015-05-291-0/+10
| | | | | | needed on ARM and PowerPC. MFC after: 1 Week
* Fix __isinfl on architectures where double == long double. This is theandrew2015-05-291-3/+5
| | | | | | case on at least ARM and PowerPC. MFC after: 1 week
* Export a list of VM objects in the system via a sysctl. The list can bejhb2015-05-274-2/+174
| | | | | | | | | | examined via 'vmstat -o'. It can be used to determine which files are using physical pages of memory and how much each is using. Differential Revision: https://reviews.freebsd.org/D2277 Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10)
* Add <sys/user.h> to the SYNOPSIS of the kinfo_get*() functions since thesejhb2015-05-274-4/+8
| | | | | | functions all return types that are defined in that header. MFC after: 1 week
* Update to ELF Tool Chain r3223emaste2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Highlights (upstream revisions): - Fix SHT_GROUP handling in elfcopy/strip (3206 3220 3221) - Misc elfcopy / strip bug fixes (3215 3216 3217) - Many C++ demangler improvements (3199 3200 3201 3202 3203 3204 3205 3208 3210 3211 3212) - Improve GNU binutils compatibility in elfcopy / strip (3213 3214) - Add -g option to readelf(1): dump contents of section groups (3219) - Add EM_IAMCU 32-bit Intel MCU (3198) Also add a compat #define for building with older FreeBSD ELF headers. The GRP_COMDAT flag was added to elf_common.h in r283110, but it's not available during the bootstrap build. It is also convenient to be able to build on older hosts. Thanks to antoine@ for tracking down issues through multiple exp-runs and to kaiw@ for fixing. PR: 198611 (exp-run), 200350 Sponsored by: The FreeBSD Foundation
* memmem(3): empty little string matches the beginning of the big stringemaste2015-05-262-11/+17
| | | | | | | | | | | | This function originated in glibc, and this matches their behaviour (and NetBSD, OpenBSD, and musl). An empty big string (arg "l") is handled by the existing l_len < s_len test. Reviewed by: bapt, ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2657
* Upgrade our copy of clang and llvm to 3.6.1 release.dim2015-05-256-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | This release contains the following cherry-picked revisions from upstream trunk: 226124 226151 226164 226165 226166 226407 226408 226409 226652 226905 226983 227084 227087 227089 227208 227209 227210 227211 227212 227213 227214 227269 227430 227482 227503 227519 227574 227822 227986 227987 227988 227989 227990 228037 228038 228039 228040 228188 228189 228190 228273 228372 228373 228374 228403 228765 228848 228918 229223 229225 229226 229227 229228 229230 229234 229235 229236 229238 229239 229413 229507 229680 229750 229751 229752 229911 230146 230147 230235 230253 230255 230469 230500 230564 230603 230657 230742 230748 230956 231219 231237 231245 231259 231280 231451 231563 231601 231658 231659 231662 231984 231986 232046 232085 232142 232176 232179 232189 232382 232386 232389 232425 232438 232443 232675 232786 232797 232943 232957 233075 233080 233351 233353 233409 233410 233508 233584 233819 233904 234629 234636 234891 234975 234977 235524 235641 235662 235931 236099 236306 236307 Please note that from 3.5.0 onwards, clang and llvm require C++11 support to build; see UPDATING for more information.
* Remove SUBDIR_DEPEND for non-existent libreadline directoryngie2015-05-241-1/+0
| | | | | | libreadline lives under gnu/lib MFC after: 1 week
* When only 2 bytes can be read from a 4 byte UTF-16 character in a base64tijl2015-05-241-24/+19
| | | | | | | | | encoded chunk of a UTF-7 string, treat that as an incomplete character and return an error instead of a shift sequence and no error. Also check that the low 2 bytes have a valid value. MFC after: 1 week
* Fix decoding of UTF-7 when a base64 encoded chunk appears at the end oftijl2015-05-241-5/+1
| | | | | | | | | | | | | | | | | | | | | | the input buffer. _citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it could restore this state on an incomplete character such that the next call would restart the decoding. The problem was that "-" (end of base64 mode) at the end of a string was also treated as an incomplete character but was also removed from the state buffer. So the initial state would be restored (with base64 mode) and the next call would no longer see the "-" so it continued in base64 mode. This state saving/restoring isn't needed here. It's already handled elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just remove it. Also initialise *nresult. PR: 200398 Tested by: delphij MFC after: 1 week
* Remove the stray DEBUG_FLAGS=-g line that snuck in with theimp2015-05-211-1/+0
| | | | soft-updates journaling project merge in r207141.
* Drop libmandoc and incorporate it into the main mandoc Makefilebapt2015-05-212-45/+0
| | | | | This simplifies maintainance of mandoc(1). Note that the same direction was taken on OpenBSD
* Remove clause 3 and 4 from the licensebapt2015-05-211-2/+0
| | | | Obtained from: NetBSD
* Create links to the libprocstat man pages for all of the libprocstat ↵allanjude2015-05-212-26/+57
| | | | | | | | | | | | | functions so they can be looked up by name Add a cross refrence to libprocstat in the procstat.1 man page Differential Revision: https://reviews.freebsd.org/D2578 Suggested by: jmg Reviewed by: brueffer Approved by: wblock (mentor) MFC after: 1 week Sponsored by: ScaleEngine Inc.
* Remove the write-only variable phent. We currently do not check thekib2015-05-201-5/+0
| | | | | | | | size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Fix underlinkingbapt2015-05-191-0/+2
|
* All FreeBSD platforms are elf: move i386-elf to i386emaste2015-05-196-3/+2
| | | | | | | | This was a leftover from when we had both i386 a.out and ELF. Reviewed by: kib, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2591
* Use fixed enum values for PMC_CLASSES().jhb2015-05-191-5/+12
| | | | | | | | | This removes one of the frequent causes of ABI breakage when new CPU types are added to hwpmc(4). Differential Revision: https://reviews.freebsd.org/D2586 Reviewed by: davide, emaste, gnn (earlier version) MFC after: 2 weeks
* Add Performance Monitoring Counters support for AArch64.br2015-05-191-0/+77
| | | | | | | | | | Family-common and CPU-specific counters implemented. Supported CPUs: ARM Cortex A53/57/72. Reviewed by: andrew, bz, emaste, gnn, jhb Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2555
* Synchronize libedit with NetBSDbapt2015-05-188-72/+116
| | | | | It incorporates and fixes our patches to get el_gets return the proper count of characters in unicode mode.
* Drop some unnecessary casts.pfg2015-05-181-4/+3
| | | | | Reported by: Clang static analyzer Obtained from: NetBSD
* In r279493, the functions pzero[f](), qzero[f], pone[f](),kargl2015-05-174-4/+4
| | | | | | | | and qone[f]() were marked as __inline, but their forward declarations were not updated. Fix the forward declarations to match the actual function declarations. Requested by: bde
* Some third-party malloc(3) implementations use pthread_setspecific(3)kib2015-05-151-110/+91
| | | | | | | | | | | | | | | | | | | | | | | | | to handle per-thread information. Since our pthread_setspecific() implementation calls calloc(3) to allocate per-thread specific data storage, things get complicated. Switch the allocator to use bare mmap(2). There is some loss of the allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct pthread_specific_elem) is 3K (it actually spans whole page due to padding), but I believe it is more acceptable than additional code for specialized allocator(). The alternatives would either to make the specific data array be part of the struct thread, or use internal bindings to call the libc malloc, avoiding interposing. Also do the style pass over the thr_spec.c, esp. simplify the conditionals nesting by returning early when an error detected. Remove trivial comments. Found by: yuri@rawbw.com PR: 200138 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Update to ELF Tool Chain r3197emaste2015-05-141-1/+1
| | | | | | | | | | Highlights: - Fix man page markup, whitespace, and typos - Fix sh_info of SHT_GROUP section to point to the correct string - Improve validation in readelf and elfcopy/strip - Handle DWARF 4's DW_AT_high_pc in addr2line Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud