]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoThis commit was generated by cvs2svn to compensate for changes in r171322,
sam [Mon, 9 Jul 2007 16:15:06 +0000 (16:15 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171322,
which included commits to RCS files with non-trunk default branches.

16 years agoImport of hostapd 0.5.8
sam [Mon, 9 Jul 2007 16:15:06 +0000 (16:15 +0000)]
Import of hostapd 0.5.8

16 years agofixup mcast handling in bpf program; this enables forthcoming support
sam [Mon, 9 Jul 2007 15:57:10 +0000 (15:57 +0000)]
fixup mcast handling in bpf program; this enables forthcoming support
for 802.1x over wired interfaces

Submitted by: Jouke Witteveen
Approved by: re (hrs)

16 years agoNew release notes: sed(1) case-insensitive matching, setenv(3)
bmah [Mon, 9 Jul 2007 15:53:56 +0000 (15:53 +0000)]
New release notes:  sed(1) case-insensitive matching, setenv(3)
API change.

Modified release notes:  Clarify architectures for nfe(4) note and
mention that it replaces nve(4) in i386/amd64 GENERIC [1].

Suggested by: Michael Plass [1]
Approved by: re (implicitly)

16 years agoupdates for 802.11-related parameters
sam [Mon, 9 Jul 2007 15:39:58 +0000 (15:39 +0000)]
updates for 802.11-related parameters

Reviewed by: thompsa
Approved by: re (hrs)

16 years agoFix duplicates that crept in at the last minute :-(.
imp [Mon, 9 Jul 2007 14:26:08 +0000 (14:26 +0000)]
Fix duplicates that crept in at the last minute :-(.

Noticed by: Ian Freislich
Approved by: re@ (blanket)

16 years agoFix a regression in IPv4 multicast join path (IP_ADD_MEMBERSHIP).
bms [Mon, 9 Jul 2007 10:36:47 +0000 (10:36 +0000)]
Fix a regression in IPv4 multicast join path (IP_ADD_MEMBERSHIP).

With the in_mcast.c code, if an interface for an IPv4 multicast join was
not specified, and a route did not exist for the specified group in the
unicast forwarding tables, the join would be rejected with the error
EADDRNOTAVAIL.
This change restores the old behaviour whereby if no interface is specified,
and no route exists for the group destination, the IPv4 address list is
walked to find a non-loopback, multicast-capable interface to satisfy
the join request.
This should resolve problems with starting multicast services during
system boot or when a default forwarding entry does not exist.

Approved by: re (rwatson)

16 years agoCorrect a reference-counting mistake in the ZFS code which led to abnormal
dfr [Mon, 9 Jul 2007 09:03:49 +0000 (09:03 +0000)]
Correct a reference-counting mistake in the ZFS code which led to abnormal
memory usage and pessimal cache performance.

Reviewed by: pjd
Approved by: re (rwatson)

16 years agodocument the call to wakeup after a task has been run...
jmg [Mon, 9 Jul 2007 06:24:10 +0000 (06:24 +0000)]
document the call to wakeup after a task has been run...

Approved by: re (hrs)
MFC after: 3 days

16 years agoFurther diff reduction against the proposed merged usbdevs: Add a few
imp [Mon, 9 Jul 2007 06:20:07 +0000 (06:20 +0000)]
Further diff reduction against the proposed merged usbdevs: Add a few
more vendors, use slightly more standardized names.

No md5 chagnes for !USBVERBOSE kernels

Approved by: re@ (blanket)

16 years agoMore vendors from the merged list.
imp [Mon, 9 Jul 2007 05:47:32 +0000 (05:47 +0000)]
More vendors from the merged list.
Sort NETGEAR list per convention.
Swap QUALCOMM and QUALCOMM2.
Add a few vendor products.

no md5 changes with this file (except when USBVERBOSE is enabled)

Approved by: re@ (blanket)

16 years agodma_tag is a static structure. Testing for it being a NULL pointer
marcel [Mon, 9 Jul 2007 04:58:16 +0000 (04:58 +0000)]
dma_tag is a static structure. Testing for it being a NULL pointer
doesn't make sense. Rewrite to what was intended.

Correctly warned about by: GCC
Approved by: re (bmah)

16 years agoFix typo.
yongari [Mon, 9 Jul 2007 01:13:00 +0000 (01:13 +0000)]
Fix typo.

Reported by: Danny Braniss <danny at cs dot huji dot ac dot il>
Approved by: re (bmah)

16 years agoEliminate the special case handling of OBJT_DEVICE objects in
alc [Sun, 8 Jul 2007 19:42:52 +0000 (19:42 +0000)]
Eliminate the special case handling of OBJT_DEVICE objects in
vm_fault_additional_pages() that was introduced in revision 1.47.  Then
as now, it is unnecessary because dev_pager_haspage() returns zero for
both the number of pages to read ahead and read behind, producing the
same exact behavior by vm_fault_additional_pages() as the special case
handling.

Approved by: re (rwatson)

16 years agoNULL_LDT_BASE is used in !SMP kernels too and set_user_ldt() is not
attilio [Sun, 8 Jul 2007 18:17:42 +0000 (18:17 +0000)]
NULL_LDT_BASE is used in !SMP kernels too and set_user_ldt() is not
properly called. Address these two issues.

Reported by: Tinderbox
Tested by: le
Approved by: jeff (mentor)
Approved by: re

16 years agoMFp4:
delphij [Sun, 8 Jul 2007 15:56:12 +0000 (15:56 +0000)]
MFp4:
 - Plug memory leak.
 - Respect underlying vnode's properties rather than assuming that
   the user want root:wheel + 0755.  Useful for using tmpfs(5) for
   /tmp.
 - Use roundup2 and howmany macros instead of rolling our own version.
 - Try to fix fsx -W -R foo case.
 - Instead of blindly zeroing a page, determine whether we need a pagein
   order to prevent data corruption.
 - Fix several bugs reported by Coverity.

Submitted by: Mingyan Guo <guomingyan gmail com>, Howard Su, delphij
Coverity ID: CID 2550, 2551, 2552, 2557
Approved by: re (tmpfs blanket)

16 years agoFix a bug of retrieving configuration ROM.
simokawa [Sun, 8 Jul 2007 11:47:52 +0000 (11:47 +0000)]
Fix a bug of retrieving configuration ROM.
- Handle directories and leaves other than unit directories and text leaves
  correctly.
- Now we can retrieve CROM of iSight correctly.

Approved by: re (hrs)
Tested by: flz
MFC after: 3 days

16 years agoNow that we have a function that can be called from a cdevsw close()
njl [Sat, 7 Jul 2007 17:54:33 +0000 (17:54 +0000)]
Now that we have a function that can be called from a cdevsw close()
entry point, use it.

Approved by: re

16 years agoActual code shows several problems in ia32 LDT handling:
attilio [Sat, 7 Jul 2007 16:59:01 +0000 (16:59 +0000)]
Actual code shows several problems in ia32 LDT handling:
- When a LDT entry changes, the old one is freed while it is still
  referenced by gdt and ldtr.  This can lead to disruptive behaviours in
  particular on SMP machines.
- When a LDT entry changes, it is assumed that the only one entity sharing
  the same LDT are threads in the same proc.  It doesn't take in account
  edge cases where two processes share the same VM (rfork'ed ones, for
  example).

This patch addresses these two problems and addictionally it fixes the
usage of refcount switching back it to the old manually-grown refcount
(since in this case would be faster).

Diagnosed by: tegge
Tested by: pho (a former version)
Reviewed by: kib
Approved by: jeff (mentor)
Approved by: re

16 years agoFix installworld: /usr/bin/printf isn't available then,
kientzle [Sat, 7 Jul 2007 16:55:42 +0000 (16:55 +0000)]
Fix installworld:  /usr/bin/printf isn't available then,
so use awk's printf for the formatting here instead.

Pointy hat: Yours Truly
Approved by: re

16 years agoMinor UDPv4 cleanup: capitalize comment, move statistics update after mbuf
rwatson [Sat, 7 Jul 2007 09:46:34 +0000 (09:46 +0000)]
Minor UDPv4 cleanup: capitalize comment, move statistics update after mbuf
free to be consistent with other error handling, and release socket buffer
lock before freeing mbufs and statistics updates rather than after.

Approved by: re (kensmith)

16 years agoWhen a cached page is reactivated in vm_fault(), update the counter that
alc [Fri, 6 Jul 2007 21:25:21 +0000 (21:25 +0000)]
When a cached page is reactivated in vm_fault(), update the counter that
tracks the total number of reactivated pages.  (We have not been
counting reactivations by vm_fault() since revision 1.46.)

Correct a comment in vm_fault_additional_pages().

Approved by: re (kensmith)
MFC after: 1 week

16 years agoTrivial differences with the proposed merged BSD usbdevs file merged
imp [Fri, 6 Jul 2007 20:05:39 +0000 (20:05 +0000)]
Trivial differences with the proposed merged BSD usbdevs file merged
in.  These are exclusively in the name of the company for this round.
No new devices have been added, but the MITEL entry has been
eliminated because nothing uses it.  You won't see any difference
unless you have USBVERBOSE defined for the kernel.

Approved by: re@ (blanket)

16 years agouhub already does the printing and naming of a device, so don't do it
imp [Fri, 6 Jul 2007 20:02:37 +0000 (20:02 +0000)]
uhub already does the printing and naming of a device, so don't do it
again here for compat drivers.

Approved by: re@ (blanket)

16 years agoAdd a test case for sed(1) regression - we should not ignore case
delphij [Fri, 6 Jul 2007 16:36:52 +0000 (16:36 +0000)]
Add a test case for sed(1) regression - we should not ignore case
when not being asked to do so.

Approved by: re (hrs)

16 years agoBefore doing compile_re() which needs a parameter to identify
delphij [Fri, 6 Jul 2007 16:34:56 +0000 (16:34 +0000)]
Before doing compile_re() which needs a parameter to identify
whether we should ignore case, determine the flag by calling
compile_flags() first.  Also, make sure that we obtain an
initialized cmd->u.s buffer before processing further.  We
may want to refine this solution later, but for now, make
the changes in order to unbreak world build after a sed(1)
with rev. 1.29 of compile.c is installed.

Approved by: re (hrs)

16 years agoForced commit to document a cast correction needed to get
kientzle [Fri, 6 Jul 2007 15:51:59 +0000 (15:51 +0000)]
Forced commit to document a cast correction needed to get
clean compiles using either old or new API.  I should
have just committed this one-line fix separately.  Apologies.

Approved by: re (Ken Smith)

16 years agoMake test suite work with libarchive 1.3.1: Take advantage of
kientzle [Fri, 6 Jul 2007 15:43:11 +0000 (15:43 +0000)]
Make test suite work with libarchive 1.3.1:  Take advantage of
ARCHIVE_VERSION_STAMP to selectively disable tests that don't
apply to that version; new "skipping()" function reports skipped
tests; modify final summary to report component test failures and
skips.

Note:  I don't currently intend to MFC the test suite itself;
anyone interested should just checkout and use this version
of the test suite, which should work for any library version.

Approved by: re (Ken Smith, blanket)

16 years agoNew "version stamp" simplifies determining the exact version
kientzle [Fri, 6 Jul 2007 15:36:38 +0000 (15:36 +0000)]
New "version stamp" simplifies determining the exact version
of libarchive being used.  I've been taking advantage of this
with a recent round of updates to libarchive_test so that it
can test older and newer versions of the library.

Approved by: re (Ken Smith)

16 years agoFix a typo that prevented the quad symbols from being exported
deischen [Fri, 6 Jul 2007 13:42:24 +0000 (13:42 +0000)]
Fix a typo that prevented the quad symbols from being exported
(s/SYM_MAP/SYM_MAPS/).

Reported by: kan
Approved by: re@ (Ken Smith)

16 years agoFix some problems with lock_profiling in sx locks:
attilio [Fri, 6 Jul 2007 13:20:44 +0000 (13:20 +0000)]
Fix some problems with lock_profiling in sx locks:
- Adjust lock_profiling stubs semantic in the hard functions in order to be
  more accurate and trustable
- Disable shared paths for lock_profiling.  Actually, lock_profiling has a
  subtle race which makes results caming from shared paths not completely
  trustable. A macro stub (LOCK_PROFILING_SHARED) can be actually used for
  re-enabling this paths, but is currently intended for developing use only.
- Use homogeneous names for automatic variables in hard functions regarding
  lock_profiling
- Style fixes
- Add a CTASSERT for some flags building

Discussed with: kmacy, kris
Approved by: jeff (mentor)
Approved by: re

16 years agoI4B header files were repo-copied from sys/i386/include/ to
bz [Fri, 6 Jul 2007 08:05:46 +0000 (08:05 +0000)]
I4B header files were repo-copied from sys/i386/include/ to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

We no longer need these "glue" files.

Reminded by: nyan
Approved by: re (kensmith)

16 years agoBump version after repo-copy of I4B headers.
bz [Fri, 6 Jul 2007 07:36:09 +0000 (07:36 +0000)]
Bump version after repo-copy of I4B headers.

The headers will now be installed to include/i4b/ and
no longer to include/machine/.

Approved by: re (kensmith)

16 years agoI4B header files are now installed in include/i4b/ and no longer live
bz [Fri, 6 Jul 2007 07:24:49 +0000 (07:24 +0000)]
I4B header files are now installed in include/i4b/ and no longer live
in include/machine/.

Approved by: re (kensmith)

16 years agoI4B header files were repo-copied from sys/i386/include/ to
bz [Fri, 6 Jul 2007 07:23:39 +0000 (07:23 +0000)]
I4B header files were repo-copied from sys/i386/include/ to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

Approved by: re (kensmith)

16 years agoI4B header files are now installed in include/i4b/ and no longer
bz [Fri, 6 Jul 2007 07:21:56 +0000 (07:21 +0000)]
I4B header files are now installed in include/i4b/ and no longer
in include/machine/.

Adapt #include paths.

Approved by: re (kensmith)

16 years agoI4B header files were repo-copied from sys/i386/include to
bz [Fri, 6 Jul 2007 07:20:59 +0000 (07:20 +0000)]
I4B header files were repo-copied from sys/i386/include to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

I4B header files are now installed in include/i4b/ and no longer
in include/machine/.

For now we still install the headers for i386 only.

Approved by: re (kensmith)

16 years agoI4B header files were repo-copied from sys/i386/include/ to
bz [Fri, 6 Jul 2007 07:17:22 +0000 (07:17 +0000)]
I4B header files were repo-copied from sys/i386/include/ to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

Adapt #include paths.

Approved by: re (kensmith)

16 years agoBelately note default driver change for NVIDIA network adapters.
yongari [Fri, 6 Jul 2007 06:35:50 +0000 (06:35 +0000)]
Belately note default driver change for NVIDIA network adapters.

Requested by: Michael Plass < mfp49_freebsd at plass-family dot net>
Approved by: re (hrs)

16 years agoTake care that the input to setenv() may actually be a pointer straight
scf [Fri, 6 Jul 2007 04:04:58 +0000 (04:04 +0000)]
Take care that the input to setenv() may actually be a pointer straight
from environ; make a copy before manipulating it and passing it to
setenv().

Approved by: wes
Approved by: re (kensmith)

16 years agoI did not intend to turn -Werror on for pc98. Refine the test for
peter [Fri, 6 Jul 2007 01:50:58 +0000 (01:50 +0000)]
I did not intend to turn -Werror on for pc98.  Refine the test for
turning it on for i386.

Approved by:  re (rwatson, followup)

16 years agoTurn on -Werror for sparc64 and sun4v.
peter [Fri, 6 Jul 2007 00:52:29 +0000 (00:52 +0000)]
Turn on -Werror for sparc64 and sun4v.

Approved by: re (rwatson)

16 years agoFix warnings.
peter [Fri, 6 Jul 2007 00:47:44 +0000 (00:47 +0000)]
Fix warnings.
nxge: cast page size fragments down to (int). If the vm's demand paging
PAGE_SIZE is ever too big for that, we've got far bigger problems.
ofw: move va_start() a little earlier. gcc-4.2 doesn't like us modifying
the last arg before the va_start().

Approved by: re (rwatson)

16 years agoFix warning - add missing #include
peter [Fri, 6 Jul 2007 00:41:53 +0000 (00:41 +0000)]
Fix warning - add missing #include

Submitted by: mjacob
Approved by: re (rwatson)

16 years agore(4) devices requires an external EEPROM. Depending on models it
yongari [Fri, 6 Jul 2007 00:05:12 +0000 (00:05 +0000)]
re(4) devices requires an external EEPROM. Depending on models it
would be 93C46(1Kbit) or 93C56(2Kbit). One of differences between them
is number of address lines required to access the EEPROM. For example,
93C56 EEPROM needs 8 address lines to read/write data. If 93C56
recevied premature end of required number of serial clock(CLK) to set
OP code/address of EEPROM, the result would be unexpected behavior.
Previously it tried to detect 93C46, which requires 6 address lines,
and then assumed it would be 93C56 if read data was not expected
value. However, this approach didn't work in some models/situations
as 93C56 requries 8 address lines to access its data. In order to fix
it, change EEPROM probing order such that 93C56 is detected reliably.

While I'm here change hard-coded address line numbers with defined
constant to enhance readability.

PR: 112710
Approved by: re (mux)

16 years agoForced commit to note a repo-copy of this file from
bz [Thu, 5 Jul 2007 21:52:43 +0000 (21:52 +0000)]
Forced commit to note a repo-copy of this file from
  src/sys/i386/include/
so it will be available to all architectures once I4B compiles on those.

Approved by: re (kensmith)

16 years agoFix remaining syntax errors (missing semicolons)
peter [Thu, 5 Jul 2007 17:42:00 +0000 (17:42 +0000)]
Fix remaining syntax errors (missing semicolons)

Submitted by: Björn König <bkoenig@cs.tu-berlin.de>
Approved by: re (kensmith, followup commits)

16 years agoSpace cleanup
delphij [Thu, 5 Jul 2007 16:29:40 +0000 (16:29 +0000)]
Space cleanup

Approved by: re (rwatson)

16 years agoANSIfy[1] plus some style cleanup nearby.
delphij [Thu, 5 Jul 2007 16:23:49 +0000 (16:23 +0000)]
ANSIfy[1] plus some style cleanup nearby.

Discussed with: gnn, rwatson
Submitted by: Karl Sj?dahl - dunceor <dunceor gmail com> [1]
Approved by: re (rwatson)

16 years agoAdded comments eplaining the requirement for device crypto with IPSEC
gnn [Thu, 5 Jul 2007 15:33:13 +0000 (15:33 +0000)]
Added comments eplaining the requirement for device crypto with IPSEC

Approved by: re

16 years agoRemove unused variable from pf_subr.c to make it -Werror buildable.
mlaier [Thu, 5 Jul 2007 15:28:59 +0000 (15:28 +0000)]
Remove unused variable from pf_subr.c to make it -Werror buildable.

Approved by: re (kensmith)

16 years agoPrefer device_printf to printf + device_get_nameunit. This saves
imp [Thu, 5 Jul 2007 15:25:32 +0000 (15:25 +0000)]
Prefer device_printf to printf + device_get_nameunit.  This saves
about 100 bytes.

Approved by: re (blanket)

16 years agoMFp4: Fixing IPW_DEBUG enabled builds by converting the last piece of
avatar [Thu, 5 Jul 2007 15:06:49 +0000 (15:06 +0000)]
MFp4: Fixing IPW_DEBUG enabled builds by converting the last piece of
ic->ic_des_essid to ic->ic_des_ssid[0].

Reviewed by: sam
Approved by: re (kensmith)

16 years agoIf the mech_type argument to gss_display_status is null, use a default
dfr [Thu, 5 Jul 2007 13:40:07 +0000 (13:40 +0000)]
If the mech_type argument to gss_display_status is null, use a default
mechanism.

Approved by: re (kensmith)

16 years agoIn preparation for 7.0 privilege cleanup, clean up style:
rwatson [Thu, 5 Jul 2007 13:16:04 +0000 (13:16 +0000)]
In preparation for 7.0 privilege cleanup, clean up style:

- Sort copyrights by date.
- Re-wrap, and in some cases, fix comments.
- Fix tabbing, white space, remove extra blank lines.
- Remove commented out debugging printfs.

Approved by: re (kensmith)

16 years agoAdopt snp to the destroy_dev_sched() KPI after reverting of destroy_dev()
kib [Thu, 5 Jul 2007 13:07:12 +0000 (13:07 +0000)]
Adopt snp to the destroy_dev_sched() KPI after reverting of destroy_dev()
to not call destroy_dev_sched().

Tested by: Peter Holm
Approved by: re (kensmith)

16 years agoRevert destroy_dev() to the state before destroy_dev_sched() was introduced.
kib [Thu, 5 Jul 2007 13:04:59 +0000 (13:04 +0000)]
Revert destroy_dev() to the state before destroy_dev_sched() was introduced.
Attempt to spawn destroy_dev_sched() from it causes inadmissible races.

Requested by: tegge
Approved by: re (kensmith)

17 years agoProperly unlock mutex before returning. There was a slight mishap
ariff [Thu, 5 Jul 2007 10:22:37 +0000 (10:22 +0000)]
Properly unlock mutex before returning. There was a slight mishap
during last major locking cleanup.

Reported by: Thierry Herbelot <thierry@herbelot.com>
Approved by: re (mux)

17 years agoRemove reference to the old ftp-proxy implementation,
delphij [Thu, 5 Jul 2007 09:46:53 +0000 (09:46 +0000)]
Remove reference to the old ftp-proxy implementation,
which was replaced during the pf 4.1 import.

Approved by: re (mux)

17 years agoTurn on -Werror for i386 kernel builds.
peter [Thu, 5 Jul 2007 09:30:34 +0000 (09:30 +0000)]
Turn on -Werror for i386 kernel builds.

Approved by: re (rwatson)

17 years agoAllow the LACP state to be queried from userland which at the moment is the
thompsa [Thu, 5 Jul 2007 09:18:57 +0000 (09:18 +0000)]
Allow the LACP state to be queried from userland which at the moment is the
actor and partner peer info. Print out the active aggregator and per port data
in verbose mode from ifconfig.

Approved by: re (mux)

17 years agoRemove the -DFAST_IPSEC from Makefiles again.
bz [Thu, 5 Jul 2007 08:56:46 +0000 (08:56 +0000)]
Remove the -DFAST_IPSEC from Makefiles again.

This was needed during the IPSEC->FAST_IPSEC->IPSEC transition
period to not break the build after picking up netipsec header
files. Now that the FAST_IPSEC kernel option is gone and the
default is IPSEC again those defines are superfluous.

Approved by: re (rwatson)

17 years agoRemove netkey directory from cscope/TAGs generation and replace
bz [Thu, 5 Jul 2007 08:55:14 +0000 (08:55 +0000)]
Remove netkey directory from cscope/TAGs generation and replace
it with netipsec now that KAME IPsec is gone.
While here add missing netinet6 directories.

Add comments about the ports needed to be able to run those targets.

Reviewed by: philip
Approved by: re (rwatson)

17 years agoFix a build breakage as result of disabling parts of I4B.
bz [Thu, 5 Jul 2007 08:53:21 +0000 (08:53 +0000)]
Fix a build breakage as result of disabling parts of I4B.
Check for (temporary gone) kernel options to be defined before using
them.

Reported by: peter
Approved by: re (rwatson)

17 years agoQuiet framelen uninitialized warning. I think it was a false alarm.
peter [Thu, 5 Jul 2007 07:46:33 +0000 (07:46 +0000)]
Quiet framelen uninitialized warning.  I think it was a false alarm.
If check_fhdr() returns false, the frame_ok variable should protect any
meaningful evaluations of framelen.

Approved by: re (rwatson)

17 years agoQuiet warnings. I believe gcc is incorrect about these.
peter [Thu, 5 Jul 2007 07:38:17 +0000 (07:38 +0000)]
Quiet warnings.  I believe gcc is incorrect about these.

Approved by:  re (rwatson)

17 years ago__packed has no effect on u_int8_t's except to cause a warning (and
peter [Thu, 5 Jul 2007 07:28:38 +0000 (07:28 +0000)]
__packed has no effect on u_int8_t's except to cause a warning (and
never has had any effect).

Approved by:  re (rwatson)

17 years agoTurn -Werror back on for amd64 for kernel builds.
peter [Thu, 5 Jul 2007 07:06:17 +0000 (07:06 +0000)]
Turn -Werror back on for amd64 for kernel builds.

Approved by:  re (rwatson)

17 years agoCompile pf/pf_subr.c and netnatm/cc_conn.c without -Werror for the time
peter [Thu, 5 Jul 2007 07:04:17 +0000 (07:04 +0000)]
Compile pf/pf_subr.c and netnatm/cc_conn.c without -Werror for the time
being.

Approved by:  re (rwatson)

17 years agoQuiet warnings. These do not appear to be actually used uninitialized,
peter [Thu, 5 Jul 2007 06:59:14 +0000 (06:59 +0000)]
Quiet warnings.  These do not appear to be actually used uninitialized,
but gcc's optimizer isn't smart enough to see that.  Pre-initializing
seems harmless enough.

Approved by:  re (rwatson)

17 years agoFix a stray splx() that caused a new warning.
peter [Thu, 5 Jul 2007 06:54:03 +0000 (06:54 +0000)]
Fix a stray splx() that caused a new warning.

Approved by:  re (rwatson)

17 years agoInitialize DWBuf[3].
peter [Thu, 5 Jul 2007 06:51:49 +0000 (06:51 +0000)]
Initialize DWBuf[3].

Approved by:  re (rwatson, blanket)

17 years agoFix a bunch of warnings due to a missing forward declaration of a struct.
peter [Thu, 5 Jul 2007 06:45:37 +0000 (06:45 +0000)]
Fix a bunch of warnings due to a missing forward declaration of a struct.

Approved by: re (rwatson)

17 years agoPrefer device_printf to printf("%s: ...", device_get_nameunit()). On
imp [Thu, 5 Jul 2007 06:42:14 +0000 (06:42 +0000)]
Prefer device_printf to printf("%s: ...", device_get_nameunit()).  On
amd64, we save about 240 bytes (this is about 20 per instance).

Approved by: re (blanket)

17 years agoPrefer device_printf to printf("%s:...", device_get_nameunit(),...);
imp [Thu, 5 Jul 2007 06:28:46 +0000 (06:28 +0000)]
Prefer device_printf to printf("%s:...", device_get_nameunit(),...);
This saves ~300 bytes for uvscom.c and ~100 for uvisor.c

Approved by: re (blanket)

17 years agoFix 'assignment used as truth value' warning
peter [Thu, 5 Jul 2007 06:27:15 +0000 (06:27 +0000)]
Fix 'assignment used as truth value' warning

Approved by: re (rwatson)

17 years agoTemporarily turn nowerror on for i386 and amd64 pmap.c. I'd like to study
peter [Thu, 5 Jul 2007 06:12:40 +0000 (06:12 +0000)]
Temporarily turn nowerror on for i386 and amd64 pmap.c.  I'd like to study
exactly what effect the options cause to the code with gcc these days.

Approved by:  re (rwatson)

17 years agoFix a second warning, introduced by my last "fix". I committed the wrong
peter [Thu, 5 Jul 2007 06:04:46 +0000 (06:04 +0000)]
Fix a second warning, introduced by my last "fix". I committed the wrong
diff from the wrong machine.

Pointy hat to: peter
Approved by:  re (rwatson - blanket, several days ago)

17 years agoFix cast-qualifiers warning when INET6 is not present
peter [Thu, 5 Jul 2007 05:55:57 +0000 (05:55 +0000)]
Fix cast-qualifiers warning when INET6 is not present

Approved by:  re (rwatson)

17 years agoFix bad function type passed to destroy_dev_sched_cb().
peter [Thu, 5 Jul 2007 05:54:47 +0000 (05:54 +0000)]
Fix bad function type passed to destroy_dev_sched_cb().

Approved by:  re (rwatson)

17 years agoRemove pad argument from ftruncate wrapper. Oops.
peter [Thu, 5 Jul 2007 05:32:44 +0000 (05:32 +0000)]
Remove pad argument from ftruncate wrapper.  Oops.

Approved by: re (kensmith)

17 years agoAdd quirks, derived from the linux quirks table for:
imp [Thu, 5 Jul 2007 05:26:08 +0000 (05:26 +0000)]
Add quirks, derived from the linux quirks table for:

o Adonics Cable 205
o Aiptek PocketCAM 3Mega
o Belkin USB2SCSI
o Casio QV DigiCam
o CCYU EasyDisk ED1064
o Desknote UCR-61S2B
o Epson Stylus Photo 875DC Card Reader
o Epson Stylus Photo 895 Card Reader
o Feiya 5-in-1 Card Reader
o Hitachi Dvd-CAM DZ-MV100A Camcorder
o HP CD-WRiter+ CD-4e
o Insystem Storage Adapter v2
o Kyocera Finecam S3x
o Kyocera Finecam S4
o Kyocera Finecam S5
o Kyocera Finecam L3
o Lexar USB CF Reader
o MindAtWork Digital Wallet
o Minolta Dimage F300
o Minolta Dimage E223
o Minsumi USB Fdd
o Netac USB-CF-Card
o NetChip USB Clik! 40
o Onspec MDCFE-B USB CF Reader
o Onspec SIIG/Datafab Memory Stick + CF Reader/Writer
o Onspec Datafab-based Reader
o Onspec PNY/Datafab CF+SM Reader
o Onspec SimpleTech/Datafab CF+SM Reader
o Onspec MDSM-b Reader
o Onspec USB To CF + SM Combo (LC1)
o Onspec ImageMate SDDR55
o Panasonic LS-120 Camera
o Samsung Techwin Digimax 410
o Shuttle eUSB SmartMedia / CompactFlash Adapter
o Skanhex MD 7425 Camera
o Skanhex SX 520z Camera
o Sony Memorystick NW-MS7
o Sony Portable USB Hardrive V2
o Sony Memorystick PEG N760c
o Sony Memorystick MSC-U03
o TREK/IBM USB memory key
o Trumpion T33520 USB Flash Card Controller
o Trumpion MP3 Player
o Vivtar Vivicam 35Xx
o WinMaxGroup USB Flash Disk 64M-C
o Zoran Digital Camera EX-20 DSC

and maybe a few others...

Submitted by: Vaidas Damosevicius and flz
PR: 79893
Reviewed by: njl, flz
Approved by: re (blanket)

17 years agoAdd support for Western Digital MyBook external enclosures. They need
imp [Thu, 5 Jul 2007 04:05:51 +0000 (04:05 +0000)]
Add support for Western Digital MyBook external enclosures.  They need
this quirk to work.

Submitted by: Dierk Sacher
PR: usb/99419
Approved by: re (blanket)

17 years agoAdd missing \ characters in PSEUDO() macro on arm. Oops.
peter [Wed, 4 Jul 2007 23:35:18 +0000 (23:35 +0000)]
Add missing \ characters in PSEUDO() macro on arm.  Oops.

Submitted by:  cognet
Approved by: re (kensmith)

17 years agokdump has knowledge of lseek() and mmap() arg decoding. Teach it about
peter [Wed, 4 Jul 2007 23:32:49 +0000 (23:32 +0000)]
kdump has knowledge of lseek() and mmap() arg decoding.  Teach it about
the new mmap and lseek syscalls.

Approved by:  re (kensmith)

17 years agoChange the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to
peter [Wed, 4 Jul 2007 23:27:38 +0000 (23:27 +0000)]
Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to
call the pad-less versions of the corresponding syscalls if the running
kernel supports it.  Check kern.osreldate once per program and cache the
result to select the appropriate syscall.  This maintains userland
compatability with kernel.old's from quite a while back.

Approved by:  re (kensmith)

17 years agoClassify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo
peter [Wed, 4 Jul 2007 23:23:01 +0000 (23:23 +0000)]
Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo
syscalls, unless WITHOUT_SYSCALL_COMPAT is defined.  The default case
will have the .c wrappers still.  If you define WITHOUT_SYSCALL_COMPAT,
the .c wrappers will go away and libc will make direct syscalls.

After 7-stable starts, the direct syscall method will be default.

Approved by:  re (kensmith)

17 years agoAdjust the syscall stub macros to be consistent in their meaning. In
peter [Wed, 4 Jul 2007 23:18:38 +0000 (23:18 +0000)]
Adjust the syscall stub macros to be consistent in their meaning.  In
particular:
SYSCALL() makes a syscall, with errno handling, and continues execution
directly after the macro in the non-error case.
RSYSCALL() is just like SYSCALL(), but returns after success.
Both SYSCALL(name) and RSYSCALL(name) export  "__sys_name" as a strong
symbol, with "_name" and "name" as weak aliases.
PSEUDO() is just like RSYSCALL(), but skipping the "name" weak alias.  It
still does "__sys_name" and "_name".

Change i386 to add errno handling to PSEUDO.  The same for amd64 and
sparc64, with appear to have copied the behavior.
ia64 was correct (as was alpha).  Just remove some apparently unused
variants of the macros. (untested!)
I believe powerpc is correct.
Fix arm to not export "name" from the PSEUDO case.  Remove apparently
extra unused variants.  (untested!)

The errno problem manifested on i386/amd64/sparc64 by having "PSEUDO"
classified syscalls return without setting errno.  eg: "addr = mmap()"
could return with "addr" = 22 instead of setting errno to 22 and
returning -1.

Approved by: re (kensmith)

17 years agoDon't add the 'pad' argument to the mmap/truncate/etc syscalls.
peter [Wed, 4 Jul 2007 23:06:43 +0000 (23:06 +0000)]
Don't add the 'pad' argument to the mmap/truncate/etc syscalls.

Submitted by: kensmith
Approved by: re (kensmith)

17 years agoAdd compat6 wrapper code for mmap/lseek/pread/pwrite/truncate/ftruncate.
peter [Wed, 4 Jul 2007 23:04:41 +0000 (23:04 +0000)]
Add compat6 wrapper code for mmap/lseek/pread/pwrite/truncate/ftruncate.

Approved by:  re (kensmith)

17 years agoRegenerate after mmap/lseek/etc syscall changes
peter [Wed, 4 Jul 2007 23:03:50 +0000 (23:03 +0000)]
Regenerate after mmap/lseek/etc syscall changes

Approved by:  re (kensmith)

17 years agoAdd i386 emulation wrappers for mmap/lseek/etc. These use COMPAT6, so
peter [Wed, 4 Jul 2007 23:02:40 +0000 (23:02 +0000)]
Add i386 emulation wrappers for mmap/lseek/etc.  These use COMPAT6, so
you must use the already existing, already in generic, COMPAT_FREEBSD6
kernel option for running old 32 bit binaries.

Approved by:  re (kensmith)

17 years agoAdd freebsd6_ wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate
peter [Wed, 4 Jul 2007 22:57:21 +0000 (22:57 +0000)]
Add freebsd6_ wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate

Approved by: re (kensmith)

17 years agoBump version for new mmap/lseek/etc syscalls
peter [Wed, 4 Jul 2007 22:53:00 +0000 (22:53 +0000)]
Bump version for new mmap/lseek/etc syscalls

Approved by:  re (kensmith)

17 years agoRegenerate after mmap/lseek/etc syscall changes.
peter [Wed, 4 Jul 2007 22:49:55 +0000 (22:49 +0000)]
Regenerate after mmap/lseek/etc syscall changes.

Approved by:  re (kensmith)

17 years agoCreate new syscalls for mmap(), lseek(), pread(), pwrite(), truncate() and
peter [Wed, 4 Jul 2007 22:47:37 +0000 (22:47 +0000)]
Create new syscalls for mmap(), lseek(), pread(), pwrite(), truncate() and
ftruncate(), but without the pad arg.

There are several reasons for this.  Consider 'mmap()'.  On AMD64, the
function call (and syscall) ABI allow for 6 register arguments.  Additional
arguments go on the stack.  mmap(2) has 6 arguments.  However, the syscall
definition has an extra 'int pad' argument.  This pushes it to 7 arguments,
which means one must spill into the memory stack.  Since the kernel API
doesn't match userland API, we have a hack in libc - libc/sys/mmap.c.
This implements the userland API by calling __syscall() with an extra
argument and the pad argument, for a total of 8 args.  This is all
unnecessary and inconvenient for several things, including the kernel's
syscall handler code which now has to handle merging stack arguments with
register arguments.  It is a big deal for certain 3rd party code.

I'm adding libc glue to make the transition totally painless.  I had
intended to mark the old syscalls as COMPAT6, but the potential to shoot
your feet by building a new kernel without COMPAT_FREEBSD6 but with a
slighly older userland was too great.  For now, they have manual
"freebsd6_" prefixes rather than being COMPAT6.  They will go back to
being marked 'COMPAT6' after 7-stable starts.

Approved by: re (kensmith)

17 years agoAdd support for COMPAT6 syscalls.
peter [Wed, 4 Jul 2007 22:38:28 +0000 (22:38 +0000)]
Add support for COMPAT6 syscalls.

Also, change the visibility of compat syscalls a slightly.  Compat
syscalls were missing from 'syscalls.h' entirely.  This additionally adds
them with their compat prefix.  eg: SYS_freebsd6_mmap.

Also, the syscalls.c names strings have different prefixes to differentiate
syscalls. Instead of several "old.mmap" strings, there will now be a
"compat.mmap" and "compat6.mmap" etc.  Before, both would have had the
same "old.mmap" label.

Approved by:  re

17 years agoDocument the move from FAST_IPSEC to IPSEC. Point out the need for
gnn [Wed, 4 Jul 2007 21:47:23 +0000 (21:47 +0000)]
Document the move from FAST_IPSEC to IPSEC.  Point out the need for
device crypto in the kernel configuration file when using IPSEC.

Approved by: re

17 years agoAdd case-insensitive matching to sed, using the 'I' flag, similarly to GNU sed.
ssouhlal [Wed, 4 Jul 2007 16:42:41 +0000 (16:42 +0000)]
Add case-insensitive matching to sed, using the 'I' flag, similarly to GNU sed.
For example,
sed /foo/Id
sed s/foo/bar/Ig

Reviewed by: dds
Approved by: re (hrs)

17 years agoDo not install man pages for the three I4B 'modules' that were
bz [Wed, 4 Jul 2007 16:21:27 +0000 (16:21 +0000)]
Do not install man pages for the three I4B 'modules' that were
disabled for the FreeBSD 7.0 timeframe.

Approved by: re (rwatson)