]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoDike out another kvm indiscretion.
phk [Wed, 16 Mar 2005 10:24:16 +0000 (10:24 +0000)]
Dike out another kvm indiscretion.

19 years agoStart natd(8) before loading firewall rules, to give the
ru [Wed, 16 Mar 2005 08:47:48 +0000 (08:47 +0000)]
Start natd(8) before loading firewall rules, to give the
ipdivert.ko module a chance to load.

19 years agoMFp4: use the function to fix the packet header length instead of rolling
jmg [Wed, 16 Mar 2005 08:13:08 +0000 (08:13 +0000)]
MFp4: use the function to fix the packet header length instead of rolling
our own...

19 years agoRemove inode fields previously used for private inode hash tables.
phk [Wed, 16 Mar 2005 08:09:52 +0000 (08:09 +0000)]
Remove inode fields previously used for private inode hash tables.

19 years agoFix a comment.
harti [Wed, 16 Mar 2005 08:06:28 +0000 (08:06 +0000)]
Fix a comment.

19 years agoGet rid of another bunch of Lst_ForEach in favour of LST_FOREACH and
harti [Wed, 16 Mar 2005 08:04:45 +0000 (08:04 +0000)]
Get rid of another bunch of Lst_ForEach in favour of LST_FOREACH and
simplify code accordingly.

19 years agoMFp4: print a more useful error when we don't have a /dev to mount devfs
jmg [Wed, 16 Mar 2005 08:04:39 +0000 (08:04 +0000)]
MFp4: print a more useful error when we don't have a /dev to mount devfs
on..

19 years agoMFp4: add in making fiq's work by coping to the correct page incase we have
jmg [Wed, 16 Mar 2005 07:56:21 +0000 (07:56 +0000)]
MFp4:  add in making fiq's work by coping to the correct page incase we have
the vectors relocated high..

19 years agofix up white space, I had a simple comment fix, but I might as well do the
jmg [Wed, 16 Mar 2005 07:53:02 +0000 (07:53 +0000)]
fix up white space, I had a simple comment fix, but I might as well do the
rest while I'm here...

19 years agoAdd mnt_hashseed to struct mount and initialize it witn PRNG bits, use
phk [Wed, 16 Mar 2005 07:35:06 +0000 (07:35 +0000)]
Add mnt_hashseed to struct mount and initialize it witn PRNG bits, use
it to get better hashing in vfs_hash.

In case of an insert collision in vfs_hash_insert(), put the loosing vnode
on a special list so that vfs_hash_remove() can just assume that it is on
a list.

Drop the VI_HASHED flag.

19 years agoXXX: unnecessary pointer in inode.
phk [Wed, 16 Mar 2005 07:21:38 +0000 (07:21 +0000)]
XXX: unnecessary pointer in inode.

19 years agoDon't store the disk cdev in all inodes.
phk [Wed, 16 Mar 2005 07:17:39 +0000 (07:17 +0000)]
Don't store the disk cdev in all inodes.

19 years agoDon't hold a reference to the disk vnode for each inode.
phk [Wed, 16 Mar 2005 07:13:09 +0000 (07:13 +0000)]
Don't hold a reference to the disk vnode for each inode.

Don't store the disk cdev in all inodes, it's only used for debugging
printfs.

19 years agoplug resource leak
sam [Wed, 16 Mar 2005 05:27:19 +0000 (05:27 +0000)]
plug resource leak

Noticed by: Coverity Prevent analysis tool

19 years agocorrect bounds check
sam [Wed, 16 Mar 2005 05:11:11 +0000 (05:11 +0000)]
correct bounds check

Noticed by: Coverity Prevent analysis tool

19 years agoEnable ehci by default on i386 and amd64. It had got to the stage
iedowse [Wed, 16 Mar 2005 02:34:50 +0000 (02:34 +0000)]
Enable ehci by default on i386 and amd64. It had got to the stage
where having this disabled was actually hurting us, since so many
BIOSes include legacy USB emulation that takes control of all usb
ports and only the ehci driver knows how to disable it.

19 years agoChase location of scd.c and bump .Dd.
brueffer [Wed, 16 Mar 2005 02:03:15 +0000 (02:03 +0000)]
Chase location of scd.c and bump .Dd.

Submitted by: markus
MFC after: 3 days

19 years agomake bus_dmamem_alloc always allocate a new map like we are suppose to..
jmg [Wed, 16 Mar 2005 00:35:59 +0000 (00:35 +0000)]
make bus_dmamem_alloc always allocate a new map like we are suppose to..
This was found when I tried to run the usb code on my arm board...

Approved by: cognet

19 years agoClarify that the end argument meaning for rman_reserve_resource_bound
imp [Tue, 15 Mar 2005 23:58:55 +0000 (23:58 +0000)]
Clarify that the end argument meaning for rman_reserve_resource_bound
is the highest acceptable value for the ending of the resource being
allocated.  One could also believe that it is the highest starting
value of the resource.  The code definitely expects the former, but I
could find no documentation of this apart from TFSC.

19 years agoIf bus_generic_susped returns an error, devlist is not freed. Free it.
imp [Tue, 15 Mar 2005 22:53:31 +0000 (22:53 +0000)]
If bus_generic_susped returns an error, devlist is not freed.  Free it.

Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)

19 years agoDon't hold a reference to the disk vnode for each inode.
phk [Tue, 15 Mar 2005 21:09:52 +0000 (21:09 +0000)]
Don't hold a reference to the disk vnode for each inode.

Eliminate cdev and vnode pointer to the disk from the inodes,
the mount holds everything we need.

19 years agoEliminate cdev pointer in inodes, they're not used or needed.
phk [Tue, 15 Mar 2005 20:57:25 +0000 (20:57 +0000)]
Eliminate cdev pointer in inodes, they're not used or needed.

The cdev could have been pulled out of the mountpoint cheaper back
when it was used anyway.

19 years agoDon't hold a reference on the disk vnode for each inode.
phk [Tue, 15 Mar 2005 20:50:58 +0000 (20:50 +0000)]
Don't hold a reference on the disk vnode for each inode.

19 years agoSometimes, when asked to return region A..C, we'd return A+N..C+N
imp [Tue, 15 Mar 2005 20:28:51 +0000 (20:28 +0000)]
Sometimes, when asked to return region A..C, we'd return A+N..C+N
instead of failing.

When looking for a region to allocate, we used to check to see if the
start address was < end.  In the case where A..B is allocated already,
and one wants to allocate A..C (B < C), then this test would
improperly fail (which means we'd examine that region as a possible
one), and we'd return the region B+1..C+(B-A+1) rather than NULL.
Since C+(B-A+1) is necessarily larger than C (end argument), this is
incorrect behavior for rman_reserve_resource_bound().

The fix is to exclude those regions where r->r_start + count - 1 > end
rather than r->r_start > end.  This bug has been in this code for a
very long time.  I believe that all other tests against end are
correctly done.

This is why sio0 generated a message about interrupts not being
enabled properly for the device.  When fdc had a bug that allocated
from 0x3f7 to 0x3fb, sio0 was then given 0x3fc-0x404 rather than the
0x3f8-0x3ff that it wanted.  Now when fdc has the same bug, sio0 fails
to allocate its ports, which is the proper behavior.  Since the probe
failed, we never saw the messed up resources reported.

I suspect that there are other places in the tree that have weird
looping or other odd work arounds to try to cope with the observed
weirdness this bug can introduce.  These workarounds should be located
and eliminated.

Minor debug write fix to match the above test done as well.

'nice' by: mdodd
Sponsored by: timing solutions (http://www.timing.com/)

19 years agoFix a debugging printf. The order of start/end was inconsistant with
imp [Tue, 15 Mar 2005 20:15:15 +0000 (20:15 +0000)]
Fix a debugging printf.  The order of start/end was inconsistant with
all the other start/end debugs, causing momentary confusion when the
output was examined.

19 years agoImprove the vfs_hash() API: vput() the unneeded vnode centrally to
phk [Tue, 15 Mar 2005 20:00:03 +0000 (20:00 +0000)]
Improve the vfs_hash() API: vput() the unneeded vnode centrally to
avoid replicating the vput in all the filesystems.

19 years agoRemove OBE comment about AMD64 memory model.
obrien [Tue, 15 Mar 2005 18:44:51 +0000 (18:44 +0000)]
Remove OBE comment about AMD64 memory model.

19 years agoEnsure GCC does not use FP registers in integer code.
obrien [Tue, 15 Mar 2005 18:43:36 +0000 (18:43 +0000)]
Ensure GCC does not use FP registers in integer code.
I think all we really need is -fno-sse2.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.

19 years agoRemove fpsetsticky(). This was added for SysV compatibility, but due
das [Tue, 15 Mar 2005 15:53:39 +0000 (15:53 +0000)]
Remove fpsetsticky().  This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors.  In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
  and *sets* the new flag word to M.  (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
  and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break.  I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it.  This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated.  ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386.  As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR: 75862
Suggested by: bde

19 years agoUps. Revert the last commits. These have been committed by accident.
harti [Tue, 15 Mar 2005 15:10:51 +0000 (15:10 +0000)]
Ups. Revert the last commits. These have been committed by accident.

19 years agomodifier_M: instead of going through the string twice to compute the
harti [Tue, 15 Mar 2005 15:05:14 +0000 (15:05 +0000)]
modifier_M: instead of going through the string twice to compute the
size of the buffer we need, just allocate the possible maximum.

Patch: 7.117

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agofix arm wrt to busdma...
jmg [Tue, 15 Mar 2005 14:57:30 +0000 (14:57 +0000)]
fix arm wrt to busdma...

also wrap the two macros that have bare if's w/ do {} while(0) so that
my epe driver doesn't get a warning about braces around confused else...

19 years agotime_t is signed, so s/uintmax_t/intmax_t/g. Has anyone got an extra pointy
philip [Tue, 15 Mar 2005 14:52:11 +0000 (14:52 +0000)]
time_t is signed, so s/uintmax_t/intmax_t/g.  Has anyone got an extra pointy
hat for me?  I'm running out of them.

Spotted by: des
Pointy hat to: philip

19 years agoStyle: Move a variable from a local scope up to the begin of the function.
harti [Tue, 15 Mar 2005 14:52:10 +0000 (14:52 +0000)]
Style: Move a variable from a local scope up to the begin of the function.
Rename result variable so common code becomes more visible.
Rename freePtr to freeResult to make clear what pointer must be freed.

Patch: 7.116, 7.116a

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years ago - Now that there are no external users of vfree() make it static.
jeff [Tue, 15 Mar 2005 14:38:16 +0000 (14:38 +0000)]
 - Now that there are no external users of vfree() make it static.
 - Move VSHOULDBUSY, VSHOULDFREE, and VTRYRECYCLE into vfs_subr.c so
   no one else attempts to grow a dependency on them.
 - Now that objects with pages hold the vnode we don't have to do unlocked
   checks for the page count in the vm object in VSHOULDFREE.  These three
   macros could simply check for holdcnt state transitions to determine
   whether the vnode is on the free list already, but the extra safety
   the flag affords us is probably worth the minimal cost.
 - The leafonly sysctl and code have been dead for several years now,
   remove the sysctl and the code that employed it from vtryrecycle().
 - vtryrecycle() also no longer has to check the object's page count as
   the object holds the vnode until it reaches 0.

Sponsored by: Isilon Systems, Inc.

19 years agoDike out unwarranted si_udev fondling.
phk [Tue, 15 Mar 2005 14:30:26 +0000 (14:30 +0000)]
Dike out unwarranted si_udev fondling.

19 years agoGet rid of a number of Lst_ForEach calls in favour of LST_FOREACH
harti [Tue, 15 Mar 2005 14:28:39 +0000 (14:28 +0000)]
Get rid of a number of Lst_ForEach calls in favour of LST_FOREACH
and simplify the printing functions.

19 years agoVarParseLong: move the detection of the modifier separator ':' into
harti [Tue, 15 Mar 2005 14:27:29 +0000 (14:27 +0000)]
VarParseLong: move the detection of the modifier separator ':' into
the loop. Add a comment why the 'consumed' variable is updated.
Rename lengthPtr to consumed.

Patch: 7.115

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoDike out unwarranted reference to si_udev.
phk [Tue, 15 Mar 2005 14:26:14 +0000 (14:26 +0000)]
Dike out unwarranted reference to si_udev.

19 years agoYet another version of passing the last line to ParseFinishLine().
harti [Tue, 15 Mar 2005 14:25:24 +0000 (14:25 +0000)]
Yet another version of passing the last line to ParseFinishLine().
It turns out that some ports use the obscure feature of spreading
a dependency block across multiple include files. While this seems
bad style, allow it for now and call said function only at end of
all input to process the really last line of everything.

19 years ago - In vm_page_insert() hold the backing vnode when the first page
jeff [Tue, 15 Mar 2005 14:14:09 +0000 (14:14 +0000)]
 - In vm_page_insert() hold the backing vnode when the first page
   is inserted.
 - In vm_page_remove() drop the backing vnode when the last page
   is removed.
 - Don't check the vnode to see if it must be reclaimed on every
   call to vm_page_free_toq() as we only check it now when it is
   actually required.  This saves us two lock operations per call.

Sponsored by: Isilon Systems, Inc.

19 years ago - Remove the now unused LK_THISLAYER.
jeff [Tue, 15 Mar 2005 14:12:10 +0000 (14:12 +0000)]
 - Remove the now unused LK_THISLAYER.

19 years agoFix a debug message to print a usable device name rather than useless
phk [Tue, 15 Mar 2005 14:08:10 +0000 (14:08 +0000)]
Fix a debug message to print a usable device name rather than useless
major+minor tupple.

19 years ago - Assume that all lower filesystems now support proper locking. Assert
jeff [Tue, 15 Mar 2005 13:49:33 +0000 (13:49 +0000)]
 - Assume that all lower filesystems now support proper locking.  Assert
   that they set v->v_vnlock.  This is true for all filesystems in the
   tree.
 - Remove all uses of LK_THISLAYER.  If the lower layer is locked, the
   null layer is locked.  We only use vget() to get a reference now.
   null essentially does no locking.  This fixes LOOKUP_SHARED with
   nullfs.
 - Remove the special LK_DRAIN considerations, I do not believe this is
   needed now as LK_DRAIN doesn't destroy the lower vnode's lock, and
   it's hardly used anymore.
 - Add one well commented hack to prevent the lowervp from going away
   while we're in it's VOP_LOCK routine.  This can only happen if we're
   forcibly unmounted while some callers are waiting in the lock.  In
   this case the lowervp could be recycled after we drop our last ref
   in null_reclaim().  Prevent this with a vhold().

19 years ago - Expose vholdl() so it may be used outside of vfs_subr.c
jeff [Tue, 15 Mar 2005 13:43:10 +0000 (13:43 +0000)]
 - Expose vholdl() so it may be used outside of vfs_subr.c

19 years agoRemove findcdev().
phk [Tue, 15 Mar 2005 12:58:08 +0000 (12:58 +0000)]
Remove findcdev().

19 years agoPolish.
phk [Tue, 15 Mar 2005 12:47:59 +0000 (12:47 +0000)]
Polish.

19 years agoDisable two users of findcdev. They do the wrong thing now and will
phk [Tue, 15 Mar 2005 12:39:30 +0000 (12:39 +0000)]
Disable two users of findcdev.  They do the wrong thing now and will
need to be fixed.  In both cases the API should be reengineered to do
something (more) sensible.

19 years agoo Add missed language doc subdirectories, sort.
maxim [Tue, 15 Mar 2005 12:21:44 +0000 (12:21 +0000)]
o Add missed language doc subdirectories, sort.

PR: docs/78859
Submitted by: skv

19 years agoNeuter the duplicated disk-device magic code for now. Somebody with
phk [Tue, 15 Mar 2005 11:58:40 +0000 (11:58 +0000)]
Neuter the duplicated disk-device magic code for now.  Somebody with
serious linux-clue is necessary to fix this properly.

19 years agoPrepend underscore to bus_dmamap_{unload|sync} in line with
grehan [Tue, 15 Mar 2005 11:43:05 +0000 (11:43 +0000)]
Prepend underscore to bus_dmamap_{unload|sync} in line with
recent busdma changes.

19 years agoInclude <sys/signalvar.h> for trapsignal prototype.
grehan [Tue, 15 Mar 2005 11:41:55 +0000 (11:41 +0000)]
Include <sys/signalvar.h> for trapsignal prototype.

19 years agoLong overdue sync-up with ATA code
grehan [Tue, 15 Mar 2005 11:41:05 +0000 (11:41 +0000)]
Long overdue sync-up with ATA code

19 years agoRename cdev->si_udev to cdev->si_drv0 to reflect the new nature of
phk [Tue, 15 Mar 2005 11:33:28 +0000 (11:33 +0000)]
Rename cdev->si_udev to cdev->si_drv0 to reflect the new nature of
the field.

19 years ago - We have to transfer lockers after reseting our vnlock pointer.
jeff [Tue, 15 Mar 2005 11:28:45 +0000 (11:28 +0000)]
 - We have to transfer lockers after reseting our vnlock pointer.

Sponsored by: Isilon Systems, Inc.

19 years agoDon't export major,minor, instead export tty name.
phk [Tue, 15 Mar 2005 11:05:11 +0000 (11:05 +0000)]
Don't export major,minor, instead export tty name.

19 years agoClean up forward struct decls.
phk [Tue, 15 Mar 2005 10:52:17 +0000 (10:52 +0000)]
Clean up forward struct decls.

19 years agoforward declare struct disk.
phk [Tue, 15 Mar 2005 10:47:38 +0000 (10:47 +0000)]
forward declare struct disk.

19 years agoCast time_t to uintmax_t so they can be printed as %ju without breaking on
philip [Tue, 15 Mar 2005 10:45:42 +0000 (10:45 +0000)]
Cast time_t to uintmax_t so they can be printed as %ju without breaking on
various architectures.  This should appease tinderbox on alpha and not break
it anywhere else.

Suggested by: harti

19 years agoPrint devtoname() instead of minor().
phk [Tue, 15 Mar 2005 10:01:31 +0000 (10:01 +0000)]
Print devtoname() instead of minor().

19 years agoFix typo: pointers are not boolean in style(9).
phk [Tue, 15 Mar 2005 10:01:14 +0000 (10:01 +0000)]
Fix typo: pointers are not boolean in style(9).

19 years agoMove devtoname() prototype to systm.h to reduce #include pollution,
phk [Tue, 15 Mar 2005 09:30:17 +0000 (09:30 +0000)]
Move devtoname() prototype to systm.h to reduce #include pollution,
it is (or should be) used in many printf() calls.

19 years ago - transferlockers() requires the interlock to be SMP safe.
jeff [Tue, 15 Mar 2005 09:27:45 +0000 (09:27 +0000)]
 - transferlockers() requires the interlock to be SMP safe.

Sponsored by: Isilon Systems, Inc.

19 years agoMerge the following from the English version:
den [Tue, 15 Mar 2005 08:29:00 +0000 (08:29 +0000)]
Merge the following from the English version:

   1.782 -> 1.823 new.sgml

Obtained from: The FreeBSD Russian Documentation Project

19 years agoSimplify the vfs_hash calling convention.
phk [Tue, 15 Mar 2005 08:07:07 +0000 (08:07 +0000)]
Simplify the vfs_hash calling convention.

19 years agoIf we fail a sanity check for the resources just allocated, make sure
imp [Tue, 15 Mar 2005 08:02:47 +0000 (08:02 +0000)]
If we fail a sanity check for the resources just allocated, make sure
that we free that resource.  All the other resources are freed in
their own routine, but since we haven't saved a pointer to this one,
it is leaked.  This is the failure case that lead to the sio ports
that weren't working, I think.

19 years agoForgot to change the pointer to the snmp_atm sources after repo-copy.
harti [Tue, 15 Mar 2005 07:38:15 +0000 (07:38 +0000)]
Forgot to change the pointer to the snmp_atm sources after repo-copy.
Correct this by pointing to the new location.

Pointy hat to: harti

Submitted by: keramida

19 years ago - Destroy the vnode object earlier in VOP_RECLAIM as we need more of
jeff [Tue, 15 Mar 2005 01:42:58 +0000 (01:42 +0000)]
 - Destroy the vnode object earlier in VOP_RECLAIM as we need more of
   the vnode valid before the vm flushes pages.
 - Get rid of some extraneous uses of the vnode interlock.

Sponsored by: Isilon Systems, Inc.

19 years agoMake this compile properly on 64bit machines.
philip [Mon, 14 Mar 2005 23:01:25 +0000 (23:01 +0000)]
Make this compile properly on 64bit machines.

Pointy hat to: philip

19 years agoAdd snmp_pf, a bsnmpd module for monitoring (not managing!) pf firewalls.
philip [Mon, 14 Mar 2005 22:16:39 +0000 (22:16 +0000)]
Add snmp_pf, a bsnmpd module for monitoring (not managing!) pf firewalls.
Currently implemented are most things related to states and interfaces, todo
are address tables and altq.  I've tried to keep this roughly in sync with a
project implementing this for net-snmpd.

Reviewed by: harti, dhartmei
MFC after: 1 month

19 years agoIn tcp_usr_send(), broaden coverage of the socket buffer lock in the
rwatson [Mon, 14 Mar 2005 22:15:14 +0000 (22:15 +0000)]
In tcp_usr_send(), broaden coverage of the socket buffer lock in the
non-OOB case so that the sbspace() check is performed under the same
lock instance as the append to the send socket buffer.

MFC after: 1 week

19 years agoThese words, while not spoken about anything even slightly related, are very,
philip [Mon, 14 Mar 2005 21:50:25 +0000 (21:50 +0000)]
These words, while not spoken about anything even slightly related, are very,
very applicable when waiting for world to compile *grin*

Impatience award to: philip

19 years agoRemove ng_connect_t where it is unused. Probably it remained from ng_source.c.
glebius [Mon, 14 Mar 2005 20:49:48 +0000 (20:49 +0000)]
Remove ng_connect_t where it is unused. Probably it remained from ng_source.c.

19 years agoUse subr_unit allocator instead of own functions.
glebius [Mon, 14 Mar 2005 20:11:29 +0000 (20:11 +0000)]
Use subr_unit allocator instead of own functions.

19 years agoUse subr_unit allocator instead of own functions.
glebius [Mon, 14 Mar 2005 19:25:24 +0000 (19:25 +0000)]
Use subr_unit allocator instead of own functions.

19 years agoOnly allocate 1 port for non-zero rids. Either we'll get the proper
imp [Mon, 14 Mar 2005 19:09:29 +0000 (19:09 +0000)]
Only allocate 1 port for non-zero rids.  Either we'll get the proper
length form the enumeration mechanism, or we're dealing with the FDCTL
register, which is only 1 port long.

19 years agoFinish repo-copy of lib/libbsnmp/modules to usr.sbin/bsnmpd/modules.
harti [Mon, 14 Mar 2005 17:32:16 +0000 (17:32 +0000)]
Finish repo-copy of lib/libbsnmp/modules to usr.sbin/bsnmpd/modules.
These modules are modules for the daemon, not for the library so
they should be where the daemon is.

19 years agoGet rid of another Lst_ForEach in favour of LST_FOREACH. Get rid
harti [Mon, 14 Mar 2005 17:04:58 +0000 (17:04 +0000)]
Get rid of another Lst_ForEach in favour of LST_FOREACH. Get rid
of the now unused struct LstSrc and collapes two functions into one.

19 years agoParseModifier(): rename rw_str to value and reindent cleanup section.
harti [Mon, 14 Mar 2005 17:03:34 +0000 (17:03 +0000)]
ParseModifier(): rename rw_str to value and reindent cleanup section.
ParseRestModifier() and ParseRestEnd(): move advancement of ptr to remove
a confusing calculation.
VarParseLong(): cleanup calculation of consumed.

Patch: 7.114

Submitted by: Max Okumoto <okumoto@ucsd.edu>

19 years agoRefactor the bus_dma header files so that the interface is described in
scottl [Mon, 14 Mar 2005 16:46:28 +0000 (16:46 +0000)]
Refactor the bus_dma header files so that the interface is described in
sys/bus_dma.h instead of being copied in every single arch.  This slightly
reorders a flag that was specific to AXP and thus changes the ABI there.
The interface still relies on bus_space definitions found in <machine/bus.h>
so it cannot be included on its own yet, but that will be fixed at a later
date.  Add an MD <machine/bus_dma.h> for ever arch for consistency and to
allow for future MD augmentation of the API.  sparc64 makes heavy use of
this right now due to its different bus_dma implemenation.

19 years agoHook pfs_lookup() up to vfs_cachedlookup_desc instead of vfs_lookup_desc,
des [Mon, 14 Mar 2005 16:24:50 +0000 (16:24 +0000)]
Hook pfs_lookup() up to vfs_cachedlookup_desc instead of vfs_lookup_desc,
as suggested by Matt's comment.  Also fix some style and paranoia issues.

The entire function could benefit from review by a VFS guru.

MFC after: 6 weeks

19 years agoFix two long-standing bugs in pfs_readdir():
des [Mon, 14 Mar 2005 16:21:32 +0000 (16:21 +0000)]
Fix two long-standing bugs in pfs_readdir():

Since we used an sbuf of size resid to accumulate dirents, we would end
up returning one byte short when we had enough dirents to fill or exceed
the size of the sbuf (the last byte being lost to bogus NUL termination)
causing the next call to return EINVAL due to an unaligned offset.  This
went undetected for a long time because I did most of my testing in
single-user mode, where there are rarely enough processes to fill the
4096-byte buffer ls(1) uses.  The most common symptom of this bug is that
tab completion of /proc or /compat/linux/proc does not work properly when
many processes are running.

Also, a check near the top would return EINVAL if resid was smaller than
PFS_DELEN, even if it was 0, which is frequently the case and perfectly
allowable.  Change the test so that it returns 0 if resid is 0.

MFC after: 2 weeks

19 years agoIf PSEUDOFS_TRACE is defined, create a sysctl knob to enable / disable
des [Mon, 14 Mar 2005 16:06:47 +0000 (16:06 +0000)]
If PSEUDOFS_TRACE is defined, create a sysctl knob to enable / disable
pseudofs call tracing.

19 years agoAdd PSEUDOFS_TRACE option.
des [Mon, 14 Mar 2005 16:04:27 +0000 (16:04 +0000)]
Add PSEUDOFS_TRACE option.

19 years agoo Use subr_unit allocator. This simplifies code much:
glebius [Mon, 14 Mar 2005 16:02:53 +0000 (16:02 +0000)]
o Use subr_unit allocator. This simplifies code much:
  - Remove get_free_unit().
  - Remove SLIST of nodes.
  - Remove global mutex.

o Increase NGD_MAX to 999.
o Move ngd_mod_event() up to netgraph methods.

19 years agofbsdidize.
des [Mon, 14 Mar 2005 15:54:11 +0000 (15:54 +0000)]
fbsdidize.

19 years agoMangle a manpage.
phk [Mon, 14 Mar 2005 15:38:34 +0000 (15:38 +0000)]
Mangle a manpage.

19 years agoDo not attach MBR on top of an MBR. This removes some confusing
phk [Mon, 14 Mar 2005 15:22:18 +0000 (15:22 +0000)]
Do not attach MBR on top of an MBR.  This removes some confusing
slice names on disks with extended partitions.

Spotted on: Mother-in-laws computer.

19 years agoBe sure that class name storaed in 'class_name' is lower case.
pjd [Mon, 14 Mar 2005 15:00:51 +0000 (15:00 +0000)]
Be sure that class name storaed in 'class_name' is lower case.

MFC after: 1 week

19 years agoUse vfs_hash instead of home-rolled.
phk [Mon, 14 Mar 2005 14:41:37 +0000 (14:41 +0000)]
Use vfs_hash instead of home-rolled.

19 years agoDefine subcommands' usage inside g_command structure.
pjd [Mon, 14 Mar 2005 14:25:47 +0000 (14:25 +0000)]
Define subcommands' usage inside g_command structure.

MFC after: 1 week

19 years ago- Add gc_usage field to g_command structure. This will allow to define
pjd [Mon, 14 Mar 2005 14:24:46 +0000 (14:24 +0000)]
- Add gc_usage field to g_command structure. This will allow to define
  usage for a subcommand, so no 'usage' function has to be implemented
  in class library.
- Bump version number as it breaks ABI, but don't provide backward
  compatibility, because there are probably no external consumers of this
  geom(8).
This allows to print more precise usage for standard commands and simplify
class libraries a bit.

MFC after: 1 week

19 years agoo Improve the example a bit.
maxim [Mon, 14 Mar 2005 14:12:29 +0000 (14:12 +0000)]
o Improve the example a bit.

Submitted by: hrs

19 years ago- new sentence, new line
brueffer [Mon, 14 Mar 2005 14:04:02 +0000 (14:04 +0000)]
- new sentence, new line
- s/freebsd/FreeBSD/

19 years agoForgot cvs rm in last file.
phk [Mon, 14 Mar 2005 13:30:45 +0000 (13:30 +0000)]
Forgot cvs rm in last file.

19 years agoUse vfs_hash() instead of home-rolled
phk [Mon, 14 Mar 2005 13:30:06 +0000 (13:30 +0000)]
Use vfs_hash() instead of home-rolled

19 years agoUse vfs_hash instead of home-rolled.
phk [Mon, 14 Mar 2005 13:22:41 +0000 (13:22 +0000)]
Use vfs_hash instead of home-rolled.

19 years agoInstead of documenting every standard subcommand's argument everywhere,
pjd [Mon, 14 Mar 2005 13:14:04 +0000 (13:14 +0000)]
Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after: 1 week

19 years agoDocument subcommands' arguments.
pjd [Mon, 14 Mar 2005 13:06:09 +0000 (13:06 +0000)]
Document subcommands' arguments.

MFC after: 1 week

19 years agoDocument '-s' option of 'status' subcommand.
pjd [Mon, 14 Mar 2005 12:37:55 +0000 (12:37 +0000)]
Document '-s' option of 'status' subcommand.

MFC after: 1 week