Commit Graph

12059 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
a4578a3c98 Unbreak 2008-10-20 17:04:57 +00:00
Dag-Erling Smørgrav
92657d3cbd Since setclasscpumask() is not static, assume that it is intended to be
part of the public API.  Accordingly, add a prototype and document it.
2008-10-20 17:03:05 +00:00
Dag-Erling Smørgrav
93b5982b3c Style and whitespace. 2008-10-20 16:54:53 +00:00
Dag-Erling Smørgrav
2d057ca68c Parenthesize return values. 2008-10-20 16:51:43 +00:00
Dag-Erling Smørgrav
7cc027a3dc include and whitespace cleanup. 2008-10-20 16:48:18 +00:00
Xin LI
59f0ec8329 - License change to a less restrictive one;
- ANSIfy;
 - Convert do {} while loop -> while {} for clarity;
 - Sync RCS ID with OpenBSD;

Obtained from:	OpenBSD
2008-10-19 10:11:35 +00:00
Xin LI
ecc61e2fb1 Further simplify the code.
Submitted by:	Christoph Mallon <christoph.mallon gmx.de>
2008-10-19 09:10:44 +00:00
Tim Kientzle
758dfd70db Add test to verify ACL restores on FreeBSD, verify kern/128203 (mtime
restore fails if ACL provided), apply patch from kern/128203, and verify fix.

PR:		kern/128203
Submitted by:	Udo Schweigert
MFC after:	3 days
2008-10-19 00:18:44 +00:00
Tim Kientzle
d34dca65fa Style: Mark private data 'static', correct an old comment.
MFC after:	3 days
2008-10-19 00:13:57 +00:00
Xin LI
f53577c0d4 Use strlcpy() in !localized case to avoid the -1's. 2008-10-17 21:29:05 +00:00
Xin LI
0ea291e221 Use strlcpy() when we mean it. 2008-10-17 21:21:14 +00:00
Xin LI
01c56ef230 Reduce code duplication: use calloc() intead of malloc()
and memset afterward.
2008-10-17 20:11:28 +00:00
Xin LI
b7f8e2dab3 _kvm_malloc allocates memory through calloc() which
returns zeroed memory, so don't redo the initialization.
2008-10-17 20:09:00 +00:00
Alexander Leidinger
1455fd2638 MTC r183949:
Allow to define MALLOC_PRODUCTION with a make variable instead of polluting
 the global CFLAGS.

Reviewed by:	jasone
2008-10-17 08:30:20 +00:00
Rafal Jaworowski
4d25037efd Let libstand(3) build on ARM.
This is a pre-requisite for loader(8) + U-Boot support library on this arch.
2008-10-14 09:53:47 +00:00
Joseph Koshy
789140c0e7 - Sparsely number enumerations 'pmc_cputype' and 'pmc_event' in order to
reduce ABI disruptions when new cpu types and new PMC events are added
  in the future.
- Support alternate spellings for PMC events.  Derive the canonical
  spelling of an event name from its enumeration name in 'enum pmc_event'.
- Provide a way for users to disambiguate between identically named events
  supported by multiple classes of PMCs in a CPU.
- Change libpmc's machine-dependent event specifier parsing code to
  better support CPUs containing two or more classes of PMC resources.
2008-10-09 14:55:45 +00:00
Joseph Koshy
8fb796642a Correct a typo. 2008-10-06 10:34:44 +00:00
Joseph Koshy
243e1539f3 - Add cross-references.
- Tweak -mdoc use.
2008-10-04 12:54:25 +00:00
Joseph Koshy
2eca5e0f76 Add cross-references. 2008-10-04 12:53:08 +00:00
Joseph Koshy
8c3af4f2c2 Cross-reference new manual pages. 2008-10-04 12:44:05 +00:00
Joseph Koshy
72cf78b859 - Cross-reference new manual pages.
- Spell new PMC class names correctly.
2008-10-04 12:35:02 +00:00
Joseph Koshy
7042d3b9da Add manual pages for performance measurement counters present in
Intel Atom(tm), Core(tm) and Core2(tm) CPUs.
2008-10-04 12:27:49 +00:00
Ed Schouten
8d333b3c85 Small cleanups to openpty().
- Pass O_NOCTTY to posix_openpt(2). This makes the implementation work
  consistently on implementations that make the PTY the controlling TTY
  by default.

- Call unlockpt() before opening the slave device. POSIX mentions that
  de slave device should only be opened after grantpt() and unlockpt()
  have been called.

- Replace some redundant code by a label.

In theory we could remove a lot of code from openpty() on FreeBSD
-CURRENT, because grantpt(), unlockpt() and revoke() are not needed in
our implementation. We'd better keep them there. This makes the code
still work with older FreeBSD releases and even makes it work on other
non-BSD operating systems.

I've compiled openpty() on Linux. You only need to remove the revoke()
call, because revoke() on Linux always returns -1. Apart from that, it
seems to work like it should.

Reviewed by:	jhb
2008-10-03 09:42:50 +00:00
Joseph Koshy
a8a55dd98f - Document event numbers associated with event names.
- Document an event that was missed out earlier.
- Sort event names alphabetically.
2008-10-02 08:53:06 +00:00
Joseph Koshy
f0fbd1c4a6 - Document event numbers.
- Sort event names.
2008-10-02 06:37:33 +00:00
Joseph Koshy
0206ebd3c8 -mdoc tweaks. 2008-10-02 06:21:07 +00:00
Joseph Koshy
8c171bf58c - Document event numbers.
- Correct misspellings of two event names.
2008-10-02 06:15:40 +00:00
Joseph Koshy
624760c7f6 Document event numbers alongside event names.
Requested by:		Arun Sharma <arun at sharma-home dot net>
2008-10-02 04:46:00 +00:00
Konstantin Belousov
e45b2259ec Add unistd.h to the getosreldate(3) manpage.
Update referenced example to include unistd.h per manpage.
Update example to be more style(9)-ish, silence warnings and add
FreeBSD id to the source file.
2008-09-30 11:25:55 +00:00
Tim Kientzle
b2d4ddad82 Verify high-res birthtime support on FreeBSD.
MFC after:	30 days
2008-09-30 04:13:21 +00:00
Tim Kientzle
f70105fb18 MfP4: restore birth time data to disk + more thorough tests for
time restore to disk.

MFC after:	30 days
2008-09-30 04:02:36 +00:00
Tim Kientzle
155524db13 MfP4: Store/read birthtime data in pax format.
Submitted by:	Pedro Giffuni
MFC after:	30 days
2008-09-30 03:57:07 +00:00
Tim Kientzle
8b18fa965d MfP4: Support for storing birthtime in archive_entry objects.
Submitted by:	Pedro Giffuni
MFC after:	30 days
2008-09-30 03:53:03 +00:00
John Baldwin
338b0cb957 Support for CPU sets is going to appear in 7.1 before 8.0.
MFC after:	3 days
2008-09-29 15:44:48 +00:00
Nathan Whitehorn
a63c2f9df0 Fix some ifdef logic in the libc syncicache() bit that I somehow missed in the
last commit. Now it really can use a runtime-set cacheline size.
2008-09-24 01:06:11 +00:00
Nathan Whitehorn
4c01c0b965 Allow the cacheline size on PowerPC to be set at runtime. This is essential for
supporting 64-bit CPUs, which often have 128-byte cache lines instead of the
standard 32.
2008-09-24 00:28:46 +00:00
Joseph Koshy
6455febbea Document changes in behaviour due to sparse CPU numbering support. 2008-09-22 14:31:24 +00:00
Sam Leffler
690f477d75 add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by:	various (posted to arch)
MFC after:	1 month
2008-09-21 22:02:26 +00:00
Craig Rodrigues
d6bfc0b544 <osreldate.h> does not have a forward declration of getosreldate(), so
remove it from this man page.

MFC after:	3 days
2008-09-20 21:12:54 +00:00
Maksim Yevmenkin
48d48c633e Move uuid_enc_le, uuid_dec_le, uuid_enc_be and uuid_dec_be symbols
into FBSD_1.1 section where they should be.

Pointed out by:	kib, deischen
MFC after:	3 days
2008-09-19 15:52:56 +00:00
Joseph Koshy
624f6965da Keep symbols in sorted order. 2008-09-19 13:21:23 +00:00
Joseph Koshy
0f3866fa5f Improve grammar. 2008-09-18 10:20:35 +00:00
Joseph Koshy
80f30b733b Document new PMC classes, capabilities and CPU kinds.
Improve typography.
2008-09-18 10:16:54 +00:00
Tim Kientzle
c42f5c226a MfP4: Generalize int64_t in the public headers to support compilers
which have a 64-bit integer type but don't provide standard C99 definitions.
2008-09-18 04:19:06 +00:00
Tim Kientzle
a370f3ca73 Trying to distinguish different "versions" of mtree files was a silly idea.
Submitted by:	Joerg Sonnenberger
2008-09-18 04:13:36 +00:00
Joseph Koshy
48ddc62541 Whitespace fixes. 2008-09-17 04:13:14 +00:00
Joseph Koshy
0b9b757d45 Add event name aliases for Pentium PMCs. 2008-09-17 03:53:37 +00:00
Joseph Koshy
24f2c3f394 Replace PMC-dependent content with references to
the appropriate manual pages.
2008-09-16 16:58:24 +00:00
Joseph Koshy
d41debca93 Build and install PMC-dependent manual pages. 2008-09-16 16:57:14 +00:00
Joseph Koshy
7c8e922826 Fix a typo. 2008-09-16 16:53:25 +00:00
Joseph Koshy
2186848edd Move PMC documentation to separate manual pages, one per PMC class. 2008-09-16 16:34:55 +00:00
Joseph Koshy
020247a4d2 Move TSC specific PMC information to its own manual page. 2008-09-16 16:29:41 +00:00
Joseph Koshy
6aa5a19391 Correct an event name alias: event "k7-dc-misses" does not support
a unitmask.
2008-09-16 14:13:03 +00:00
Maksim Yevmenkin
edc7005bc3 Add uuid_enc,dec_le,be() functions to Symbol.map
Pointy hat goes to me.

MFC after:	3 days
2008-09-15 23:54:55 +00:00
Doug Rabson
3d3ec67618 Fix async mode (required for ypbind in manycast mode). 2008-09-15 14:02:49 +00:00
Marcel Moolenaar
03fad2ad5f Allow psaddr_t to be widened by using thr_pread_{int,long,ptr},
where critical. Some places still use ps_pread/ps_pwrite directly,
but only need changed when byte-order comes into the picture.
Also, change th_p in td_event_msg_t from a pointer type to
psaddr_t, so that events also work when psaddr_t is widened.
2008-09-14 16:07:21 +00:00
Tim Kientzle
29a23c776a Choose a flag-handling strategy based on platform capabilities
rather than on platform.
2008-09-14 05:51:25 +00:00
Tim Kientzle
1074aa240c Portability: Don't use symbolic constants when the values are more
standard than the names are.  Remove some trailing whitespace.
2008-09-12 05:33:00 +00:00
Tim Kientzle
a2854491c4 Portability: Not everyone is lucky enough to have ftruncate() 2008-09-12 04:08:11 +00:00
Tim Kientzle
220265229d Portability: Support platforms that lack (struct stat).st_blksize or SSIZE_MAX
Of course, FreeBSD has both.
2008-09-12 04:03:34 +00:00
Tim Kientzle
6d35d9a6e9 Windows compatibility: The stub replacement for compression_program
(which always returns an error when invoked) needs its prototype.
2008-09-12 03:53:54 +00:00
Jason Evans
bf5b19279d Use PAGE_{SIZE,MASK,SHIFT} from machine/param.h rather than hard-coding
page size and using sysconf(3).

Suggested by:	marcel
2008-09-10 14:27:34 +00:00
Jason Evans
5b3842aefa Move call to _malloc_thread_cleanup() so that if this is the last thread,
the call never happens.  This is necessary because malloc may be used
during exit handler processing.

Submitted by:	davidxu
2008-09-09 17:14:32 +00:00
Doug Rabson
4efa8f3e07 Initialise the SVCAUTH field for new transport structures when they are
allocated instead of waiting for the first request. This fixes an issue with
rpcbind's support for PMAPPROC_CALLIT.

Reviewed by:	markm
2008-09-09 14:15:55 +00:00
Andrey A. Chernov
4220467ec2 Return two fixes from previous backout which does not require
review by secteam@ for the reasons mentioned below.

1) Rename /dev/urandom to /dev/random since urandom marked as
XXX Deprecated
alias in /sys/dev/random/randomdev.c
(this is our naming convention and no review by secteam@ required)

2) Set rs_stired flag after forced initialization to prevent
double stearing.
(this is already in OpenBSD, i.e. they don't have double stearing.
It means that this change matches their code path and no additional
secteam@ review required)

Submitted by:   Thorsten Glaser <tg@mirbsd.de> (2)
2008-09-09 09:46:36 +00:00
Ulf Lilleengen
31dff47f01 - Update the libgeom manpage with a description of g_device_path and
g_providername utility functions.

Approved by:	kib (mentor)
2008-09-08 06:27:00 +00:00
Tim Kientzle
a2a72fd640 Fix a type-aliasing problem in the libarchive test suite,
restore WARNS=6.
2008-09-08 00:58:12 +00:00
Tim Kientzle
fb7ec956eb Correct a leaking archive_entry in the test suite. 2008-09-07 23:59:27 +00:00
Ulf Lilleengen
f805f204b6 - Add a new ioctl for getting the provider name of a geom provider.
- Add a routine for looking up a device and checking if it is a valid geom
  provider given a partial or full path to its device node.

Reviewed by:	phk
Approved by:	pjd (mentor)
2008-09-07 13:54:57 +00:00
Tim Kientzle
7480311f87 Correct the comments here.
PR:		bin/126849
MFC after:	3 days
2008-09-07 06:15:45 +00:00
Tim Kientzle
11663004bd When restoring a directory, allow symlinks to be followed. The full
logic here gets a little complex, but the net effect is that the
SECURE_SYMLINKS flag will prevent us from ever following a symlink.
Without it, we'll only follow symlinks to dirs.  bsdtar specifies
SECURE_SYMLINKS by default, suppresses it for -P.

I've also beefed up the write_disk_secure test to verify this
behavior.

PR:		bin/126849
2008-09-07 05:22:33 +00:00
Marcel Moolenaar
93bf4a8436 Unbreak ia64: pges are 8KB. 2008-09-06 05:26:31 +00:00
Giorgos Keramidas
0efdfdee5f Add two example regexps: (1) one for matching all the characters
that belong in a character class, and (2) one for matching all
the characters *not* in a character class.

Submitted by:	Mark B, mkbucc at gmail.com
MFC after:	3 days
2008-09-05 17:41:20 +00:00
Tim Kientzle
11b4b8458c The link resolver now unsets the size to mark a hardlink
with no body instead of setting it to zero.
2008-09-05 06:15:25 +00:00
Tim Kientzle
a0bfb8ae3e MfP4: Handle entries with unset size properly: Regular files with
unspecified size are "unlimited" (required by Zip reader, which
sometimes does not know the uncompressed size of an entry until it
gets to the end).  Also, hardlinks with unspecified (or zero) size do
not overwrite the data on disk nor do they set metadata.  This is
compatible with GNU tar and NetBSD pax behavior.
2008-09-05 06:13:11 +00:00
Tim Kientzle
e20d272f0a MfP4: Use the set/unset tracking to determine when mtime or atime
is unavailable.  Use start_time as a substitute when one is missing;
if both are missing, skip the call to {f,l,}utime{s,}() entirely.
2008-09-05 05:55:49 +00:00
Doug Rabson
5f7399dc43 Fix an off-by-one error in the replay detection logic. 2008-09-04 14:54:22 +00:00
Rafal Jaworowski
65ba5555c6 Eliminate __alpha__ leftover from libstand. 2008-09-04 10:05:44 +00:00
Tim Kientzle
1b42ff4cd6 Markup fix.
MFC after:	3 days
2008-09-04 05:22:00 +00:00
Doug Barton
35a876a0ed Update for version 9.4.2-P2 2008-09-01 22:55:23 +00:00
Tim Kientzle
0c35edadaa Style: Use ARCHIVE_VERSION_NUMBER to conditionalize tests on
the particular libarchive version being tested instead of the
deprecated ARCHIVE_API_VERSION and ARCHIVE_VERSION_STAMP macros.
2008-09-01 05:38:33 +00:00
Tim Kientzle
32364a7ddb MfP4: set/unset tracking for atime, ctime, mtime, and size fields.
This generalizes the existing set/unset tracking for hardlink/symlink
fields and extends it to cover non-string fields.  Eventually, this
will be further extended to cover most fields.

In particular, this is needed to correctly detect when time fields
are missing (for example, reading ustar archives doesn't set atime or
ctime) for proper time restore and is helpful when trying to determine
whether to overwrite data when restoring hardlinks.

This commit updates the tests but not the docs.
2008-09-01 04:54:29 +00:00
Tim Kientzle
c7715560f1 Sort the list of format names. 2008-09-01 02:50:53 +00:00
Tim Kientzle
e32c65cb17 Use the "start_time" (time at which the restore process began)
to fill in a missing atime instead of substituting mtime.

PR:		bin/124915
2008-09-01 02:50:24 +00:00
Tim Kientzle
9ea6421090 New mtree writer, thanks to Joerg Sonnenberger.
Obtained from:	Joerg Sonnenberger
2008-08-31 07:21:46 +00:00
Tim Kientzle
7584fa8aa4 Joerg Sonnenberger's improvements to the shar writer.
Significant performance improvements, better quoting of file names, etc.
2008-08-31 07:10:40 +00:00
Tim Kientzle
5dc843b27b Make libarchive_test a little smarter about trying to find
its reference files when you don't specify -r.  It now checks
a couple of likely nearby directories to see if any of them
have a particular known file.
2008-08-31 07:06:02 +00:00
Tim Kientzle
cec048ddf0 When atime wasn't specified, it should get set == mtime.
This is much stronger than just asserting that it's not zero.
2008-08-30 05:31:23 +00:00
David E. O'Brien
3337af98b4 Add the needed libpthread_md.c for MIPS.
Obtained from:	Juniper Networks
2008-08-28 15:41:12 +00:00
Pawel Jakub Dawidek
57b00b9998 Add links to all libpcap functions. 2008-08-28 11:48:49 +00:00
Tim Kientzle
9cfec77e7e If no atime was specified (for example, when extracting from ustar
archives), set atime == mtime.  Before this, atime would get restored
to 0.
2008-08-28 06:40:22 +00:00
David E. O'Brien
5ba1019a4b Add the needed _setjmp.S for MIPS.
Obtained from:	Juniper Networks
2008-08-27 17:58:51 +00:00
Jason Evans
d6742bfbd3 Add thread-specific caching for small size classes, based on magazines.
This caching allows for completely lock-free allocation/deallocation in the
steady state, at the expense of likely increased memory use and
fragmentation.

Reduce the default number of arenas to 2*ncpus, since thread-specific
caching typically reduces arena contention.

Modify size class spacing to include ranges of 2^n-spaced, quantum-spaced,
cacheline-spaced, and subpage-spaced size classes.  The advantages are:
fewer size classes, reduced false cacheline sharing, and reduced internal
fragmentation for allocations that are slightly over 512, 1024, etc.

Increase RUN_MAX_SMALL, in order to limit fragmentation for the
subpage-spaced size classes.

Add a size-->bin lookup table for small sizes to simplify translating sizes
to size classes.  Include a hard-coded constant table that is used unless
custom size class spacing is specified at run time.

Add the ability to disable tiny size classes at compile time via
MALLOC_TINY.
2008-08-27 02:00:53 +00:00
Konstantin Belousov
cbc158449b Implement WNOWAIT flag for wait4(2). It specifies that process whose status
is returned shall be kept in the waitable state.
Add WSTOPPED as an alias for WUNTRACED.

Submitted by:	Jukka Ukkonen <jau at iki fi>
PR:	standards/116221
MFC after:	2 weeks
2008-08-26 12:37:16 +00:00
Konstantin Belousov
eaad109973 When calculating arguments to the interpreter for the shebang script
executed by fexecve(2), imgp->args->fname is NULL. Moreover, there is
no way to recover the path to the script being executed.
Do what some other U*ixes do unconditionally, namely supply /dev/fd/n
as the script path when called from fexecve(). Document requirement of
having fdescfs mounted as caveat.
2008-08-26 10:53:32 +00:00
Tim Kientzle
39056f55e3 Alphabetize the list of tests. 2008-08-25 06:08:22 +00:00
Tim Kientzle
3269dc16fd Update the total archive byte counters when writing entries to disk using
archive_write_disk.
Update cpio to use this to emit block counts in -p mode.
Update cpio tests to verify these block counts.
2008-08-24 06:21:00 +00:00
Tim Kientzle
a705ee2bcd Remove the stillborn attempt to cleanup tests as well as the build dir. 2008-08-24 05:54:28 +00:00
Tim Kientzle
b9364a48e5 Fail copying path/.. only if SECURE_NODOTDOT was specified.
Since we already warn for any '..' elements in that case,
the extra "lastdotdot" tracking turns out to be unnecessary.

PR:		bin/124924
2008-08-24 05:42:22 +00:00
Tim Kientzle
8d14bd8cc2 Fix the cpio bug tested for by r182092 of usr.bin/cpio/test.
Since various 'find' incantations can emit container directories
in various orders, we cannot refuse to update a dir because it's
apparently the same age.

MFC after:	3 days
2008-08-24 05:01:01 +00:00