summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* If conversion from UTF8 fails, don't mark Unicode text as available.kientzle2008-12-231-1/+2
| | | | | Submitted by: Michihiro NAKAJIMA MFC after: 30 days
* Teach get_refdir() about FreeBSD's /usr/obj convention.kientzle2008-12-211-34/+45
| | | | | | In development, I run libarchive_test frequently by hand and it gets tedious having to specify a suitable -r path all of the time.
* Initialize the cntp pointer to 0 prior to doing any work so that callersmarcus2008-12-192-8/+10
| | | | | | | | don't try to iterate through garbage or NULL memory. Additionally, return NULL instead of 0 on error. Reviewed by: peter Approved by: peter
* Fill in a missing constkientzle2008-12-171-1/+1
|
* Exit earlier on failure in this test.kientzle2008-12-171-2/+2
|
* Once the test has failed, exit before the segfault.kientzle2008-12-171-2/+11
|
* Update the ar write test to give more detailed information about failures.kientzle2008-12-171-44/+44
|
* Clarify an 'ar' error message.kientzle2008-12-171-1/+1
|
* 1. Update fetch to consistently return 1 on error, as the man page states,murray2008-12-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | rather than usually returning 1 but in a few instances using a sysexits(3) return value. 2. Remove a few unused variables from libfetch. PR: docs/122470 (1, only) Reviewed by: des > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M usr.bin/fetch/fetch.c M lib/libfetch/fetch.c
* Add support for HTTP 1.1 If-Modified-Since behavior.murray2008-12-153-4/+50
| | | | | | | | | | | | | | fetch(1) accepts a new argument -i <file> that if specified will cause the file to be downloaded only if it is more recent than the mtime of <file>. libfetch(3) accepts the mtime in the url structure and a flag to indicate when this behavior is desired. PR: bin/87841 Submitted by: Jukka A. Ukkonen <jau@iki.fi> (partially) Reviewed by: des, ru MFC after: 3 weeks
* This main goals of this project are:qingli2008-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. separating L2 tables (ARP, NDP) from the L3 routing tables 2. removing as much locking dependencies among these layers as possible to allow for some parallelism in the search operations 3. simplify the logic in the routing code, The most notable end result is the obsolescent of the route cloning (RTF_CLONING) concept, which translated into code reduction in both IPv4 ARP and IPv6 NDP related modules, and size reduction in struct rtentry{}. The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. The output from "netstat -r" shows only the routing entries. Quite a few developers have contributed to this project in the past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and Andre Oppermann. And most recently: - Kip Macy revised the locking code completely, thus completing the last piece of the puzzle, Kip has also been conducting active functional testing - Sam Leffler has helped me improving/refactoring the code, and provided valuable reviews - Julian Elischer setup the perforce tree for me and has helped me maintaining that branch before the svn conversion
* Add an ENVIRONMENT section to note that the RSH variable can be set tomurray2008-12-141-0/+7
| | | | | | | | override the use of the rsh(1) program in rcmd(3). PR: docs/51133 Obtained from: NetBSD, partially MFC after: 3 weeks
* Merge the resolver part of BIND 9.4.3 into HEAD.ume2008-12-147-28/+182
| | | | | | | | | | It includes the following fix: 2426. [bug] libbind: inet_net_pton() can sometimes return the wrong value if excessively large netmasks are supplied. [RT #18512] Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com>
* Consolidate some variable initializations. No substantive change.das2008-12-112-13/+13
|
* Move the xprintf hook to where it belongs; it shouldn't be in thedas2008-12-101-6/+4
| | | | middle of vfprintf's variable declarations.
* o Use full month name in .Dd macro.maxim2008-12-091-1/+1
|
* Add strndup(3) prototype to string.h.kib2008-12-082-2/+2
| | | | | | | | | | | This change was erronously ommitted from the r185690, and attempt to simply add the prototype to string.h has revealed that several contributed programs defined local prototypes for strndup(), controlled by autoconfed config.h. So, manually change #undef HAVE_STRNDUP to #define HAVE_STRNDUP 1. Next import of the corresponding program would regenerate config.h, overriding the changes in this commit. No objections from: kan
* Obey the TMPDIR, TMP, TEMP, or TEMPDIR environment variableskientzle2008-12-081-1/+14
| | | | | when choosing a scratch directory for the tests. Fallback to "/tmp", of course.
* Document processor errata that affect performance measurement.jkoshy2008-12-081-0/+52
|
* Add filler man pages for the kinfo functions I added recently.peter2008-12-073-1/+149
| | | | While here, hook up the hexdump(3) man page which wasn't being installed.
* When libthr and rtld start up, there are a number of magic spells castpeter2008-12-071-1/+1
| | | | | | | | | | | | | | in order to get the symbol binding state "just so". This is to allow locking to be activated and not run into recursion problems later. However, one of the magic bits involves an explicit call to _umtx_op() to force symbol resolution. It does a wakeup operation on a fake, uninitialized (ie: random contents) umtx. Since libthr isn't active, this is harmless. Nothing can match the random wakeup. However, valgrind finds this and is not amused. Normally I'd just write a suppression record for it, but the idea of passing random args to syscalls (on purpose) just doesn't feel right.
* Import the strndup(3) function.kib2008-12-064-3/+75
| | | | | | | | Copyright attribution is kept the same as in original NetBSD source. Submitted by: Florian Smeets <flo kasimir com> Obtained from: NetBSD MFC after: 2 weeks
* Order the str*.c files mostly alphabetical.kib2008-12-061-3/+3
| | | | | Submitted by: Florian Smeets <flo kasimir com> MFC after: 2 weeks
* New tests:kientzle2008-12-069-0/+27367
| | | | | | | | | | | | * support for bzip2 file with multiple concatenated bzip2 streams * support for bzip2 file with junk after bzip2 stream * support for gzip file with junk after gzip stream * "fuzz" tester randomly modifies a bunch of input files in order to try to crash libarchive (this found an amusing hang in the ISO9660 code when trying to read images that advertised a zero blocksize). This test is implemented, but commented out for now: * support for gzip file with multiple concatenated gzip streams
* Strip ";1" and trailing "." from ISO9660 entries.kientzle2008-12-061-12/+21
| | | | This seems a better match for people's expectations.
* General improvements to Rockridge parsing and ISO9660 format detection.kientzle2008-12-061-156/+354
|
* Conditionalize a bunch of debugging messages; this alsokientzle2008-12-061-1/+10
| | | | eliminates what should be the only remaining stdio dependency.
* MfP4: Big read filter refactoring.kientzle2008-12-0615-1550/+1427
| | | | | | | | | | | | | | | | | | | | | | | This is an attempt to eliminate a lot of redundant code from the read ("decompression") filters by changing them to juggle arbitrary-sized blocks and consolidate reblocking code at a single point in archive_read.c. Along the way, I've changed the internal read/consume API used by the format handlers to a slightly different style originally suggested by des@. It does seem to simplify a lot of common cases. The most dramatic change is, of course, to archive_read_support_compression_none(), which has just evaporated into a no-op as the blocking code this used to hold has all been moved up a level. There's at least one more big round of refactoring yet to come before the individual filters are as straightforward as I think they should be...
* 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.
OpenPOWER on IntegriCloud