]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoSpell "currently" correctly.
Giorgos Keramidas [Thu, 28 Jul 2005 15:59:52 +0000 (15:59 +0000)]
Spell "currently" correctly.

19 years agoFurther fix receive_packet() by using BPF_WORDALIGN to insure the offset
Brooks Davis [Thu, 28 Jul 2005 15:30:19 +0000 (15:30 +0000)]
Further fix receive_packet() by using BPF_WORDALIGN to insure the offset
is properly aligned when we move to the next packet.

Obtained from: ISC dhclient via krw at OpenBSD

19 years agoIf a "hole" opens up in the ruleset (i.e.: remove 5), do not return
Tom Rhodes [Thu, 28 Jul 2005 13:55:12 +0000 (13:55 +0000)]
If a "hole" opens up in the ruleset (i.e.: remove 5), do not return
unknown error.  Instead, just return error.

Submitted by: avatar
Tested by: trhodes

19 years agoSpell "committing" correctly.
Giorgos Keramidas [Thu, 28 Jul 2005 13:53:45 +0000 (13:53 +0000)]
Spell "committing" correctly.

19 years agoSpell "referred" correctly.
Giorgos Keramidas [Thu, 28 Jul 2005 13:03:19 +0000 (13:03 +0000)]
Spell "referred" correctly.

19 years agoSpell "background" correctly.
Giorgos Keramidas [Thu, 28 Jul 2005 12:40:23 +0000 (12:40 +0000)]
Spell "background" correctly.

19 years agoSpell "partition" correctly.
Giorgos Keramidas [Thu, 28 Jul 2005 10:48:07 +0000 (10:48 +0000)]
Spell "partition" correctly.

PR: docs/84198
Submitted by: Gary W. Swearingen
MFC after: 3 days

19 years agoFix for PR 83885.
George V. Neville-Neil [Thu, 28 Jul 2005 10:10:01 +0000 (10:10 +0000)]
Fix for PR 83885.

Make sure that there actually is a next packet before setting
nextrecord to that field.

PR: 83885
Submitted by: hirose@comm.yamaha.co.jp
Obtained from: Patch suggested in the PR
MFC after: 1 week

19 years agoShorten src / obj paths while capturing logs, making them both smaller and
Dag-Erling Smørgrav [Thu, 28 Jul 2005 10:09:22 +0000 (10:09 +0000)]
Shorten src / obj paths while capturing logs, making them both smaller and
easier to read.

19 years agoMinor syntax tweaks:
Robert Watson [Thu, 28 Jul 2005 09:45:08 +0000 (09:45 +0000)]
Minor syntax tweaks:

- Remove some extra blank lines.
- Remove comments that don't contribute to understanding.
- Remove additional blank lines in output added to maximize compatibility
  with older vmstat output, but that is actually somewhat gratuitous.

Submitted by: bde
MFC with: other vmstat libmemstat(3) changes

19 years agoAdd a couple of missing nic interfaces that have been added: iwi, ipw,
Warner Losh [Thu, 28 Jul 2005 03:51:54 +0000 (03:51 +0000)]
Add a couple of missing nic interfaces that have been added: iwi, ipw,
ral and ural.  Add a comment about this regexp being lame, which
should shock no-one.  Add a comment about why rescans are disabled on scsi
cards.

19 years agoCast to uintptr_t to avoid compiler warning, it was broken by
David Xu [Thu, 28 Jul 2005 03:34:54 +0000 (03:34 +0000)]
Cast to uintptr_t to avoid compiler warning, it was broken by
the recent atomic_ptr() change.

19 years agoForgot to add this change when commiting geli.
Pawel Jakub Dawidek [Thu, 28 Jul 2005 00:53:47 +0000 (00:53 +0000)]
Forgot to add this change when commiting geli.

Reported by: cperciva

19 years agoDon't reject packets with server names containing characters that are
Brooks Davis [Thu, 28 Jul 2005 00:24:39 +0000 (00:24 +0000)]
Don't reject packets with server names containing characters that are
not allowed in domain names.  RFC 2132 does not list valid or invalid
characters and the ISC client accepts anything here.

Reported by: ps

19 years agoI think I found the problem, reconnect geli to the build.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 23:56:32 +0000 (23:56 +0000)]
I think I found the problem, reconnect geli to the build.

19 years ago- Reduce WARNS level to 3, so it will be compilabe on alpha.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 23:56:01 +0000 (23:56 +0000)]
- Reduce WARNS level to 3, so it will be compilabe on alpha.
- Don't link libmd, it is not needed.
- Connect manual page to the build.

MFC after: 1 week

19 years agoDisconnect geli from the build for now.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 23:30:50 +0000 (23:30 +0000)]
Disconnect geli from the build for now.
I need to find out first what is the cause of sha2.c compilation problem
on alpha.

19 years agoFix the way how "InUse" column in 'vmstat -m' output works:
Pawel Jakub Dawidek [Wed, 27 Jul 2005 23:17:31 +0000 (23:17 +0000)]
Fix the way how "InUse" column in 'vmstat -m' output works:
- increase number of allocations count only on successfull malloc(9),
  so it doesn't confuse people;
- because we need to check if 'size > 0', hide 'mtsp->mts_memalloced += size;'
  under the check as well, as for size=0 it is of course a no-op;
- avoid critical_enter()/critical_exit() in case of failure in
  malloc_type_allocated() as there will be nothing to do.

OK'ed by: rwatson
MFC after: 2 days

19 years agoMFp4: Export more informations about encrypted providers.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 22:31:57 +0000 (22:31 +0000)]
MFp4: Export more informations about encrypted providers.

MFC after: 1 week

19 years agoAdd regression tests (121 in total) for GEOM_ELI class.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 22:27:30 +0000 (22:27 +0000)]
Add regression tests (121 in total) for GEOM_ELI class.
To use them, run:

# prove /usr/src/tools/regression/geom_eli

Sponsored by: Wheel Sp. z o.o.
http://www.wheel.pl
MFC after: 1 week

19 years agoReduce default debug level to 0.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 21:48:47 +0000 (21:48 +0000)]
Reduce default debug level to 0.

MFC after: 1 week

19 years agoConnect GEOM_ELI class to the build.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 21:47:55 +0000 (21:47 +0000)]
Connect GEOM_ELI class to the build.

MFC after: 1 week

19 years agoAdd GEOM_ELI class which provides GEOM providers encryption.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 21:43:37 +0000 (21:43 +0000)]
Add GEOM_ELI class which provides GEOM providers encryption.
For features list and usage see manual page: geli(8).

Sponsored by: Wheel Sp. z o.o.
http://www.wheel.pl
MFC after: 1 week

19 years agomsdosfs_conv.c references cmos_wall_clock and adjkerntz. Since these
Warner Losh [Wed, 27 Jul 2005 21:19:28 +0000 (21:19 +0000)]
msdosfs_conv.c references cmos_wall_clock and adjkerntz.  Since these
are 0 for arm, define them as such to make msdosfs_conv.c compile
again on arm.

19 years agoReorganize an_detach() a bit. Make sure ether_ifdetach() and if_free()
Maksim Yevmenkin [Wed, 27 Jul 2005 21:03:35 +0000 (21:03 +0000)]
Reorganize an_detach() a bit. Make sure ether_ifdetach() and if_free()
are called outside of AN_LOCK()/AN_UNLOCK. This fixes the following
WITNESS warning (produced when an(4) PCMCIA card is detached).

taskqueue_drain with the following non-sleepable locks held:
exclusive sleep mutex an0 (network driver) r = 0 (0xc59af168) locked @ /usr/src/sys/dev/an/if_an.c:2836

MFC after: 3 days
Silence from: current@

19 years agoAdd extra constraints to tell the compiler that the memory be modified
John Baldwin [Wed, 27 Jul 2005 20:01:45 +0000 (20:01 +0000)]
Add extra constraints to tell the compiler that the memory be modified
in the arm __swp() and sparc64 casa() and casax() functions is actually
being used as an input and output and not just the value of the register
that points to the memory location.  This was the underlying source of
the mbuf refcount problems on sparc64 a while back.  For arm this should be
a nop because __swp() has a constraint to clobber all memory which can
probably be removed now.

Reviewed by: alc, cognet
MFC after: 1 week

19 years agoUse a + constraint modifier for a register arg in __bswap16_var().
John Baldwin [Wed, 27 Jul 2005 19:59:21 +0000 (19:59 +0000)]
Use a + constraint modifier for a register arg in __bswap16_var().

Reviewed by: cognet

19 years agoFix a bug in the handling of cases where we got a short (or zero)
Brooks Davis [Wed, 27 Jul 2005 19:25:46 +0000 (19:25 +0000)]
Fix a bug in the handling of cases where we got a short (or zero)
capture.  Zero length captures caused an infinte loop and short captures
probably caused memory corruption and a crash.

Reported by: many
MFC After: 3 days

19 years agoSimplify SMBIOS loader variables and drop `hint.smbios.0.enabled'.
Jung-uk Kim [Wed, 27 Jul 2005 19:11:10 +0000 (19:11 +0000)]
Simplify SMBIOS loader variables and drop `hint.smbios.0.enabled'.

They are not real hints.

Reported by: des
Pointed out by: peter
Approved by: anholt (mentor)

19 years agoCorrect the order of some if tests so that we don't complain about being
John Baldwin [Wed, 27 Jul 2005 15:21:32 +0000 (15:21 +0000)]
Correct the order of some if tests so that we don't complain about being
unable to route an IRQ when we do route an IRQ ok but bootverbose is off.

Reported by: Ben Kaduk minimarmot at gmail dot com

19 years agoFIx for a bug in the change that made nfs_timer() MPSAFE. We need to
Paul Saab [Wed, 27 Jul 2005 15:06:26 +0000 (15:06 +0000)]
FIx for a bug in the change that made nfs_timer() MPSAFE. We need to
grab Giant before calling pru_send() (if running with mpsafenet = 0).

Found by: Jeremie Le Hen.
Fixed by: Maxime Henrion

19 years agoIn nfs_nget() if two threads race on the same filehandle, the loser should
Paul Saab [Wed, 27 Jul 2005 15:05:31 +0000 (15:05 +0000)]
In nfs_nget() if two threads race on the same filehandle, the loser should
cause the nfsnode to get freed. This fixes a potential vnode (and nfsnode)
leak in that path.

Submitted by: Mohan Srinivasan
Reviewed by: phk

19 years agodon't accept invalid form of an address like 1:2:3:4:5:6:7::8.
Hajimu UMEMOTO [Wed, 27 Jul 2005 14:33:36 +0000 (14:33 +0000)]
don't accept invalid form of an address like 1:2:3:4:5:6:7::8.

PR: bin/84106
Obtained from: BIND9
MFC after: 2 days

19 years ago- Use callout_*() rather than timeout() to periodically poll the media.
John Baldwin [Wed, 27 Jul 2005 13:51:01 +0000 (13:51 +0000)]
- Use callout_*() rather than timeout() to periodically poll the media.
- Add locking to protect the softc and mark this driver as MP safe.  There
  are still some edge cases with multiport cards that need more locking
  work.

MFC after: 1 week
Tested on: alpha

19 years agoFix a typo in the name of the dmamap for a bus_dmamap_sync().
John Baldwin [Wed, 27 Jul 2005 13:48:45 +0000 (13:48 +0000)]
Fix a typo in the name of the dmamap for a bus_dmamap_sync().

MFC after: 3 days

19 years agoUse root_mount KPI for RAID3 to delay root file system mount.
Pawel Jakub Dawidek [Wed, 27 Jul 2005 09:03:51 +0000 (09:03 +0000)]
Use root_mount KPI for RAID3 to delay root file system mount.
Actually, one cannot setup root file system on RAID3 device, but when
other file system exist in /etc/fstab which are placed on RAID3 device,
boot process will be interrupted when these devices are missing.

MFC after: 3 days
X-MFC-note: MFC only to RELENG_6, as RELENG_5 doesn't have root_mount KPI.

19 years agoCorrect a buffer overflow which can occur when decompressing a
Colin Percival [Wed, 27 Jul 2005 08:41:17 +0000 (08:41 +0000)]
Correct a buffer overflow which can occur when decompressing a
carefully crafted deflated data stream. [1]

Correct problems in the AES-XCBC-MAC IPsec authentication algorithm. [2]

Submitted by: suz [2]
Security: FreeBSD-SA-05:18.zlib [1], FreeBSD-SA-05:19.ipsec [2]

19 years agoAdd -o/-O options to pkg_version:
Kirill Ponomarev [Wed, 27 Jul 2005 07:55:12 +0000 (07:55 +0000)]
Add -o/-O options to pkg_version:

   -o  Show the origin recorded on package generation instead of the
       package name.

   -O  Only list packages whose registered origin is origin.

Based on PR: bin/78640
Submitted by: Marcus Grando <marcus at corp dot grupos.com.br>, flz

19 years agoThe 575A doesn't have funcregs in memio. So don't claim that it does.
Warner Losh [Wed, 27 Jul 2005 06:38:55 +0000 (06:38 +0000)]
The 575A doesn't have funcregs in memio.  So don't claim that it does.
This gets my 575A card probing.

Card provided by: James Flemer
MFC After: 3 days

19 years agowhen bridging internally bypass the bss node as traffic to it
Sam Leffler [Wed, 27 Jul 2005 04:41:25 +0000 (04:41 +0000)]
when bridging internally bypass the bss node as traffic to it
must follow the normal input path

Submitted by: Michal Mertl
MFC after: 5 days

19 years agobandaid ni_fails handling so ap's with association failures are
Sam Leffler [Wed, 27 Jul 2005 02:53:09 +0000 (02:53 +0000)]
bandaid ni_fails handling so ap's with association failures are
reconsidered after a bit; a proper fix involves more changes to
the scanning infrastructure

Reviewed by: avatar, David Young
MFC after: 5 days

19 years agoDon't cross-reference VFS_START.9
Scott Long [Wed, 27 Jul 2005 02:08:59 +0000 (02:08 +0000)]
Don't cross-reference VFS_START.9

19 years agoNow that VFS_START.9 has been removed, don't try to reference it from the
Scott Long [Wed, 27 Jul 2005 02:08:21 +0000 (02:08 +0000)]
Now that VFS_START.9 has been removed, don't try to reference it from the
Makefile.

19 years agoRemove the VFS_START(9) manual page because it's no longer relevant. The
Hiten Pandya [Tue, 26 Jul 2005 23:57:37 +0000 (23:57 +0000)]
Remove the VFS_START(9) manual page because it's no longer relevant. The
entry point was removed as its only consumer was MFS.

Approved by: re (hrs)

19 years agoAdd a description for bpfstat
Christian S.J. Peron [Tue, 26 Jul 2005 21:44:40 +0000 (21:44 +0000)]
Add a description for bpfstat

19 years agoIntroduce a bpfstat utility. This program can be used to retrieve
Christian S.J. Peron [Tue, 26 Jul 2005 21:38:54 +0000 (21:38 +0000)]
Introduce a bpfstat utility. This program can be used to retrieve
stats provided by bpf(4). This program will live in tools/ for now
until we figure out where it will live permanently. Based on some
discussions on developers@, it is likely that we will be adding
this functionality to netstat(1) at some point.

19 years agoAdd an entry for a file that was removed in BIND 9.3.1
Doug Barton [Tue, 26 Jul 2005 19:21:10 +0000 (19:21 +0000)]
Add an entry for a file that was removed in BIND 9.3.1

19 years agoAdd the first snapshot at rewriting the nanobsd build to be a shellscript.
Poul-Henning Kamp [Tue, 26 Jul 2005 18:52:50 +0000 (18:52 +0000)]
Add the first snapshot at rewriting the nanobsd build to be a shellscript.

The overall idea is to get a single build script which will not need
editing, but instead overrides and changes happen by config files passed
as arguments.

19 years agos/if_defaulroute/if_defaultroute/
Brooks Davis [Tue, 26 Jul 2005 18:27:37 +0000 (18:27 +0000)]
s/if_defaulroute/if_defaultroute/

We may now handle route updates better.

19 years agoDo not reference gifconfig, it is gone.
Tom Rhodes [Tue, 26 Jul 2005 18:14:22 +0000 (18:14 +0000)]
Do not reference gifconfig, it is gone.

Sponsored by: Chaffee::Interactive

19 years agoRather than hold a mutex over calls to SYSCTL_OUT allocate a
Christian S.J. Peron [Tue, 26 Jul 2005 17:21:56 +0000 (17:21 +0000)]
Rather than hold a mutex over calls to SYSCTL_OUT allocate a
temporary buffer then pass the array to user-space once we have
dropped the lock.

While we are here, drop an assertion which could result in a
kernel panic under certain race conditions.

Pointed out by: rwatson

19 years agonuke duplicate inclusion of scope6_var.h.
Hajimu UMEMOTO [Tue, 26 Jul 2005 11:46:15 +0000 (11:46 +0000)]
nuke duplicate inclusion of scope6_var.h.

19 years agoo add fragthreshold support now that the ioctl exists
Sam Leffler [Tue, 26 Jul 2005 06:00:33 +0000 (06:00 +0000)]
o add fragthreshold support now that the ioctl exists
o accept rtsthreshold - (or any) as a shorthand for rtsthreshold 2346

MFC after: 3 days

19 years agoSilence the de-bouncing of dhclient start up. The previous output
Brooks Davis [Tue, 26 Jul 2005 00:37:19 +0000 (00:37 +0000)]
Silence the de-bouncing of dhclient start up.  The previous output
caused significant mental anguish for some portions of the user
population. :)

19 years agoinclude scope6_var.h for in6_clearscope().
Hajimu UMEMOTO [Tue, 26 Jul 2005 00:19:58 +0000 (00:19 +0000)]
include scope6_var.h for in6_clearscope().

19 years agoTeach vmstat -m and vmstat -z to use libmemstat(3). Certain
Robert Watson [Mon, 25 Jul 2005 22:35:10 +0000 (22:35 +0000)]
Teach vmstat -m and vmstat -z to use libmemstat(3).  Certain
statistics from -z are now a bit different due to changes in the
way statistics are now measured.  Reproduce with some amount of
accuracy the slightly obscure layouts adopted by the two kernel
sysctls.  In the future, we might want to normalize them.

GC dosysctl(), which is now no longer used.

MFC after: 1 week

19 years agoRemove an erroneous m_freem() call. If m_defrag() returns a non-NULL
Maxime Henrion [Mon, 25 Jul 2005 22:21:11 +0000 (22:21 +0000)]
Remove an erroneous m_freem() call.  If m_defrag() returns a non-NULL
pointer, it has already freed the original mbuf chain, so we shouldn't
do it again.

This is an MFC candidate.

19 years agoChange host-name from type "X" to type "t". This allows the client to
Brooks Davis [Mon, 25 Jul 2005 22:19:09 +0000 (22:19 +0000)]
Change host-name from type "X" to type "t".  This allows the client to
accept NUL-terminated strings as required by RFC 2132.

This solution is not perfect as it removes the ability to send
NUL-terminated host-name options which may be required by some broken
servers.  Given the current lack of an existance proof of such servers
and the fact that servers that send NUL-terminated domain names do
exist, this seems like an acceptable compromise.  A discussion of these
issues can be found at:

http://marc.theaimsgroup.com/?l=dhcp-client&m=96837107208382&w=2

PR: bin/83468
Reported by: Sean Winn <sean at gothic dot net dot au>
MFC-after: 3 days

19 years agoBy design I left a tiny race in updating the I/O statistics based on
Poul-Henning Kamp [Mon, 25 Jul 2005 21:12:54 +0000 (21:12 +0000)]
By design I left a tiny race in updating the I/O statistics based on
the assumption that performance was more important that beancounter
quality statistics.

As it transpires the microoptimization is not measurable in the
real world and the inconsistent statistics confuse users, so revert
the decision.

MT6 candidate: possibly
MT5 candidate: possibly

19 years agoMove initialization above point of first possible reference to
Matthew N. Dodd [Mon, 25 Jul 2005 17:57:15 +0000 (17:57 +0000)]
Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.

Previously TTY_DIALUP and TTY_NETWORK flags did not match
specified type.

19 years agoCorrect minor output bug. When the battery being queried is charging or
Nate Lawson [Mon, 25 Jul 2005 17:44:10 +0000 (17:44 +0000)]
Correct minor output bug.  When the battery being queried is charging or
the overall discharge rate is 0, mark the battery remaining time as
"unknown", not 0.

Reported by: Eric Kjeldergaard
MFC after: 4 days

19 years agooops, make it compilable. i need sleep. X-(
Hajimu UMEMOTO [Mon, 25 Jul 2005 17:28:39 +0000 (17:28 +0000)]
oops, make it compilable.  i need sleep. X-(

19 years agoremove a pointless comment with a more helpful one...
John-Mark Gurney [Mon, 25 Jul 2005 17:18:25 +0000 (17:18 +0000)]
remove a pointless comment with a more helpful one...

Submitted by: Tobias Roth
MFC after: 5 days

19 years agoUpdate (correct autotools usage, copy generated headers, --disable-threads)
Dag-Erling Smørgrav [Mon, 25 Jul 2005 17:14:00 +0000 (17:14 +0000)]
Update (correct autotools usage, copy generated headers, --disable-threads)

19 years agorestore locks which disappeared wrongly by my previous commit.
Hajimu UMEMOTO [Mon, 25 Jul 2005 17:05:37 +0000 (17:05 +0000)]
restore locks which disappeared wrongly by my previous commit.

19 years agopowerd(8) requires root permissions to run so notify the user if they
Nate Lawson [Mon, 25 Jul 2005 16:43:12 +0000 (16:43 +0000)]
powerd(8) requires root permissions to run so notify the user if they
try to start it without this.

Submitted by: Philip S. Schulz
MFC after: 2 days

19 years agoreflect scope change.
Hajimu UMEMOTO [Mon, 25 Jul 2005 16:26:47 +0000 (16:26 +0000)]
reflect scope change.

Obtained from: KAME

19 years agoMove DNS configuration before sendmail configuration, because
Tilman Keskinoz [Mon, 25 Jul 2005 16:04:30 +0000 (16:04 +0000)]
Move DNS configuration before sendmail configuration,  because
newaliases(1) may hang without proper DNS configuration.

Approved by: brueffer

19 years agoDisable thread support in BIND. It appears to reduce performance rather
Dag-Erling Smørgrav [Mon, 25 Jul 2005 14:44:11 +0000 (14:44 +0000)]
Disable thread support in BIND.  It appears to reduce performance rather
than increase it, and seems to be the cause of the memory leaks which some
users have reported.

Requested by: dougb
MFC after: 5 days

19 years agoinclude netinet6/scope6_var.h.
Hajimu UMEMOTO [Mon, 25 Jul 2005 12:36:43 +0000 (12:36 +0000)]
include netinet6/scope6_var.h.

19 years agoscope cleanup. with this change
Hajimu UMEMOTO [Mon, 25 Jul 2005 12:31:43 +0000 (12:31 +0000)]
scope cleanup.  with this change
- most of the kernel code will not care about the actual encoding of
  scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
  scoped addresses as a special case.
- scope boundary check will be stricter.  For example, the current
  *BSD code allows a packet with src=::1 and dst=(some global IPv6
  address) to be sent outside of the node, if the application do:
    s = socket(AF_INET6);
    bind(s, "::1");
    sendto(s, some_global_IPv6_addr);
  This is clearly wrong, since ::1 is only meaningful within a single
  node, but the current implementation of the *BSD kernel cannot
  reject this attempt.

Submitted by: JINMEI Tatuya <jinmei__at__isl.rdc.toshiba.co.jp>
Obtained from: KAME

19 years agoConnect GZERO to the build.
Pawel Jakub Dawidek [Mon, 25 Jul 2005 10:49:05 +0000 (10:49 +0000)]
Connect GZERO to the build.

MFC after: 3 days

19 years agoCast to uintptr_t when the compiler complains. This unbreaks ULE
Xin LI [Mon, 25 Jul 2005 10:21:49 +0000 (10:21 +0000)]
Cast to uintptr_t when the compiler complains.  This unbreaks ULE
scheduler breakage accompanied by the recent atomic_ptr() change.

19 years agoAdd a very simple and small GEOM class - ZERO.
Pawel Jakub Dawidek [Mon, 25 Jul 2005 10:03:16 +0000 (10:03 +0000)]
Add a very simple and small GEOM class - ZERO.
It creates very huge provider (41PB) /dev/gzero.
On BIO_READ request it zero-fills bio_data and on BIO_WRITE it does nothing.
You can also set kern.geom.zero.clear sysctl to 0 to do nothing even for
BIO_READ.

I'm using it for performance testing where it is very helpful.

MFC after: 3 days

19 years agoIf a retrieved UMA zone is a secondary zone, don't report keg free items,
Robert Watson [Mon, 25 Jul 2005 09:52:59 +0000 (09:52 +0000)]
If a retrieved UMA zone is a secondary zone, don't report keg free items,
as they actually belong to the  primary zone, and maye otherwise be
reported more than once.

MFC after: 1 day

19 years agoAdd some more NO_FOO options. I'm not sure if they're correctly sorted in the
Philip Paeps [Mon, 25 Jul 2005 09:15:12 +0000 (09:15 +0000)]
Add some more NO_FOO options.  I'm not sure if they're correctly sorted in the
size-scheme.  Also add commented NO_BIND_FOO options for people who want named
but not all of the bloat it likes to include by default.

While here, make a comment about BOOT_COMCONSOLE_SPEED.

19 years agoAdd fstab entries for ALTROOTSLICE and CFGSLICE, allowing us to do away with
Philip Paeps [Mon, 25 Jul 2005 08:40:13 +0000 (08:40 +0000)]
Add fstab entries for ALTROOTSLICE and CFGSLICE, allowing us to do away with
most of the hardcoding of device names in installed convenience scripts.

Provide a new script (root/updatep) to easily update the ALTROOTSLICE.  It
does the same as updatep1/updatep2 without hardcoded device names.  If noone
protests, I'd like to get rid of updatep1/updatep2 at some point.

As an extra bonus: turn on the error led while updating (on hardware with a
led).

19 years agotreat REASSOC events just like ASSOC
Sam Leffler [Mon, 25 Jul 2005 04:32:40 +0000 (04:32 +0000)]
treat REASSOC events just like ASSOC

MFC after: 3 days

19 years agoWe check that all the member interfaces have the same MTU on attach to the
Andrew Thompson [Mon, 25 Jul 2005 02:22:37 +0000 (02:22 +0000)]
We check that all the member interfaces have the same MTU on attach to the
bridge but the interface can still be changed afterwards.

This falls under the 'dont do that' category but log an warning when INVARIANTS
is defined.

Approved by: mlaier (mentor)
MFC after: 3 days

19 years agoRename UMA_MAX_NAME to UTH_MAX_NAME, since it's a maximum in the
Robert Watson [Mon, 25 Jul 2005 00:47:32 +0000 (00:47 +0000)]
Rename UMA_MAX_NAME to UTH_MAX_NAME, since it's a maximum in the
monitoring API, which might or might not be the same as the internal
maximum (currently none).

Export flag information on UMA zones -- in particular, whether or
not this is a secondary zone, and so the keg free count should be
considered in that light.

MFC after: 1 day

19 years agoRemove NOP spl*() calls and add locking (making gem(4) MPSAFE).
Marius Strobl [Sun, 24 Jul 2005 18:45:15 +0000 (18:45 +0000)]
Remove NOP spl*() calls and add locking (making gem(4) MPSAFE).

Based on: hme(4)
Reviewed by: yongari
Tested on: powerpc(grehan), sparc64

19 years ago- Wrap the handler and associated code for collecting completed RX
Marius Strobl [Sun, 24 Jul 2005 18:12:31 +0000 (18:12 +0000)]
- Wrap the handler and associated code for collecting completed RX
  descriptors that are still marked owned in #ifdef GEM_RINT_TIMEOUT
  instead of #if 0 for convenience.
- Remove stale code and comment about relying on the preset XIF config.
- In case of a watchdog timeout call the init function instead of just
  the start function so the chip is properly reset.

Merge from hme(4):
- Convert to use bus_dmamap_load_mbuf_sg() for loading RX buffers.
- Protect from a duplicate mbuf free panic in case the DMA engine hangs.

Reviewed by: yongari
Tested on: powerpc(grehan), sparc64
MFC after: 1 week

19 years agoAdd back ed(4) in amd64 GENERIC. It now works nicely and since those
Maxime Henrion [Sun, 24 Jul 2005 17:55:57 +0000 (17:55 +0000)]
Add back ed(4) in amd64 GENERIC.  It now works nicely and since those
chips are commonly found, it makes sense to have it in GENERIC.  This
is a candidate for a RELENG_6 MFC.

Approved by; peter
Requested by: pav
Tested by: pav

19 years agoIntroduce new sysctl variable: net.bpf.stats. This sysctl variable can
Christian S.J. Peron [Sun, 24 Jul 2005 17:21:17 +0000 (17:21 +0000)]
Introduce new sysctl variable: net.bpf.stats. This sysctl variable can
be used to pass statistics regarding dropped, matched and received
packet counts from the kernel to user-space. While we are here
introduce a new counter for filtered or matched packets. We currently
keep track of packets received or dropped by the bpf device, but not
how many packets actually matched the bpf filter.

-Introduce net.bpf.stats sysctl OID
-Move sysctl variables after the function prototypes so we can
 reference bpf_stats_sysctl(9) without build errors.
-Introduce bpf descriptor counter which is used mainly for sizing
 of the xbpf_d array.
-Introduce a xbpf_d structure which will act as an external
 representation of the bpf_d structure.
-Add a the following members to the bpfd structure:

bd_fcount - Number of packets which matched bpf filter
bd_pid - PID which opened the bpf device
bd_pcomm - Process name which opened the device.

It should be noted that it's possible that the process which opened
the device could be long gone at the time of stats collection. An
example might be a process that opens the bpf device forks then exits
leaving the child process with the bpf fd.

Reviewed by: mdodd

19 years agoSpeed up __wcsconv() (and hence the printf() %ls format):
Tim J. Robbins [Sun, 24 Jul 2005 12:12:44 +0000 (12:12 +0000)]
Speed up __wcsconv() (and hence the printf() %ls format):
- use wcsrtombs() instead of a wcrtomb() loop where possible.
- avoid wcrtomb() loop when output precision is small.

19 years agoo fix setup of sc_diversity; the hal does not give us reliable
Sam Leffler [Sun, 24 Jul 2005 05:11:39 +0000 (05:11 +0000)]
o fix setup of sc_diversity; the hal does not give us reliable
  status after attach, only after a reset
o when setting diversity via the sysctl don't update sc_diversity
  until we know the hal requested worked
o while here eliminate sc_hasdiversity and sc_hastpc; just query
  the hal each time since these are the only places we need to know

MFC after: 3 days

19 years agoSince libmemstat(3) now supports its own error management mechanism,
Robert Watson [Sun, 24 Jul 2005 01:42:42 +0000 (01:42 +0000)]
Since libmemstat(3) now supports its own error management mechanism,
use that instead of trying to use errno, in order to produce a
sensible error message.

MFC after: 1 day

19 years agoHaving decided not to provide a libmemstat(3) error number to text
Robert Watson [Sun, 24 Jul 2005 01:41:47 +0000 (01:41 +0000)]
Having decided not to provide a libmemstat(3) error number to text
conversion routine, now change my mind and add one, memstat_strerror(3),
which returns a const char * pointer to a string describing the error,
to be used on the results of memstat_mtl_geterror().

While here, also correct a minor typo in the HISTORY man page.

Pointers on improving ease of internationalization would be
appreciated.

MFC after: 1 day

19 years agoDocument additional aspects of libmemstat(3):
Robert Watson [Sun, 24 Jul 2005 01:29:30 +0000 (01:29 +0000)]
Document additional aspects of libmemstat(3):

- Short description of each memory type access method.

- Descriptions of libmemstat(3) errors and memstat_mtl_geterror(3).

MFC after: 1 day

19 years agoIntroduce more formal error handling for libmemstat(3):
Robert Watson [Sun, 24 Jul 2005 01:28:54 +0000 (01:28 +0000)]
Introduce more formal error handling for libmemstat(3):

- Define a set of libmemstat(3) error constants, which are used by all
  libmemstat(3) methods except for memstat_mtl_alloc(), which allocates
  a memory type list and may return ENOMEM via errno.

- Define a per-memory_type_list current error value, which is set when a
  call associated with a memory list fails.  This requires wrapping a
  structure around the queue(9) list head data structure, but this change
  is not visible to libmemstat(3) consumers due to using access methods.

- Add a new accessor method, memstat_mtl_geterror() to retrieve the error
  number.

- Consistently set the error number in a number of failure modes where
  previously some combination of setting errno and printf'ing error
  descriptions was used.  libmemstat(3) will now no longer print to stdio
  under any circumstances.  Returns of NULL/-1 for errors remain the
  same.

This avoids use of stdio, misuse of error numbers, and should make it
easier to program a libmemstat(3) consumer able to print useful error
messages.  Currently, no error-to-string function is provided, as I'm
unsure how to address internationalization concerns.

MFC after: 1 day

19 years agoAdd an entry for /usr/sbin/vttest
Doug Barton [Sat, 23 Jul 2005 23:55:27 +0000 (23:55 +0000)]
Add an entry for /usr/sbin/vttest

Submitted by: Pawel Worach <pawel.worach@gmail.com>

19 years agoBetter translation.
Pawel Jakub Dawidek [Sat, 23 Jul 2005 21:30:35 +0000 (21:30 +0000)]
Better translation.

19 years agoPrefix two non-static libmemstat(3) internal functions with '_' symbols, to
Robert Watson [Sat, 23 Jul 2005 21:17:15 +0000 (21:17 +0000)]
Prefix two non-static libmemstat(3) internal functions with '_' symbols, to
try and discourage use outside the library.

Remove duplicate declaration of memstat_mtl_free() from memstat_internal.h,
as it's not internal, and the memstat.h definition suffices.

19 years agoAdd an entry for the old fortunes2 files, and an entry
Doug Barton [Sat, 23 Jul 2005 19:42:39 +0000 (19:42 +0000)]
Add an entry for the old fortunes2 files, and an entry
for the /usr/share/doc/bind directory from pre-BIND 9 days.

19 years agoRewrite the acpi_battery interface to allow for other battery types
Nate Lawson [Sat, 23 Jul 2005 19:36:00 +0000 (19:36 +0000)]
Rewrite the acpi_battery interface to allow for other battery types
(i.e., smart battery) and fix various bugs found during the cleanup.

API changes:
* kernel access:
Access to individual batteries is now via devclass_find("battery").
Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and
ACPI_BATT_GET_INFO (for _BIF-formatted data).  The helper function
acpi_battery_get_battinfo() now takes a device_t instead of a unit #
argument.  If dev is NULL, this signifies all batteries.

* ioctl access:
The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been
removed.  Since there is now no need for a mapping between "virtual" unit
and physical unit, usermode programs can just specify the unit directly and
skip the old translation steps.  In fact, acpiconf(8) was actually already
doing this and virtual unit was the same as physical unit in all cases
since there was previously only one battery type (acpi_cmbat).  Additionally,
we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all
batteries, if they provide the associated methods.

* apm compatibility device/ioctls:  no change
* sysctl:  no change

Since most third-party applications use the apm(4) compat interface, there
should be very few affected applications (if any).

Reviewed by: bruno
MFC after: 5 days

19 years agoFix missing '=' in structure initialization.
David E. O'Brien [Sat, 23 Jul 2005 19:28:51 +0000 (19:28 +0000)]
Fix missing '=' in structure initialization.

19 years ago(More thoroughly) fix the problem with the EGREP lines that was reported
Doug Barton [Sat, 23 Jul 2005 18:47:18 +0000 (18:47 +0000)]
(More thoroughly) fix the problem with the EGREP lines that was reported
on -current by Ben Kaduk <minimarmot@gmail.com>.

Add a hack of my own to allow the user to supply the paths to the INF and
SYS files on the command line.

19 years agoMy change, namely srandomdev() addition, was backed out even without
Andrey A. Chernov [Sat, 23 Jul 2005 18:24:47 +0000 (18:24 +0000)]
My change, namely srandomdev() addition, was backed out even without
discussing with me, and I obviously disagree seeing that afterwards
(srandomdev() back out not fix any thing, it can only mask the problem).

So, back out the back out and return srandomdev().

People who have problems with repeated quotes should use -D fortune
option for debugging to see is the problem in (1) /dev/random initialization
or in (2) fortune code itself.

I will be glad to help, but I can't reproduce repeated quote situation
on my machine.

In either case found, (1) or (2) should be fixed instead of removing
srandomdev().

19 years agoTemporary restore a part of rev 1.6.
R. Imura [Sat, 23 Jul 2005 16:52:57 +0000 (16:52 +0000)]
Temporary restore a part of rev 1.6.
We must not increase a capability of buffer size here,
because codes which call these functions expect that dst and src
are the same size.
This will cause problem when someone convert a character whose
length is different between charsets on smbfs which was changed
to use xlat16 converter.

19 years agoOops, bump __FreeBSD_version to mark shared library version bump.
Ken Smith [Sat, 23 Jul 2005 16:42:54 +0000 (16:42 +0000)]
Oops, bump __FreeBSD_version to mark shared library version bump.

Reminded by: nork