]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoSimplify the interrupt code a bit:
jhb [Mon, 17 Mar 2008 22:42:01 +0000 (22:42 +0000)]
Simplify the interrupt code a bit:
- Always include the ie_disable and ie_eoi methods in 'struct intr_event'
  and collapse down to one intr_event_create() routine.  The disable and
  eoi hooks simply aren't used currently in the !INTR_FILTER case.
- Expand 'disab' to 'disable' in a few places.
- Use function casts for arm and i386:intr_eoi_src() instead of wrapper
  routines since to trim one extra indirection.

Compiled on: {arm,amd64,i386,ia64,ppc,sparc64} x {FILTER, !FILTER}
Tested on: {amd64,i386} x {FILTER, !FILTER}

16 years agoDon't abuse stack space while in kernel land, use heap instead.
piso [Mon, 17 Mar 2008 22:08:31 +0000 (22:08 +0000)]
Don't abuse stack space while in kernel land, use heap instead.

16 years agoInitialize variable "now" before using it (it is used by the LEFTEARTH
antoine [Mon, 17 Mar 2008 18:31:43 +0000 (18:31 +0000)]
Initialize variable "now" before using it (it is used by the LEFTEARTH
macro)

PR: 121418
Submitted by: Atsuo Ohki
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoSimplify fcntl(SVR4_F_DUP2FD) code now that FreeBSD has F_DUP2FD.
antoine [Mon, 17 Mar 2008 18:27:28 +0000 (18:27 +0000)]
Simplify fcntl(SVR4_F_DUP2FD) code now that FreeBSD has F_DUP2FD.

Approved by: rwatson (mentor)

16 years agoDon't allocate the constant array "props" on the stack in wctype.
antoine [Mon, 17 Mar 2008 18:22:23 +0000 (18:22 +0000)]
Don't allocate the constant array "props" on the stack in wctype.

PR: 74743
Submitted by: knut st. osmundsen
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoLocking in the ses_ioctl handler doesn't have to be so strict because
scottl [Mon, 17 Mar 2008 17:18:16 +0000 (17:18 +0000)]
Locking in the ses_ioctl handler doesn't have to be so strict because
the referenced data is only obtained/changed in the device open handler,
and the ioctl handler can only run after the open handler.  Also fix a
few nearby style issues.

Submitted by: Matt Jacob

16 years agoBah, missed one instance in the previous commit. Correct bpf
brueffer [Mon, 17 Mar 2008 16:37:35 +0000 (16:37 +0000)]
Bah, missed one instance in the previous commit.  Correct bpf
data-link type here as well.

PR: 121477

16 years agoCorrect bpf data-link type.
brueffer [Mon, 17 Mar 2008 16:33:34 +0000 (16:33 +0000)]
Correct bpf data-link type.

PR: 121477
Submitted by: Sam Banks
MFC after: 3 days

16 years agoFix two races in the handling of the d_gianttrick for the D_NEEDGIANT
kib [Mon, 17 Mar 2008 13:17:10 +0000 (13:17 +0000)]
Fix two races in the handling of the d_gianttrick for the D_NEEDGIANT
drivers.

In the giant_XXX wrappers for the device methods of the D_NEEDGIANT
drivers, do not dereference the cdev->si_devsw. It is racing with
the destroy_devl() clearing of the si_devsw. Instead, use the
dev_refthread() and return ENXIO for the destroyed device. [1]

The check for the D_INIT in the prep_cdevsw() was not synchronized with
the call of the fini_cdevsw() in destroy_devl(), that under rapid device
creation/destruction may result in the use of uninitialized cdevsw [2].
Change the protocol for the prep_cdevsw(), requiring it to be called
under dev_mtx, where the check for D_INIT is done.

Do not free the memory allocated for the gianttrick cdevsw while holding
the dev_mtx, put it into the free list to be freed later. Reuse the
d_gianttrick pointer to keep the size and layout of the struct cdevsw
(requested by phk). Free the memory in the dev_unlock_and_free(), and do
all the free after the dev_mtx is dropped (suggested by jhb).

Reported by: bsdimp + many [1], pho [2]
Reviewed by: phk, jhb
Tested by: pho
MFC after: 1 week

16 years agoFix indentation for a closing brace in in_pcballoc().
rwatson [Mon, 17 Mar 2008 13:04:56 +0000 (13:04 +0000)]
Fix indentation for a closing brace in in_pcballoc().

MFC after: 3 days

16 years ago- There is no more "uidinfo struct" mutex.
pjd [Mon, 17 Mar 2008 11:48:40 +0000 (11:48 +0000)]
- There is no more "uidinfo struct" mutex.
- The "uidinfo hash" lock is now a rwlock.

Reminded by: kib

16 years agoAdd a "spindown" facility to ata-disks: If no requests have been received
phk [Mon, 17 Mar 2008 10:33:23 +0000 (10:33 +0000)]
Add a "spindown" facility to ata-disks:  If no requests have been received
for a configurable number of seconds, spin the disk down.  Spin it back
up on the next request.

Notice that the timeout is only armed by a request, so to spin down a
disk you may have to do:

atacontrol spindown ad10 5
dd if=/dev/ad10 of=/dev/null count=1

To disable spindown, set timeout to zero:

atacontrol spindown ad10 0

In order to debug any trouble caused, this code is somewhat noisy on the
console.

Enabling spindown on a disk containing / or /var/log/messages is not
going to do anything sensible.

Spinning a disk up and down all the time will wear it out, use sensibly.

Approved by: sos

16 years agoA cautionary XXX comment about seemingly bogus errata checks.
phk [Mon, 17 Mar 2008 09:05:15 +0000 (09:05 +0000)]
A cautionary XXX comment about seemingly bogus errata checks.

16 years agoIncrease time we wait for things to settle to 1 millisecond,
phk [Mon, 17 Mar 2008 09:01:43 +0000 (09:01 +0000)]
Increase time we wait for things to settle to 1 millisecond,
10 microseconds is too short.

Always set the cpu to the highest frequency so that we get through
boot and don't handicap cpus where powerd(8) is not used.

16 years agoRevert last commit and stop committing before morning tea.
phk [Mon, 17 Mar 2008 09:00:59 +0000 (09:00 +0000)]
Revert last commit and stop committing before morning tea.

16 years agoIncrease time we wait for things to settle to 1 millisecond,
phk [Mon, 17 Mar 2008 08:38:38 +0000 (08:38 +0000)]
Increase time we wait for things to settle to 1 millisecond,
10 microseconds is too short.

Always set the cpu to the highest frequency so that we get through
boot and don't handicap cpus where powerd(8) is not used.

16 years agoUse a standard section 4 SYNOPSIS.
brueffer [Mon, 17 Mar 2008 08:17:04 +0000 (08:17 +0000)]
Use a standard section 4 SYNOPSIS.

MFC after: 3 days

16 years agoDevice counts are long gone.
brueffer [Mon, 17 Mar 2008 08:06:41 +0000 (08:06 +0000)]
Device counts are long gone.

MFC after: 3 days

16 years agoegad! The cvs 1.11.22 distribution had a Linux binary in it. Yuck.
obrien [Mon, 17 Mar 2008 07:57:38 +0000 (07:57 +0000)]
egad!  The cvs 1.11.22 distribution had a Linux binary in it.  Yuck.

16 years agodon't set sniffer mode to ON when the driver is running with the
weongyo [Mon, 17 Mar 2008 02:30:13 +0000 (02:30 +0000)]
don't set sniffer mode to ON when the driver is running with the
monitor mode.  This solves a problem that sometimes mangled frames
are passed.

Submitted by: Werner Backes <werner_at_bit-1.de>
Tested by: Werner Backes <werner_at_bit-1.de>
PR: kern/121608
Approved by: thompsa (mentor)

16 years agoRemove extra semicolons.
thompsa [Mon, 17 Mar 2008 01:26:44 +0000 (01:26 +0000)]
Remove extra semicolons.

Pointed out by: antoine

16 years agoMake remote GDB work for AIM processors. For BookE, the kernel
marcel [Mon, 17 Mar 2008 00:46:52 +0000 (00:46 +0000)]
Make remote GDB work for AIM processors. For BookE, the kernel
will have a special section, named .PPC.EMB.apuinfo, which will
tell GDB that a BookE processor is targeted and which will
result in GDB using a different register definition. In order
to support remote GDB for BookE, we need the GDB stub in the
kernel look for that section and use the BookE definitions.

16 years agoUse correct bitmask for identifying chip family.
phk [Mon, 17 Mar 2008 00:36:16 +0000 (00:36 +0000)]
Use correct bitmask for identifying chip family.

16 years agoRemove impossible (hk_peer == NULL) check from ng_address_hook().
mav [Sun, 16 Mar 2008 23:12:17 +0000 (23:12 +0000)]
Remove impossible (hk_peer == NULL) check from ng_address_hook().
Valid hook can't have NULL peer. Even invalid one can't, as it is resets to
deadhook, but not NULL.

16 years agoRemove trailing ';' on macros.
phk [Sun, 16 Mar 2008 23:00:43 +0000 (23:00 +0000)]
Remove trailing ';' on macros.

Spotted by: antoine

16 years agoFix AUTHORS formatting.
brueffer [Sun, 16 Mar 2008 22:51:30 +0000 (22:51 +0000)]
Fix AUTHORS formatting.

MFC after: 3 days

16 years agoDevice counts are long gone, also remove the outdated FILES section.
brueffer [Sun, 16 Mar 2008 22:26:17 +0000 (22:26 +0000)]
Device counts are long gone, also remove the outdated FILES section.

MFC after: 3 days

16 years agoIn the description of the password field, -w was meant, not the
brueffer [Sun, 16 Mar 2008 21:36:05 +0000 (21:36 +0000)]
In the description of the password field, -w was meant, not the
nonexistant -p flag.

PR: 120122
Submitted by: Andy Kosela <andy.kosela@gmail.com>
MFC after: 3 days

16 years agoAdd session ID hashing to speedup incoming packets dispatch in case
mav [Sun, 16 Mar 2008 21:33:12 +0000 (21:33 +0000)]
Add session ID hashing to speedup incoming packets dispatch in case
of many connections working via the same tunnel. For example, in case
of full "client <-> LAC <-> LNS" setup.

16 years agoWhitespace cleanups.
pjd [Sun, 16 Mar 2008 21:32:20 +0000 (21:32 +0000)]
Whitespace cleanups.

16 years ago- Use wait-free method to manage ui_sbsize and ui_proccnt fields in the
pjd [Sun, 16 Mar 2008 21:29:02 +0000 (21:29 +0000)]
- Use wait-free method to manage ui_sbsize and ui_proccnt fields in the
  uidinfo structure. This entirely removes contention observed on the
  ui_mtxp mutex (as it is now gone).
- Convert the uihashtbl_mtx mutex to a rwlock, as most of the time we just
  need to read-lock it.

Reviewed by: jhb, jeff, kris & others
Tested by: kris

16 years agoImplement atomic_fetchadd_long() for all architectures and document it.
pjd [Sun, 16 Mar 2008 21:20:50 +0000 (21:20 +0000)]
Implement atomic_fetchadd_long() for all architectures and document it.

Reviewed by: attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch)

16 years agoSwitch the LACP state machine over to its own mutex to protect the internals,
thompsa [Sun, 16 Mar 2008 19:25:30 +0000 (19:25 +0000)]
Switch the LACP state machine over to its own mutex to protect the internals,
this means that it no longer grabs the lagg rwlock. Use two port table arrays
which list the active ports for Tx and switch between them with an atomic op.
Now the lagg rwlock is only exclusively locked for management (ioctls) and
queuing of lacp control frames isnt needed.

16 years agoscandir(3) previously used st_size to obtain an initial estimate
das [Sun, 16 Mar 2008 19:08:53 +0000 (19:08 +0000)]
scandir(3) previously used st_size to obtain an initial estimate
of the array length needed to store all the directory entries.
Although BSD has historically guaranteed that st_size is the size
of the directory file, POSIX does not, and more to the point, some
recent filesystems such as ZFS use st_size to mean something else.

The fix is to not stat the directory at all, set the initial
array size to 32 entries, and realloc it in powers of 2 if that
proves insufficient.

PR: 113668

16 years agoConsistently use ANSI C declarationsfor all functions in kern_synch.c.
rwatson [Sun, 16 Mar 2008 18:59:21 +0000 (18:59 +0000)]
Consistently use ANSI C declarationsfor all functions in kern_synch.c.

16 years agoStyle fixes.
pjd [Sun, 16 Mar 2008 18:26:59 +0000 (18:26 +0000)]
Style fixes.

16 years agoFix information leak. We can find PIDs of running processes from within
pjd [Sun, 16 Mar 2008 17:55:06 +0000 (17:55 +0000)]
Fix information leak. We can find PIDs of running processes from within
a jail, etc. by simply calling setpriority(PRIO_PROCESS, <PID>, 0) and
checking the return value: 0 means that the process exists and -1 that
it doesn't exist.

Reviewed by: rwatson
MFC after: 1 week

16 years agoUn-cut&paste argument processing, fix things lint found.
phk [Sun, 16 Mar 2008 17:54:55 +0000 (17:54 +0000)]
Un-cut&paste argument processing, fix things lint found.

16 years agoSimplify the inner loop of vm_fault()'s delete-behind heuristic.
alc [Sun, 16 Mar 2008 17:37:19 +0000 (17:37 +0000)]
Simplify the inner loop of vm_fault()'s delete-behind heuristic.
Instead of checking each page for PG_UNMANAGED, perform a one-time
check whether the object is OBJT_PHYS.  (PG_UNMANAGED pages only
belong to OBJT_PHYS objects.)

16 years agoImplement soon-to-be-used rw_unlock() macro.
pjd [Sun, 16 Mar 2008 17:10:52 +0000 (17:10 +0000)]
Implement soon-to-be-used rw_unlock() macro.

16 years agoAdd missing .El.
pjd [Sun, 16 Mar 2008 17:06:05 +0000 (17:06 +0000)]
Add missing .El.

16 years agoRegen.
rdivacky [Sun, 16 Mar 2008 16:29:37 +0000 (16:29 +0000)]
Regen.

16 years agoImplement sched_setaffinity and get_setaffinity using
rdivacky [Sun, 16 Mar 2008 16:27:44 +0000 (16:27 +0000)]
Implement sched_setaffinity and get_setaffinity using
real cpu affinity setting primitives.

Reviewed by: jeff
Approved by: kib (mentor)

16 years agoAdd a -n option to split(1) to split files into N chunks rather than
das [Sun, 16 Mar 2008 15:15:32 +0000 (15:15 +0000)]
Add a -n option to split(1) to split files into N chunks rather than
having to specify the right number of bytes.

Obtained from: NetBSD
Submitted by: Jan Schaumann <jschauma@netmeister.org>
PR: 113175

16 years agoCommit SYSINIT() ;-adding patch missed in previous pass.
rwatson [Sun, 16 Mar 2008 13:02:04 +0000 (13:02 +0000)]
Commit SYSINIT() ;-adding patch missed in previous pass.

MFC after: 1 month
Caught by: tinderbox

16 years agoRemove trailing ';' from C_SYSINIT() macro definition, in keeping
rwatson [Sun, 16 Mar 2008 11:01:32 +0000 (11:01 +0000)]
Remove trailing ';' from C_SYSINIT() macro definition, in keeping
with style(9) recommendation that macros not contain the
terminating ';', leaving that to the invoker.  All SYSINIT()
consumers must now provide a trailing ';'.

Unlike the change to remove the ';'s from callers, this change
shouldn't be MFC'd unless we don't mind requiring source changes
to third party modules that might still depend on SYSINIT()
providing its own ';'.

16 years agoIn keeping with style(9)'s recommendations on macros, use a ';'
rwatson [Sun, 16 Mar 2008 10:58:09 +0000 (10:58 +0000)]
In keeping with style(9)'s recommendations on macros, use a ';'
after each SYSINIT() macro invocation.  This makes a number of
lightweight C parsers much happier with the FreeBSD kernel
source, including cflow's prcc and lxr.

MFC after: 1 month
Discussed with: imp, rink

16 years agomixer(8) is WARNS=6 clean since 1.25.
jkim [Sun, 16 Mar 2008 08:06:36 +0000 (08:06 +0000)]
mixer(8) is WARNS=6 clean since 1.25.

Tested with: 'make universe'

16 years agoProperly set size of the file_zone to match kern.maxfiles parameter.
sobomax [Sun, 16 Mar 2008 06:21:30 +0000 (06:21 +0000)]
Properly set size of the file_zone to match kern.maxfiles parameter.
Otherwise the parameter is no-op, since zone by default limits number
of descriptors to some 12K entries. Attempt to allocate more ends up
sleeping on zonelimit.

MFC after: 2 weeks

16 years agoActually delete SIGCANCEL mask for suspended thread, so the signal will not
davidxu [Sun, 16 Mar 2008 03:22:38 +0000 (03:22 +0000)]
Actually delete SIGCANCEL mask for suspended thread, so the signal will not
be masked when it is resumed.

16 years agoFix mmap(2) on ZFS after some changes in VM subsystem.
pjd [Sat, 15 Mar 2008 23:23:04 +0000 (23:23 +0000)]
Fix mmap(2) on ZFS after some changes in VM subsystem.

Submitted by: alc
Reported by: kris (originally) and many others
Tested with: fsx
MFC after: 1 week

16 years agoFix panic on e.g. "kldload /dev/null".
ru [Sat, 15 Mar 2008 17:40:18 +0000 (17:40 +0000)]
Fix panic on e.g. "kldload /dev/null".

PR: kern/121427
Reviewed by: sem
MFC after: 3 days

16 years agoUpdate a comment: the format bid only runs once per archive; it no
kientzle [Sat, 15 Mar 2008 11:09:16 +0000 (11:09 +0000)]
Update a comment: the format bid only runs once per archive; it no
longer runs once per entry.

16 years agoFree up the entry objects allocated during this test.
kientzle [Sat, 15 Mar 2008 11:06:15 +0000 (11:06 +0000)]
Free up the entry objects allocated during this test.

16 years agoRelease the buffers used for exercising the compress code.
kientzle [Sat, 15 Mar 2008 11:05:49 +0000 (11:05 +0000)]
Release the buffers used for exercising the compress code.

16 years agoRemove the duplicate "archive_format" and "archive_format_name" fields
kientzle [Sat, 15 Mar 2008 11:04:45 +0000 (11:04 +0000)]
Remove the duplicate "archive_format" and "archive_format_name" fields
from the private archive_write structure and fix up all writers to use
the format fields in the base "archive" structure.  This error made it
impossible to query the format after setting up a writer because the
write format was stored in an inaccessible place.

16 years agoCorrect a sign mismatch that only showed up on 64-bit systems.
kientzle [Sat, 15 Mar 2008 11:02:47 +0000 (11:02 +0000)]
Correct a sign mismatch that only showed up on 64-bit systems.

Pointy hat: me

16 years agoRefactor the mtree code a bit to make the layering clearer: Each
kientzle [Sat, 15 Mar 2008 07:10:24 +0000 (07:10 +0000)]
Refactor the mtree code a bit to make the layering clearer: Each
"file" is described by multiple "lines" each possibly containing
multiple "keywords."  Incorporate some additions from Joerg Sonnenberger
to handle linked files and correctly deal with backing files on disk.

16 years agoNew release notes: cpuset, BTX real mode, gptboot (+MFC), BSD
bmah [Sat, 15 Mar 2008 07:06:12 +0000 (07:06 +0000)]
New release notes:  cpuset, BTX real mode, gptboot (+MFC), BSD
ar(1)/ranlib(1), traceroute(8) -a/-A, traceroute6(8) -U.

Updated release note:  tzdata2008a (+MFC).

16 years agoBUS_DMA_ISA is left over from Alpha, and is not used in the tree at
imp [Sat, 15 Mar 2008 06:44:45 +0000 (06:44 +0000)]
BUS_DMA_ISA is left over from Alpha, and is not used in the tree at
all.  The reference in ia64 code is due to cutNpaste in its history
and can safely be removed.

Revired by: cognet, raj, marcel, jhb and maybe one other whom I'm forgetting

16 years agostyle(9) fix to add whitespace around an '=' sign and restore
kientzle [Sat, 15 Mar 2008 05:08:21 +0000 (05:08 +0000)]
style(9) fix to add whitespace around an '=' sign and restore
a comment that got accidentally dropped.

16 years agoFreeBSD does have fstat().
kientzle [Sat, 15 Mar 2008 04:20:50 +0000 (04:20 +0000)]
FreeBSD does have fstat().
Correct the nasty typo this uncovers.

16 years agoTestability is more important than standards conformance.
kientzle [Sat, 15 Mar 2008 03:49:18 +0000 (03:49 +0000)]
Testability is more important than standards conformance.
Disable the use of PaxHeader.<pid> for the fake pax extension pathname
until I can make the name here settable.  Otherwise, tests that try
to compare output to static pre-generated reference files break.

16 years agoSupport NetBSD's --insecure as a synonym for -P.
kientzle [Sat, 15 Mar 2008 03:28:39 +0000 (03:28 +0000)]
Support NetBSD's --insecure as a synonym for -P.

16 years agoDocument --chroot.
kientzle [Sat, 15 Mar 2008 03:25:26 +0000 (03:25 +0000)]
Document --chroot.

16 years agoSupport -q (from NetBSD) as a synonym for --fast-read (the old FreeBSD
kientzle [Sat, 15 Mar 2008 03:18:24 +0000 (03:18 +0000)]
Support -q (from NetBSD) as a synonym for --fast-read (the old FreeBSD
extension to GNU tar).

Thanks to: Joerg Sonnenberger

16 years agoAlso accept --uncompress as a synonym for -Z.
kientzle [Sat, 15 Mar 2008 03:11:13 +0000 (03:11 +0000)]
Also accept --uncompress as a synonym for -Z.

Thanks to: Joerg Sonnenberger

16 years ago--chroot implementation thanks to Joerg Sonnenberger.
kientzle [Sat, 15 Mar 2008 03:06:46 +0000 (03:06 +0000)]
--chroot implementation thanks to Joerg Sonnenberger.

16 years agoSupport --compress as a synonym for -Z.
kientzle [Sat, 15 Mar 2008 02:45:57 +0000 (02:45 +0000)]
Support --compress as a synonym for -Z.

16 years agoEnable and document the -Z option for selecting "compress" compression,
kientzle [Sat, 15 Mar 2008 02:41:44 +0000 (02:41 +0000)]
Enable and document the -Z option for selecting "compress" compression,
now that libarchive supports it.

16 years agoIgnore a few more common files.
kientzle [Sat, 15 Mar 2008 02:31:28 +0000 (02:31 +0000)]
Ignore a few more common files.

16 years agoResolve a minor nit in SUS compliance by including the PID in the
kientzle [Sat, 15 Mar 2008 02:30:42 +0000 (02:30 +0000)]
Resolve a minor nit in SUS compliance by including the PID in the
fake directory name used for pax extended headers.

16 years agoGC a reference to the defunct TESTFILES variable.
kientzle [Sat, 15 Mar 2008 02:22:08 +0000 (02:22 +0000)]
GC a reference to the defunct TESTFILES variable.

16 years agoA subtle point: "pax interchange format" mandates that all strings
kientzle [Sat, 15 Mar 2008 01:43:59 +0000 (01:43 +0000)]
A subtle point: "pax interchange format" mandates that all strings
(including pathname, gname, uname) be stored in UTF-8.  This usually
doesn't cause problems on FreeBSD because the "C" locale on FreeBSD
can convert any byte to Unicode/wchar_t and from there to UTF-8.  In
other locales (including the "C" locale on Linux which is really
ASCII), you can get into trouble with pathnames that cannot be
converted to UTF-8.

Libarchive's pax writer truncated pathnames and other strings at the
first nonconvertible character.  (ouch!)  Other archivers have worked
around this by storing unconvertible pathnames as raw binary, a
practice which has been sanctioned by the Austin group.  However,
libarchive's pax reader would segfault reading headers that weren't
proper UTF-8.  (ouch!)  Since bsdtar defaults to pax format, this
affects bsdtar rather heavily.

To correctly support the new "hdrcharset" header that is going into
SUS and to handle conversion failures in general, libarchive's pax reader
and writer have been overhauled fairly extensively.  They used to do
most of the pax header processing using wchar_t (Unicode); they now do
most of it using char so that common logic applies to either UTF-8 or
"binary" strings.

As a bonus, a number of extraneous conversions to/from wchar_t have
been eliminated, which should speed things up just a tad.

Thanks to: Bjoern Jacke for originally reporting this to me
Thanks to: Joerg Sonnenberger for noting a bad typo in my first draft of this
Thanks to: Gunnar Ritter for getting the standard fixed
MFC after: 5 days

16 years agoFix a typo.
jkim [Sat, 15 Mar 2008 01:36:20 +0000 (01:36 +0000)]
Fix a typo.

16 years agoClean up code and fix style(9) nits.
jkim [Sat, 15 Mar 2008 01:20:05 +0000 (01:20 +0000)]
Clean up code and fix style(9) nits.

16 years agoUpdate list of possible mixer devices. These devices were added to
jkim [Sat, 15 Mar 2008 01:15:15 +0000 (01:15 +0000)]
Update list of possible mixer devices.  These devices were added to
soundcard.h more than ten years ago.

16 years ago- Check device masks and bypass printing headers if capable device does
jkim [Sat, 15 Mar 2008 01:09:47 +0000 (01:09 +0000)]
- Check device masks and bypass printing headers if capable device does
not exist.  /etc/rc.d/mixer tried to restore non-existent recording
source because /var/var/db/mixer*-state contains '=rec' for example.
- Remove hardcoded mixer2 and mixer3 and do the right thing.
- Replace getopt(3) with hand-rolled option parser.  It was not able
to handle 'mixer -rec mic' although it is a valid command.
- Make '-s' and '-S' mutualy exclusive as mixer(8) says.
- Do not re-read recording source unless it has been modified.

16 years agoIgnore some built files.
kientzle [Sat, 15 Mar 2008 00:52:22 +0000 (00:52 +0000)]
Ignore some built files.

16 years agoDon't lie. If a string can't be converted to a wide (Unicode) string,
kientzle [Fri, 14 Mar 2008 23:19:46 +0000 (23:19 +0000)]
Don't lie.  If a string can't be converted to a wide (Unicode) string,
return a NULL instead of an incomplete string.  Expand the test coverage
to verify the correct behavior here.

16 years agoDon't advertise the default block size as a constant; don't
kientzle [Fri, 14 Mar 2008 23:09:02 +0000 (23:09 +0000)]
Don't advertise the default block size as a constant; don't
rely on a deprecated value to set the default.  This is also
related to a longer-term goal of setting the default block
size based on format and possibly other factors, which makes
it a bad idea to tie this to a published constant.

16 years agoNew public functions archive_entry_copy_link() and archive_entry_copy_link_w()
kientzle [Fri, 14 Mar 2008 23:00:53 +0000 (23:00 +0000)]
New public functions archive_entry_copy_link() and archive_entry_copy_link_w()
override the currently set link value, whether that's a hardlink
or a symlink.  Plus documentation update and tests.

16 years agoUpdate some comments, comment out argument names to guard against
kientzle [Fri, 14 Mar 2008 22:47:38 +0000 (22:47 +0000)]
Update some comments, comment out argument names to guard against
namespace problems.

16 years agoSince "length" computes the length of a string and is used as an
kientzle [Fri, 14 Mar 2008 22:44:07 +0000 (22:44 +0000)]
Since "length" computes the length of a string and is used as an
argument to malloc(3), it should be size_t, not int.

16 years agoLet archive_entry_clear() accept a NULL pointer and simply do nothing.
kientzle [Fri, 14 Mar 2008 22:40:36 +0000 (22:40 +0000)]
Let archive_entry_clear() accept a NULL pointer and simply do nothing.
In particular, this allows archive_entry_free() to work correctly
for a NULL pointer, which makes it parallel with free(3).

16 years agoRework the versioning implementation and test to match the
kientzle [Fri, 14 Mar 2008 22:31:57 +0000 (22:31 +0000)]
Rework the versioning implementation and test to match the
new interface.  Mark the functions that are going away in
libarchive 3.0.

In particular, archive_version_string() now computes the
string rather than assuming that it will be created by the
build infrastructure.  Eventually, this will allow some
simplification of the build infrastructure.

16 years agoRework the versioning information, hopefully for the last time.
kientzle [Fri, 14 Mar 2008 22:19:50 +0000 (22:19 +0000)]
Rework the versioning information, hopefully for the last time.
 * There are now only two public version identifiers:  "number" is
   a single integer that combines Major/minor/release in a single
   value of the form Mmmmrrr.  This is easy to compare against for
   checking feature support.  "string" is a displayable text string
   of the form "libarchive M.mm.rr".
 * The number is present both as a macro (version of the installed header)
   and a function (version of the shared library).  The string form
   is available only as a function.
 * Retain the older version definitions for now, but mark them all
   as deprecated, to disappear in libarchive 3.0 (whenever that happens).
 * Rework the various deprecation conditionals to use ARCHIVE_VERSION_NUMBER.

An ancillary goal is to reduce the number of @...@ substitutions that
are required.  Someday, I might even be able to avoid build-time
processing of archive.h entirely.

16 years agoAdd a useful sprintf()-style wrapper around
kientzle [Fri, 14 Mar 2008 22:00:09 +0000 (22:00 +0000)]
Add a useful sprintf()-style wrapper around
archive_string_vsprintf().  (Which is built
on top of libarchive's internal resizable string
support.)

16 years agoChange spelling and eliminate a typo in comments to reduce diffs with
emaste [Fri, 14 Mar 2008 21:59:11 +0000 (21:59 +0000)]
Change spelling and eliminate a typo in comments to reduce diffs with
Adaptec's vendor driver.  I have some fixes to bring in and this makes
ongoing review of the FreeBSD-Adaptec driver diffs easier.

16 years agoSupport for writing 'compress' format, thanks to Joerg Sonnenberger.
kientzle [Fri, 14 Mar 2008 20:35:38 +0000 (20:35 +0000)]
Support for writing 'compress' format, thanks to Joerg Sonnenberger.

16 years agoA block in a tar file is 512 bytes. Period.
kientzle [Fri, 14 Mar 2008 20:32:20 +0000 (20:32 +0000)]
A block in a tar file is 512 bytes.  Period.
Remove the entirely pointless symbolic constant
and sizeof(unsigned char).  (The constant
here is doubly wrong, since not only does
it obscure a basic format constant, it was
never intended to be a tar-specific value,
so could conceivably be changed at some point
in the future.)

16 years agoAdd preliminary support for binding interrupts to CPUs:
jhb [Fri, 14 Mar 2008 19:41:48 +0000 (19:41 +0000)]
Add preliminary support for binding interrupts to CPUs:
- Add a new intr_event method ie_assign_cpu() that is invoked when the MI
  code wishes to bind an interrupt source to an individual CPU.  The MD
  code may reject the binding with an error.  If an assign_cpu function
  is not provided, then the kernel assumes the platform does not support
  binding interrupts to CPUs and fails all requests to do so.
- Bind ithreads to CPUs on their next execution loop once an interrupt
  event is bound to a CPU.  Only shared ithreads are bound.  We currently
  leave private ithreads for drivers using filters + ithreads in the
  INTR_FILTER case unbound.
- A new intr_event_bind() routine is used to bind an interrupt event to
  a CPU.
- Implement binding on amd64 and i386 by way of the existing pic_assign_cpu
  PIC method.
- For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up
  an interrupt source and binds its interrupt event to the specified CPU.
  MI code can currently (ab)use this by doing:

intr_bind(rman_get_start(irq_res), cpu);

  however, I plan to add a truly MI interface (probably a bus_bind_intr(9))
  where the implementation in the x86 nexus(4) driver would end up calling
  intr_bind() internally.

Requested by: kmacy, gallatin, jeff
Tested on: {amd64, i386} x {regular, INTR_FILTER}

16 years agoCorrect IPsec behaviour with a 'use' level in SP but no SA available.
bz [Fri, 14 Mar 2008 16:38:11 +0000 (16:38 +0000)]
Correct IPsec behaviour with a 'use' level in SP but no SA available.
In that case return an continue processing the packet without IPsec.

PR: 121384
MFC after: 5 days
Reported by: Cyrus Rahman (crahman gmail.com)
Tested by: Cyrus Rahman (crahman gmail.com) [slightly older version]

16 years agoUpdate usage() - add new -D option. While I'm here, update copyright
emax [Fri, 14 Mar 2008 16:29:25 +0000 (16:29 +0000)]
Update usage() - add new -D option. While I'm here, update copyright
information and license formatting

MFC after: 1 day

16 years agoRemove the "Fast " from the
bz [Fri, 14 Mar 2008 16:25:40 +0000 (16:25 +0000)]
Remove the "Fast " from the
"Fast IPsec: Initialized Security Association Processing." printf.
People kept asking questions about this after the IPsec shuffle.

This still is the Fast IPsec implementation so no worries that it would
be any slower now. There are no functional changes.

Discussed with: sam
MFC after: 4 days

16 years agoAdd a quirk to ignore ASUS LCM display found on some ASUS laptops.
jkim [Fri, 14 Mar 2008 15:59:30 +0000 (15:59 +0000)]
Add a quirk to ignore ASUS LCM display found on some ASUS laptops.

16 years agoMake the function prototype for cpu_search() match the declaration so that
jhb [Fri, 14 Mar 2008 15:22:38 +0000 (15:22 +0000)]
Make the function prototype for cpu_search() match the declaration so that
this still compiles with gcc3.

16 years agoAdd stack_print_ddb() to the synposis of stack(9), add mlink for it; fix
rwatson [Fri, 14 Mar 2008 13:13:37 +0000 (13:13 +0000)]
Add stack_print_ddb() to the synposis of stack(9), add mlink for it; fix
stack_print(9) mlink.

Spotted by: attilio

16 years agoCorrect reference counting on the SP for outgoing IPv6 IPsec connections.
bz [Fri, 14 Mar 2008 11:55:04 +0000 (11:55 +0000)]
Correct reference counting on the SP for outgoing IPv6 IPsec connections.

PR: 121374
Reported by: Cyrus Rahman (crahman gmail.com)
Tested by: Cyrus Rahman (crahman gmail.com)
MFC after: 5 days

16 years ago#if 0 out a currently unsued (and incomplete) function: ip6_ipsec_mtu().
bz [Fri, 14 Mar 2008 11:44:30 +0000 (11:44 +0000)]
#if 0 out a currently unsued (and incomplete) function: ip6_ipsec_mtu().
No need to compile 'dead' code.
I am leaving it in because we will have to review the concept and
should use the common function in various places.

MFC after: 5 days