summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Style: tabs after #definekientzle2008-12-061-2/+2
|
* Use GCC-specific dead function markers only when using GCC.kientzle2008-12-061-1/+8
|
* Structure declarations can't be dllexported.kientzle2008-12-061-1/+1
|
* Style fixes:kientzle2008-12-061-29/+71
| | | | | | | | | | | | | | * Wrap long declarations to fit 80 chars * #undef macros that shouldn't be exported * Organize the version-dependent conditionals a bit more consistently Speculative: * libarchive 3.0 will (eventually) use int64_t instead of off_t. This is an attempt to avoid some the headaches caused by Linux LFS. (I'll still have to do ugly things for the struct stat references in archive_entry.h, of course.)
* A couple of portability fixes from Joerg Sonnenbergerkientzle2008-12-061-8/+8
|
* Recover after test failure.kientzle2008-12-061-1/+4
|
* Style: skipping() function correctly counts this as a skipped test.kientzle2008-12-061-1/+1
|
* Style improvements.kientzle2008-12-061-4/+6
|
* Better reporting of test failures.kientzle2008-12-061-4/+10
|
* Recover from a test failure here.kientzle2008-12-061-1/+4
|
* New internal archive_string_concat utility function.kientzle2008-12-062-0/+18
|
* Minor portability: Declare 'r' only within the conditionalkientzle2008-12-061-2/+2
| | | | block where it's used; S_ISLNK is more portable than S_ISLINK.
* Windows build now uses PLATFORM_CONFIG_H macro, so we can eliminate thekientzle2008-12-061-4/+1
| | | | special case for it.
* 2 is more portable than STDERR_FILENOkientzle2008-12-061-1/+1
|
* Some libstand/bootp.c extension (written by Danny Braniss, slightlyluigi2008-12-051-0/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | revised/modified by me) to store dhcp options into kenv variables, so the information is available to the boot loader and can be used to customize the boot process. The change is totally unintrusive, essentially made of a single function to be called while parsing a dhcp response, and a couple of tables to classify options. The values extracted from dhcp options are stored in the kenv environment in one of these forms: + options whose name and type is known are saved as dhcp.name = value (string, or number/ip addresses lists) + unknown options are assumed to be strings and saved as dhcp.option-NNN = "value" + options listed as '__INDIR' and sent on the wire as e.g. option unknown-252 "some.name=the actual value" are saved as some.name = "the actual value" + options listed as '__ILIST' and sent on the wire as e.g. option unknown-249 "a.b=foo bar; c.d= 123; e.f=done" are saved as multiple values a.b="foo bar" c.d="123" e.f="done" As you can see there is quite a bit of flexibility on what can be passed to the loader or the kernel. For the time being the vendor-specific table is mostly disabled, because there is no standard set of options for FreeBSD, and I don't know all the pxe-specific vendor options. Also, applications using libstand may live in memory-constrained environments, so it makes sense to keep these tables as small as possible, especially considering that one can generate arbitrary name=value pairs using site-specific options of type __INDIR or __ILIST (there are 4 __ILIST and 5 __INDIR in the table, numbered 246..249 and 250..254). Actually, considering that probably 75% of the standard dhcp options are totally useless, it might make sense to remove them as well. Submitted by: Danny Braniss MFC after: 4 weeks
* Add an easier example.pjd2008-12-051-1/+16
| | | | Reviewed by: trasz
* Fixes for Core2 Extreme support.jkoshy2008-12-031-1/+5
| | | | Submitted by: "Artem Belevich" <artemb at gmail dot com>
* Make the "test" target test the compiled version, instead of thephk2008-12-021-7/+7
| | | | installed version of the md library.
* Provide custom simple allocator for rtld locks in libthr. The allocatorkib2008-12-022-24/+24
| | | | | | | | | does not use any external symbols, thus avoiding possible recursion into rtld to resolve symbols, when called. Reviewed by: kan, davidxu Tested by: rink MFC after: 1 month
* Attempt a quick bandaid for arm build breakage. I went to the trouble ofpeter2008-12-022-4/+4
| | | | maintaining alignment, but I'm not sure how to tell gcc this.
* Merge user/peter/kinfo branch as of r185547 into head.peter2008-12-024-1/+152
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes struct kinfo_filedesc and kinfo_vmentry such that they are same on both 32 and 64 bit platforms like i386/amd64 and won't require sysctl wrapping. Two new OIDs are assigned. The old ones are available under COMPAT_FREEBSD7 - but it isn't that simple. The superceded interface was never actually released on 7.x. The other main change is to pack the data passed to userland via the sysctl. kf_structsize and kve_structsize are reduced for the copyout. If you have a process with 100,000+ sockets open, the unpacked records require a 132MB+ copyout. With packing, it is "only" ~35MB. (Still seriously unpleasant, but not quite as devastating). A similar problem exists for the vmentry structure - have lots and lots of shared libraries and small mmaps and its copyout gets expensive too. My immediate problem is valgrind. It traditionally achieves this functionality by parsing procfs output, in a packed format. Secondly, when tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled 32 bit binary which ran directly into the differing data structures in 32 vs 64 bit mode. (valgrind uses this to track file descriptor operations and this therefore affected every single 32 bit binary) I've added two utility functions to libutil to unpack the structures into a fixed record length and to make it a little more convenient to use.
| * Add experimental front ends to the kinfo_vmentry and kinfo_filedescpeter2008-11-304-1/+152
| | | | | | | | sysctls.
* | Invoke _rtld_atfork_post earlier, before we reinitialize rtld lockskan2008-12-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | by switching into single-thread mode. libthr ignores broken use of lock bitmaps used by default rtld locking implementation, this in turn turns lock handoff in _rtld_thread_init into NOP. This in turn makes child processes of forked multi-threaded programs to run with _thr_signal_block still in effect, with most signals blocked. Reported by: phk, kib
* | The times(3) function returns the number of CLK_TCKs since thekeramida2008-12-011-4/+9
| | | | | | | | | | | | | | | | startup time of FreeBSD, not since the UNIX Epoch. PR: docs/122359 Submitted by: Viktor &#352;tujber MFC after: 1 week
* | Fix fread() to return a correct value on platforms where sizeof(int) !=ru2008-12-011-1/+1
| | | | | | | | | | | | | | sizeof(size_t), i.e. on all 64-bit platforms. Reported by: Andrey V. Elsukov MFC after: 3 days
* | Fix a lock order reversal bug that could cause deadlock during fork(2).jasone2008-12-011-11/+37
| | | | | | | | Reported by: kib
* | It's silly to claim recv(2) is to be removed in favour of recvfrom(2)ivoras2008-11-301-1/+0
| | | | | | | | | | | | (at least at this time :) ). Approved by: gnn (mentor)
* | Adjust an assertion to handle the case where a lock is contested, butjasone2008-11-301-1/+1
| | | | | | | | | | | | spinning is avoided due to running on a single-CPU system. Reported by: stefanf
* | Do not spin when trying to lock on a single-CPU system.jasone2008-11-301-11/+13
| | | | | | | | Reported by: davidxu
* | Unlock the malloc() locks in the child process after fork(). This giveskib2008-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | us working malloc in the fork child of the multithreaded process. Although POSIX requires that only async-signal safe functions shall be operable after fork in multithreaded process, not having malloc lower the quality of our implementation. Tested by: rink Discussed with: kan, davidxu Reviewed by: kan MFC after: 1 month
* | MFp4:bz2008-11-293-11/+33
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in updated jail support from bz_jail branch. This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,.. SCTP support was updated and supports IPv6 in jails as well. Cpuset support permits jails to be bound to specific processor sets after creation. Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future. DDB 'show jails' command was added to aid debugging. Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities. Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years. Bump __FreeBSD_version for the afore mentioned and in kernel changes. Special thanks to: - Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches and Olivier Houchard (cognet) for initial single-IPv6 patches. - Jeff Roberson (jeff) and Randall Stewart (rrs) for their help, ideas and review on cpuset and SCTP support. - Robert Watson (rwatson) for lots and lots of help, discussions, suggestions and review of most of the patch at various stages. - John Baldwin (jhb) for his help. - Simon L. Nielsen (simon) as early adopter testing changes on cluster machines as well as all the testers and people who provided feedback the last months on freebsd-jail and other channels. - My employer, CK Software GmbH, for the support so I could work on this. Reviewed by: (see above) MFC after: 3 months (this is just so that I get the mail) X-MFC Before: 7.2-RELEASE if possible
* Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.kib2008-11-273-1/+24
| | | | | | | | | | | | | | Threading library calls _pre before the fork, allowing the rtld to lock itself to ensure that other threads of the process are out of dynamic linker. _post releases the locks. This allows the rtld to have consistent state in the child. Although child may legitimately call only async-safe functions, the call may need plt relocation resolution, and this requires working rtld. Reported and debugging help by: rink Reviewed by: kan, davidxu MFC after: 1 month (anyway, not before 7.1 is out)
* Update description of an event.jkoshy2008-11-271-2/+1
| | | | Submitted by: "Verplanke, Edwin" <edwin dot verplanke at intel dot com>
* - Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solojkoshy2008-11-273-37/+447
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and model 0x1C (Atom). In these CPUs, the actual numbers, kinds and widths of PMCs present need to queried at run time. Support for specific "architectural" events also needs to be queried at run time. Model 0xE CPUs support programmable PMCs, subsequent CPUs additionally support "fixed-function" counters. - Use event names that are close to vendor documentation, taking in account that: - events with identical semantics on two or more CPUs in this family can have differing names in vendor documentation, - identical vendor event names may map to differing events across CPUs, - each type of CPU supports a different subset of measurable events. Fixed-function and programmable counters both use the same vendor names for events. The use of a class name prefix ("iaf-" or "iap-" respectively) permits these to be distinguished. - In libpmc, refactor pmc_name_of_event() into a public interface and an internal helper function, for use by log handling code. - Minor code tweaks: staticize a global, freshen a few comments. Tested by: gnn
* Fix buglets.jkoshy2008-11-261-2/+2
|
* src/lib/libusb20/libusb20_compat01.calfred2008-11-252-46/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some issues about re-scanning of the devices. src/lib/libusb20/libusb20_ugen20.c Fix issue about libusb20 having to release the USB transfers before doing a SET_CONFIG, else the kernel will kill the file handle. src/sys/dev/usb2/core/usb2_device. src/sys/dev/usb2/core/usb2_generic.c src/sys/dev/usb2/core/usb2_generic.h Add support for U3G devices. Improve and cleanup FIFO free handling. Improve device re-enumeration. src/sys/dev/usb2/core/usb2_msctest.c src/sys/dev/usb2/core/usb2_msctest.h Fix some problems in the USB Mass Storage Test. Add Huawei vendor specific quirks. src/sys/dev/usb2/core/usb2_request.c Improve device re-enumeration. src/sys/dev/usb2/ethernet/if_aue2.c src/sys/dev/usb2/include/usb2_devid.h src/sys/dev/usb2/include/usb2_devtable.h src/sys/dev/usb2/quirk/usb2_quirk.c Integrate changes from the old USB driver. src/sys/dev/usb2/include/usb2_standard.h Add definition of USB3.0 structures from USB.org. src/sys/dev/usb2/serial/u3g2.c src/sys/dev/usb2/serial/ugensa2.c src/sys/modules/usb2/Makefile src/sys/modules/usb2/serial_3g/Makefile Import U3G driver. Submitted by: Hans Petter Selasky (usb4bsd)
* Fixing !INET6 builds.avatar2008-11-251-0/+2
|
* Correction: these PMCs do not support a "umask" modifier.jkoshy2008-11-243-9/+0
|
* - Document the rules used to determine when spellings of eventsjkoshy2008-11-241-16/+24
| | | | | are equivalent. - Reorder text to make the manual page more coherent.
* Fixed style issues with variable ordering and naming, spacing andscf2008-11-232-77/+99
| | | | | | | | | | | | | | | | | parentheses. Fixed alignment issue in gr_dup() in its assignment of gr_mem using a struct to force alignment without performing alignment mathematics. This was noticed recently with libutil was built with WARNS=6 on platform such as sparc64. Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults when examining struct group's with the struct members pointing to NULL's. With fix of alignment issue, restore WARNS?=6. Reviewed by: des MFC after: 1 week
* use the correct variable in a debug message.luigi2008-11-211-1/+1
|
* src/sys/dev/usb2/controller/uss820dci_pccard.calfred2008-11-199-228/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/sys/dev/usb2/core/usbdevs src/sys/dev/usb2/include/urio2_ioctl.h src/sys/dev/usb2/storage/ustorage2_fs.h These files are not used any more. src/usr.sbin/Makefile src/etc/mtree/BSD.include.dist src/include/Makefile src/lib/Makefile src/share/man/man7/hier.7 src/share/mk/bsd.libnames.mk src/etc/mtree/BSD.include.dist Make "usbconfig" and "libusb20" a part of the default build. src/sys/dev/usb/rio500_usb.h src/sys/dev/usb2/storage/urio2.c Use common include file. src/sys/dev/usb2/bluetooth/ng_ubt2.c Make USB bluetooth depend on "ng_hci" module. src/sys/dev/usb2/controller/ehci2.c src/sys/dev/usb2/controller/ehci2.h Patches for Marvell EHCI. src/sys/dev/usb2/core/usb2_busdma.c Bugfix for 64-bit platforms. Need to unload the previously loaded DMA map and some cleanup regarding some corner cases. src/sys/dev/usb2/core/usb2_core.h src/sys/dev/usb2/core/usb2_dev.c src/sys/dev/usb2/core/usb2_dev.h Bugfix for libusb filesystem interface. New feature: Add support for filtering device data at the expense of the userland process. Add some more comments. Some minor code styling. Remove unused function, usb2_fifo_get_data_next(). Fix an issue about "fifo_index" being used instead of "ep_index". src/sys/dev/usb2/core/usb2_device.c src/sys/dev/usb2/core/usb2_generic.c Bugfix for Linux USB compat layer. Do not free non-generic FIFOs when doing an alternate setting. Cleanup USB IOCTL and USB reference handling. Fix a corner case where USB-FS was left initialised after setting a new configuration or alternate setting. src/sys/dev/usb2/core/usb2_hub.c Improvement: Check all USB HUB ports by default at least one time. src/sys/dev/usb2/core/usb2_request.c Bugfix: Make sure destination ASCII string is properly zero terminated in all cases. Improvement: Skip invalid characters instead of replacing with a dot. src/sys/dev/usb2/core/usb2_util.c src/sys/dev/usb2/image/uscanner2.c Spelling. src/sys/dev/usb2/include/Makefile Share "usbdevs" with the old USB stack. src/sys/dev/usb2/include/usb2_devid.h src/sys/dev/usb2/include/usb2_devtable.h Regenerate files. Alfred: Please fix the RCS tag at the top. src/sys/dev/usb2/include/usb2_ioctl.h Fix compilation of "kdump". src/sys/dev/usb2/serial/ubsa2.c src/sys/dev/usb2/serial/ugensa2.c Remove device ID's which will end up in a new 3G driver. src/sys/dev/usb2/sound/uaudio2.c Correct a debug printout. src/sys/dev/usb2/storage/umass2.c Sync with old USB stack. src/lib/libusb20/libusb20.3 Add more documentation. src/lib/libusb20/libusb20.c Various bugfixes and improvements. src/usr.sbin/usbconfig/dump.c src/usr.sbin/usbconfig/usbconfig.c New commands for dumping strings and doing custom USB requests from the command line. Remove keyword requirements from generated files: "head/sys/dev/usb2/include/usb2_devid.h" "head/sys/dev/usb2/include/usb2_devtable.h"
* Obey signedness flag in %z case.delphij2008-11-181-1/+1
| | | | MFC after: 2 months
* When running on a filesystem that lacks ACL support,kientzle2008-11-171-9/+9
| | | | just SKIP the test, don't report a test failure.
* Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.pjd2008-11-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bring huge amount of changes, I'll enumerate only user-visible changes: - Delegated Administration Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc. - L2ARC Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content. - slog Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2). - vfs.zfs.super_owner Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one. - chflags(2) Not all the flags are supported. This still needs work. - ZFSBoot Support to boot off of ZFS pool. Not finished, AFAIK. Submitted by: dfr - Snapshot properties - New failure modes Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests - Refquota, refreservation properties Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots. - Sparse volumes ZVOLs that don't reserve space in the pool. - External attributes Compatible with extattr(2). - NFSv4-ACLs Not sure about the status, might not be complete yet. Submitted by: trasz - Creation-time properties - Regression tests for zpool(8) command. Obtained from: OpenSolaris
* On i386, the primary function that SYSCALL() generates is with thepeter2008-11-153-3/+3
| | | | | __sys_ prefix. Make END() match. This didn't cause a compile error, but the function size is attached to the .weak symbol, not the real one.
* - Document the class name prefix for these PMCs.jkoshy2008-11-151-1/+22
| | | | | - Document the "anythread" qualifier, available on Atom CPUs. - Add examples.
* - Update ncurses to 5.7-20081102 (5.7 release) and build gluerafan2008-11-152-2/+9
| | | | | | | - This also removes $FreeBSD$ from two now unmodifed source files ncurses/tinfo/lib_raw.c and ncurses/tinfo/lib_baudrate.c MFC after: 2 months (after 7.1 and 6.4 are released)
* Tweak -mdoc usage.jkoshy2008-11-133-7/+7
|
* Document UMASK values, fix errors.jkoshy2008-11-131-62/+62
|
OpenPOWER on IntegriCloud