summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Document RFTSIGZMB. Fix spelling of SIGCHLD. Note that signals arekib2011-07-121-2/+14
| | | | | | delivered, not returned. MFC after: 1 week
* Mention myself in the AUTHORS section.pluknet2011-07-121-1/+8
| | | | Requested by: stas
* Provide a simple manual page for libprocstat(3).pluknet2011-07-122-2/+255
| | | | Reviewed by: jilles, gjb
* Update xz to git snapshot of v5.0 branch as of 20110711 (post-5.0.3)mm2011-07-111-3/+7
| | | | | | | For architectures with __NO_STRICT_ALIGNMENT define TUKLIB_FAST_UNALIGNED_ACCESS MFC after: 2 weeks
* posix_spawn: If an error is detected in the child process, reap the zombie.jilles2011-07-101-1/+4
| | | | | | | | | | Formerly, in this case an error was returned but the pid was also returned to the application, requiring the application to use unspecified behaviour (the returned pid in error situations) to avoid zombies. Now, reap the zombie and do not return the pid. MFC after: 2 weeks
* - Removing some unneeded definitions of NULL(cruft related to 1970's C).avatar2011-07-106-29/+15
| | | | | | | | | | | | | | | | | | | | | | In C90, NULL is guaranteed to be declared in <stddef.h> and also in <string.h>. Though the correct way to define NULL in FreeBSD is to include <sys/_null.h>, other parts of libstand still require <string.h> to build; therefore, we keep <string.h> in stand.h and add a note about this; - Removing no longer used 'Prototype' definition. Quote from bde@: 'Cruft related to getting incomplete struct declarations within prototypes forward-declared before the structs. It doesn't mean "prototype" but only part of a prototype-related hack. No longer used.' - Replacing iaddr_t with uintptr_t; - Removing use of long double to determine alignment. Use a fixed 16 byte alignment instead; Reviewed by: bde Obtained from: DragonFlyBSD (partially) MFC after: 1 month
* style(9) cleanupkevlo2011-07-101-1/+1
|
* Add a HISTORY sectionkevlo2011-07-101-0/+5
| | | | Requested by: arundel
* Add missing "swapuse" resource limit.trasz2011-07-091-1/+2
|
* - Add xdr_sizeof(3) to libckevlo2011-07-094-4/+22
| | | | | | - Document xdr_sizeof(3); from NetBSD Discussed with: kib
* Fixing building bustage on 32 bits platforms when WARNS >= 2. Note thatavatar2011-07-082-5/+10
| | | | | | | | | this fix only applies to zalloc.c, the other part of libstand such like qdivrem.c still gives compilation warnings on sparc64 tinderbox builds; therefore, WARNS level isn't changed for now. Submitted by: Garrett Cooper <yanegomi@gmail.com> Reviewed by: bde
* With retirement of cpumask_t and usage of cpuset_t for representing aattilio2011-07-041-29/+2
| | | | | | | | | | | | | | | mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient. Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))). This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement. MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
* LibUSB v1.0: Need at least one frame when doing the dummy openhselasky2011-06-281-1/+1
| | | | else clear stall won't work in that case.
* Build Scrt.o on powerpc64. Its introduction on other platforms got lostnwhitehorn2011-06-271-4/+10
| | | | during the period of time the powerpc64 port was on a project branch.
* Rewrite HISTORY: The SHA256 code first appeared in 6.0, and the SHA512cperciva2011-06-272-2/+2
| | | | code in 9.0; neither existed in FreeBSD 4.0.
* Fix whitespace inconsistencies in libc in files copyrighted by me.ed2011-06-265-8/+8
|
* Add missing libkvm and libutil dependencies.pluknet2011-06-251-0/+2
| | | | | | | Now libprocstat takes care of its own dependencies and does not require applications to specify them. Reviewed by: stas, jilles
* - Add two new API's to libusb20 which can be used to retrive informationhselasky2011-06-247-1/+47
| | | | | | | | | | about the parent USB device: - libusb20_dev_get_parent_address - libusb20_dev_get_parent_port - Rename libusb20_compat01.c into libusb01.c MFC after: 3 days
* Fixes to newer tftp code in libstand:rodrigc2011-06-241-51/+132
| | | | | | | | | | | | | | | | | | (1) Coding style changes. (2) If the server does not acknowledge any blocksize option, revert to the default blocksize of 512 bytes. (3) Send ACK if the first packet happens to be the last packet. (4) Do not accept blocksize greater than what was requested. (5) Drop any unwanted OACK received if a tftp transfer is already in progress. (6) Terminate incomplete transfers with a special no-error ERROR packet. Otherwise we rely on the tftp server to time out, which it does eventually, after re-sending the last packet several times and spamming the system log about it every time. This idea is borrowed from the PXE client, which does exactly that. Submitted by: Alexander Kabaev <kan@FreeBSD.org> Reviewed and Tested by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
* Change sparc64 to use the initial exec TLS model, too. This avoids randommarius2011-06-211-1/+1
| | | | assertion failures in _malloc_thread_cleanup().
* In the libm access macros for the double type, z can sometimeskargl2011-06-191-2/+1
| | | | | | | | be used uninitialized. This can lead to spurious exceptions and bit clobbering. Submitted by: bde Approved by: das (mentor)
* Put a quick bandaid on internal citrus locking.kan2011-06-192-1/+3
| | | | | The code is not quite right still, but it programs from deadlocking on themselves if one enables new citrus code by mistake.
* Do not set thread name to less than informative 'initial thread'.kan2011-06-191-1/+0
|
* libprocstat: For MAP_PRIVATE, do not consider the file open for writing.jilles2011-06-181-2/+4
| | | | | | | | | If a file is mapped with with MAP_PRIVATE, no write permission is required and changes do not end up in the file. Therefore, tools like fuser and fstat should not show the file as open for writing. The protection as displayed by procstat -v still includes write in this case, and shows 'C' for copy-on-write.
* libprocstat: Fix typo in error messages.jilles2011-06-181-5/+5
|
* libprocstat: Remove spaces between function name and open parenthesis.jilles2011-06-181-2/+2
|
* libprocstat: Correct format for size_t (should be %zu, not %zd).jilles2011-06-181-3/+3
|
* Fix clang warnings.benl2011-06-183-6/+7
| | | | Approved by: philip (mentor)
* Merge from r161730:marius2011-06-184-21/+54
| | | | | | | | | | | | | | | | | | | | o Set TP using inline assembly to avoid dead code elimination. o Eliminate _tcb. Merge from r161840: Stylize: avoid using a global register variable. Merge from r157461: Simplify _get_curthread() and _tcb_ctor because libc and rtld now already allocate thread pointer space in tls block for initial thread. Merge from r177853: Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library. MFC after: 1 week
* Document the latest changes to sctp_opt_info() in the code.tuexen2011-06-181-4/+31
| | | | | This makes sctp_opt_info() compiliant with the latest version of the socket API ID.
* Note how wait(3) is implemented.obrien2011-06-181-0/+13
|
* Sync with OpenBSD, primarily make the code easier to read, and a licensedelphij2011-06-182-68/+54
| | | | | | | change to standard OpenBSD ISC license. Obtained from: OpenBSD MFC after: 2 weeks
* Sync with OpenBSD (zap rcsid).delphij2011-06-181-7/+1
| | | | MFC after: 2 weeks
* The flags argument of mpool_get() is meaningful, document it.delphij2011-06-181-2/+9
| | | | MFC after: 2 weeks
* posix_spawn(3): Document r222511 (trying to close already closed fd).jilles2011-06-171-9/+14
| | | | MFC after: 1 week
* Add SCTP_MAX_BURST support to sctp_opt_info().tuexen2011-06-171-0/+3
| | | | | | This only applies to 9.0 and higher, since the type of the values has changed since we introduced it. So it can't be MFCed.
* Update the list of supported socket options for sctp_opt_info().tuexen2011-06-171-3/+6
| | | | MFC after: 1 month.
* Setting warnings without make universe considered harmful. Revert to WARNS=0imp2011-06-161-1/+1
| | | | until such time that the warnings at =2 are fixed for all platforms.
* Fix two typos and remove redundant code.tuexen2011-06-161-5/+2
| | | | MFC after: 1 month.
* * Fix the handling of addresses in sctp_sendv().tuexen2011-06-161-42/+83
| | | | | | | * Add support for SCTP_SENDV_NOINFO. * Improve the error handling of sctp_sendv() and sctp_recv(). MFC after: 1 month
* Using the correct format string(%zu) for size_t type. This should fix 64avatar2011-06-161-1/+1
| | | | | | bits builds. Submitted by: Garrett Cooper <yanegomi@gmail.com>
* Unbreaking build on sparc64.avatar2011-06-161-3/+3
| | | | Submitted by: Garrett Cooper <yanegomi@gmail.com>
* Use size of int to fetch sysctl kern.sched.cpusetsize because it haddavidxu2011-06-161-3/+3
| | | | | | switched from long to int type in kernel. Fixed by: pluknet
* Add support for the newly added SCTP API.tuexen2011-06-151-21/+253
| | | | | | | | | | | | | In particular add support for: * SCTP_SNDINFO, SCTP_PRINFO, SCTP_AUTHINFO, SCTP_DSTADDRV4, and SCTP_DSTADDRV6 cmsgs. * SCTP_NXTINFO and SCTP_RCVINFO cmgs. * SCTP_EVENT, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO and SCTP_DEFAULT_SNDINFO socket option. * Special association ids (SCTP_FUTURE_ASSOC, ...) * sctp_recvv() and sctp_sendv() functions. MFC after: 1 month.
* Bring back following change which was undone in previous commit:rodrigc2011-06-151-4/+4
| | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r172854 | marius | 2007-10-21 10:03:18 -0700 (Sun, 21 Oct 2007) | 16 lines Changed paths: M /head/lib/libstand/tftp.c - Given that we tell the compiler that struct ip is packed and 32-bit aligned, GCC 4.2.1 also generates code for sendudp() that assumes this alignment. GCC 4.2.1 however doesn't 32-bit align wbuf, causing the loader to crash due to an unaligned access of wbuf in sendudp() when netbooting sparc64. Solve this by specifying wbuf as packed and 32-bit aligned, too. As for lastdata and readudp() this currently is no issue when compiled with GCC 4.2.1, though give lastdata the same treatment as wbuf for consistency and possibility of being affected in the future. [1] - Sprinkle const on a lookup table. ------------------------------------------------------------------------
* Increase WARNS level to 2.rodrigc2011-06-151-1/+1
|
* (1) When sending the TFTP RRQ packet to read a file,rodrigc2011-06-151-35/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | send along the "blksize" option specified in RFC2348, and the "tsize" option specified in RFC2349. Add code to parse the TFTP Option Acknowledgement (OACK) packet as specified in RFC2347. For TFTP servers which support the "blksize" option, we can specify a TFTP Data block size larger than the default 512 bytes specified in RFC1350. This offers greater read performance when downloading files. We request an initial size of 1428 bytes, which is less than the Ethernet MTU of 1500 bytes. If the TFTP server sends back an OACK packet, then use the block size specified in the OACK packet. Most times it is usually the same value as what we request. If the TFTP server supports RFC2348, we will see performance improvements by transferring files over TFTP with larger block sizes. If we do not get back an OACK packet, then we most likely we are interoperating with a legacy TFTP server that does not support TFTP extension options, so default to the block size of 512 bytes. (2) If the "tftp.blksize" environment variable is set, then take that value and use it when sending the TFTP RRQ packet, instead of 1428. This allows us to set different values of "tftp.blksize" in the loader, so that we can test out different TFTP block sizes at run time. Obtained from: Juniper Networks Fixed by: rodrigc
* Currently tftp code in the loader retransmits the previous packet if it ↵rodrigc2011-06-151-0/+4
| | | | | | | | | | receives any unwanted packet(non-tftp). Change this to retransmit the packet(request or ack) only after a timeout. Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
* Added sendrecv_tftp function instead of sendrecv for use by tftp.rodrigc2011-06-151-2/+55
| | | | | | | | | | | In sendrecv_tftp: * Upon receving an unexpected block of data or error, resend the ACK immediately instead of waiting till the expiry of receive data timeout to resend the ACK. * change the receive timeout value between retries to be 2xMINTMO. Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
* In sendrecv function, change the receive timeout value between retriesrodrigc2011-06-151-1/+1
| | | | | | | | to increase in steps of MINTMO, instead of doubling the timeout for every retry. Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
OpenPOWER on IntegriCloud