dragonfly.git
15 years agosys/types.h ==> sys/param.h
Joerg Sonnenberger [Mon, 31 Jan 2005 21:20:58 +0000 (21:20 +0000)]
sys/types.h ==> sys/param.h

15 years ago- Move deallocation of Buffer object to end of routine.
Max Okumoto [Mon, 31 Jan 2005 21:13:07 +0000 (21:13 +0000)]
- Move deallocation of Buffer object to end of routine.

15 years agoFixes in main.c
Max Okumoto [Mon, 31 Jan 2005 21:11:26 +0000 (21:11 +0000)]
Fixes in main.c
- Cleanup VPATH variable expansion and parsing.
- Cleanup -V flag handling.
- Added comments.
- Fixed negative logic in if-statements.

15 years agoThe last commit couldn't handle cases when $GZIP contained
YONETANI Tomokazu [Mon, 31 Jan 2005 19:28:57 +0000 (19:28 +0000)]
The last commit couldn't handle cases when $GZIP contained
more than one argument and still crashed.
NetBSD CVS keyword is left unchanged as we don't have changes
1.68 and 1.69 yet.

Obtained-from: NetBSD gzip.c revision 1.70

15 years agoRegen.
Joerg Sonnenberger [Mon, 31 Jan 2005 18:18:21 +0000 (18:18 +0000)]
Regen.

15 years agoCleanup last commit. Remove local ncp, it shadows the parameter, add
Joerg Sonnenberger [Mon, 31 Jan 2005 18:11:06 +0000 (18:11 +0000)]
Cleanup last commit. Remove local ncp, it shadows the parameter, add
return(0) and remove unused locals in vn_fullpath.

15 years agoTake advantage of our new namecache topology to generate the actual paths
Matthew Dillon [Mon, 31 Jan 2005 18:05:09 +0000 (18:05 +0000)]
Take advantage of our new namecache topology to generate the actual paths
associated with open file descriptors, root, and working directories,
and the exec binary's file path.

Adjust the width and alignment of some of the columns.

15 years agoDon't copy blindly MAXPATHLEN byte from fullpath. vn_fullpath
Joerg Sonnenberger [Mon, 31 Jan 2005 17:53:57 +0000 (17:53 +0000)]
Don't copy blindly MAXPATHLEN byte from fullpath. vn_fullpath
allocates MAXPATHLEN, but the buffer is utilized from the end.

15 years agoRegen.
Joerg Sonnenberger [Mon, 31 Jan 2005 17:38:30 +0000 (17:38 +0000)]
Regen.

15 years agoAdd jail_attach syscall.
Joerg Sonnenberger [Mon, 31 Jan 2005 17:35:35 +0000 (17:35 +0000)]
Add jail_attach syscall.

15 years agoUncomment the entry for kern_chrot in kern_syscall.h and change the
Joerg Sonnenberger [Mon, 31 Jan 2005 17:20:48 +0000 (17:20 +0000)]
Uncomment the entry for kern_chrot in kern_syscall.h and change the
implementation to take the namecache entry directly.

15 years agoSplit vn_fullpath into cache_fullpath and vn_fullpath. The former just
Joerg Sonnenberger [Mon, 31 Jan 2005 17:17:58 +0000 (17:17 +0000)]
Split vn_fullpath into cache_fullpath and vn_fullpath. The former just
takes a namespace entry directly.

15 years agosys/types.h ==> sys/param.h
Joerg Sonnenberger [Mon, 31 Jan 2005 16:51:09 +0000 (16:51 +0000)]
sys/types.h ==> sys/param.h

15 years agoIn preparation for the jail commit, include sys/param.h instead of sys/types.h.
Joerg Sonnenberger [Mon, 31 Jan 2005 16:50:33 +0000 (16:50 +0000)]
In preparation for the jail commit, include sys/param.h instead of sys/types.h.

15 years agoRemove unused compat code like FXP_LOCK, a fake struct mtx.
Joerg Sonnenberger [Mon, 31 Jan 2005 15:39:12 +0000 (15:39 +0000)]
Remove unused compat code like FXP_LOCK, a fake struct mtx.
Remove FXP_UNIT. Don't define sc_if, use the arpcom entry
directly. Use PCIR_BAR instead of PCIR_MAPS.

15 years ago- Add missing disclamer.
Max Okumoto [Mon, 31 Jan 2005 09:49:14 +0000 (09:49 +0000)]
- Add missing disclamer.

15 years ago- Convert negative logic, so code is easyer to read.
Max Okumoto [Mon, 31 Jan 2005 08:30:51 +0000 (08:30 +0000)]
- Convert negative logic, so code is easyer to read.

- Start using Buffer objects, instead of c strings.  That way we
  can pass back one object, instead of passing back seperate length
  and character arrays.

15 years agoAdd a sysctl to control 8254 bios overwrite warnings. Default is on.
Matthew Dillon [Mon, 31 Jan 2005 04:35:17 +0000 (04:35 +0000)]
Add a sysctl to control 8254 bios overwrite warnings.  Default is on.

Submitted-by: "E.Girkantas" <eg@zemaitija.net>
15 years ago- Hide the following characters '(', ')', '{', '}' inside of #defines
Max Okumoto [Sun, 30 Jan 2005 07:20:59 +0000 (07:20 +0000)]
- Hide the following characters '(', ')', '{', '}' inside of #defines
  to make it easyer to read. OPEN_PARN, CLOSE_PAREN, OPEN_BRACKET,
  and CLOSE_BRACKET.

- Re-write for loop into a while loop to clearify operation.

Tested by comparing object files.

15 years agoRedo argv processing to better conform to standards. A NULL argv is no
Matthew Dillon [Sat, 29 Jan 2005 20:54:20 +0000 (20:54 +0000)]
Redo argv processing to better conform to standards.  A NULL argv is no
longer allowed.  If argv[0] is NULL, we still pass a filename for argv[0]
to the underlying program but we no longer attempt to process any further
arguments.  Also rewrite the loop and get rid of the goto to make the code
more readable.

Suggested-by: Maxim Sobolev <sobomax@portaone.com>
15 years agogetblk() has an old crufty API in which the logical block size is not a
Matthew Dillon [Sat, 29 Jan 2005 19:17:06 +0000 (19:17 +0000)]
getblk() has an old crufty API in which the logical block size is not a
well known quantity.  Device drivers standardize on using DEV_BSIZE (512),
while file ops are supposed to use mount->mnt_stat.f_iosize.

The existing code was testing for a non-NULL vnode->v_mountedhere field
but this field is part of a union and only valid for VDIR types.  It was being
improperly tested on non-VDIR vnode types.  In particular, if vn_isdisk()
fails due to the disk device being ripped out from under a filesystem,
the code would fall through and try to use v_mountedhere, leading to a
crash.  It also makes no sense to use the target mount to calculate the
block size for the underlying mount point's vnode, so this test has been
removed entirely.  The vn_isdisk() test has been replaced with an explicit
VBLK/VCHR test.

Finally, note that filesystems like UFS use varying buffer cache buffer
sizes for different areas of the same block device (e.g. bitmap areas,
inode area, file data areas, superblock), which is why DEV_BSIZE is being
used here.  What really needs to happen is for b_blkno to be entirely
removed in favor of a 64 bit offset.

Crash-Reported-by: Vyacheslav Bocharov <list@smz.com.ua>
15 years agoDon't build sysctl as bootstrap tool. This helps us avoiding FreeBSD 4
Joerg Sonnenberger [Sat, 29 Jan 2005 13:51:57 +0000 (13:51 +0000)]
Don't build sysctl as bootstrap tool. This helps us avoiding FreeBSD 4
build problems.

Suggested-by: Chuck Tuffli <chuck_tuffli@agilent.com>
15 years agoWe don't currently build ld-elf as binary for i386 and even if
Joerg Sonnenberger [Sat, 29 Jan 2005 13:21:07 +0000 (13:21 +0000)]
We don't currently build ld-elf as binary for i386 and even if
we want to do that, we wouldn't care about FreeBSD 4.0 support.
Therefore no need to query kernel version here.

15 years agoFix the virtual 'status' file for procfs. The wrong length was being used,
Matthew Dillon [Sat, 29 Jan 2005 08:34:00 +0000 (08:34 +0000)]
Fix the virtual 'status' file for procfs.  The wrong length was being used,
returning a 0-length result every time.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
15 years agoDo not leave VCTTYISOPEN set if our attempt to open /dev/tty fails, otherwise
Matthew Dillon [Sat, 29 Jan 2005 05:48:17 +0000 (05:48 +0000)]
Do not leave VCTTYISOPEN set if our attempt to open /dev/tty fails, otherwise
we will close the controlling terminal on exit even though we didn't open it.

This case occurs when a jailed shell is created because /dev/tty cannot be
opened in that case.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
15 years ago- Replace confusing for loop with a do {} while (). Tested by making
Max Okumoto [Sat, 29 Jan 2005 00:30:42 +0000 (00:30 +0000)]
- Replace confusing for loop with a do {} while ().  Tested by making
  sure the object files were the same.

15 years ago- Cleanup Var_Subst() by removing duplicated code.
Max Okumoto [Fri, 28 Jan 2005 23:26:41 +0000 (23:26 +0000)]
- Cleanup Var_Subst() by removing duplicated code.

15 years ago- Factor out the duplicate code and move it into VarCreate() and VarDestroy().
Max Okumoto [Fri, 28 Jan 2005 23:25:18 +0000 (23:25 +0000)]
- Factor out the duplicate code and move it into VarCreate() and VarDestroy().

15 years agoScrap DEC Alpha support.
Sascha Wildner [Fri, 28 Jan 2005 21:08:38 +0000 (21:08 +0000)]
Scrap DEC Alpha support.

15 years agoRemove some old ioctls and structs which were there for backwards
Sascha Wildner [Fri, 28 Jan 2005 20:17:18 +0000 (20:17 +0000)]
Remove some old ioctls and structs which were there for backwards
compatibility with FreeBSD 3.x.

15 years agoAdd IOCTLS section and do some minor cleanup.
Sascha Wildner [Fri, 28 Jan 2005 19:12:11 +0000 (19:12 +0000)]
Add IOCTLS section and do some minor cleanup.

15 years agoMinor Patch
Liam J. Foy [Fri, 28 Jan 2005 16:53:38 +0000 (16:53 +0000)]
Minor Patch

- Fix data type
- Remove unnecessary header
- Instead of if..else.., just set as default behaviour

15 years agoClarify what new code should not cast unused
Max Okumoto [Fri, 28 Jan 2005 09:46:31 +0000 (09:46 +0000)]
Clarify what new code should not cast unused
return values of functions to void.

15 years ago- Fix indentation in VarFind()
Max Okumoto [Fri, 28 Jan 2005 06:00:34 +0000 (06:00 +0000)]
- Fix indentation in VarFind()

15 years agoremove bad semicolon
Joerg Sonnenberger [Thu, 27 Jan 2005 20:49:46 +0000 (20:49 +0000)]
remove bad semicolon

15 years agoANSIfication and minor style cleanups.
Joerg Sonnenberger [Thu, 27 Jan 2005 20:00:00 +0000 (20:00 +0000)]
ANSIfication and minor style cleanups.

15 years agoMount points use a special empty namecache entry to transition from one
Matthew Dillon [Thu, 27 Jan 2005 19:46:48 +0000 (19:46 +0000)]
Mount points use a special empty namecache entry to transition from one
filesystem to another.  It is possible for a stale entry to remain intact
from a prior mount so be sure the new entry is set to an unresolved state
so it is properly re-resolved on later access.

15 years agoTell the user more explicitly what port needs to be installed to get the
Matthew Dillon [Thu, 27 Jan 2005 19:42:32 +0000 (19:42 +0000)]
Tell the user more explicitly what port needs to be installed to get the
mkisofs utility required by the release build.

15 years agoAdjust FreeBSD tag to reflect sychronization.
Sascha Wildner [Thu, 27 Jan 2005 19:17:13 +0000 (19:17 +0000)]
Adjust FreeBSD tag to reflect sychronization.

15 years ago- Sync with FreeBSD.
Sascha Wildner [Thu, 27 Jan 2005 18:06:42 +0000 (18:06 +0000)]
- Sync with FreeBSD.
- Mention DragonFly where appropriate.
- Fix some punctuation.

Noticed-by: Heinrich Rebehn <rebehn@ant.uni-bremen.de>
            Freddie Cash <fcash-ml@sd73.bc.ca>

15 years ago- Add Buf_StripNewlines().
Max Okumoto [Thu, 27 Jan 2005 10:25:19 +0000 (10:25 +0000)]
- Add Buf_StripNewlines().
- Modified Cmd_Exec() to return a Buffer object instead of a 'char *', and
  updated all the callers.

15 years agoUse M_INTWAIT, not M_NOWAIT. We don't really support fast interrupt
Joerg Sonnenberger [Thu, 27 Jan 2005 02:43:12 +0000 (02:43 +0000)]
Use M_INTWAIT, not M_NOWAIT. We don't really support fast interrupt
block devices anyway.

15 years agoAdd a default for Perl 5.8.5 to override the default for
Joerg Sonnenberger [Thu, 27 Jan 2005 02:38:31 +0000 (02:38 +0000)]
Add a default for Perl 5.8.5 to override the default for
system perl.

15 years ago- New function Buf_AppendRange(), which is given a pointer to a string and
Max Okumoto [Thu, 27 Jan 2005 02:30:19 +0000 (02:30 +0000)]
- New function Buf_AppendRange(), which is given a pointer to a string and
  a pointer to the end of the range to append to the Buffer object.

tested by full build world.

15 years ago- New function Buf_Append(), which is given a pointer to a string to
Max Okumoto [Thu, 27 Jan 2005 02:28:48 +0000 (02:28 +0000)]
- New function Buf_Append(), which is given a pointer to a string to
  append to the Buffer object.

15 years ago- Inline silly ADDWORD() macro.
Max Okumoto [Thu, 27 Jan 2005 02:20:45 +0000 (02:20 +0000)]
- Inline silly ADDWORD() macro.

15 years ago- Rewrite Buffer object to maintain only write pointer. There is no
Max Okumoto [Thu, 27 Jan 2005 02:19:45 +0000 (02:19 +0000)]
- Rewrite Buffer object to maintain only write pointer.  There is no
  need to maintain both a write pointer and a length.

test by a full build world.

15 years agoUse and define size_t as specified by SUSv3.
Joerg Sonnenberger [Thu, 27 Jan 2005 01:50:01 +0000 (01:50 +0000)]
Use and define size_t as specified by SUSv3.

15 years agoCode cleanup. Refactor some functions. Push some globals into local scope.
Jeffrey Hsu [Wed, 26 Jan 2005 23:09:58 +0000 (23:09 +0000)]
Code cleanup.  Refactor some functions.  Push some globals into local scope.

15 years ago- Bring in patch to make.1 related to previous patch.
Max Okumoto [Wed, 26 Jan 2005 22:47:25 +0000 (22:47 +0000)]
- Bring in patch to make.1 related to previous patch.

taken-from: FreeBSD
author: harti

15 years agoExplicitly mention in RETURN VALUES that socket() sets
Sascha Wildner [Wed, 26 Jan 2005 21:52:36 +0000 (21:52 +0000)]
Explicitly mention in RETURN VALUES that socket() sets
errno upon failure.

Noticed-by: Liam J. Foy <liamfoy@sepulcrum.org>
15 years agoDon't build a new mbuf and bpf_mtap the old one.
Joerg Sonnenberger [Wed, 26 Jan 2005 16:15:06 +0000 (16:15 +0000)]
Don't build a new mbuf and bpf_mtap the old one.

15 years agoFix the quoting of MAKEFLAGS as noted in rev. 1.47.
Joerg Sonnenberger [Wed, 26 Jan 2005 09:44:21 +0000 (09:44 +0000)]
Fix the quoting of MAKEFLAGS as noted in rev. 1.47.
This still has a slight problem with trailing backslashes
on the comment line, but that will be documented in the man page.

Written-by: Harti Brandt, harti AT freebsd DOT org
15 years agoAdd some spaces for typographical correctness.
Joerg Sonnenberger [Wed, 26 Jan 2005 00:55:44 +0000 (00:55 +0000)]
Add some spaces for typographical correctness.

15 years ago- Add support for attaching alternative DLTs to an interface.
Joerg Sonnenberger [Wed, 26 Jan 2005 00:37:40 +0000 (00:37 +0000)]
- Add support for attaching alternative DLTs to an interface.
  The function is named bpfattach_dlt, FreeBSD used bpfattach2.
- Change bpf_mtap to take the bpf_if directly.
- Add support for BIOCSDLT and BIOCGDLT to recieve a list of DLTs
  available on an interface.

Obtained-from: FreeBSD

- Add bpf_ptap, which takes an mbuf and a header, builds a temporary
  mbuf chain and calls bpf_mtap on that.

Inspired-by: FreeBSD's bpf_mtap2
- Use the new interface for all drivers doing this by hand before.
- Include the formerly commented out support for radio headers in wi(4)
  and wlan(4).
- Change if_loop, i4b_ipr, disc and ic to prepend a uint32_t, not an int.

15 years agoRemove the _KERNEL parts.
Joerg Sonnenberger [Tue, 25 Jan 2005 23:09:42 +0000 (23:09 +0000)]
Remove the _KERNEL parts.

15 years agoRemove !_KERNEL parts.
Joerg Sonnenberger [Tue, 25 Jan 2005 22:58:42 +0000 (22:58 +0000)]
Remove !_KERNEL parts.

15 years agoFix a type in rev. 1.16
Joerg Sonnenberger [Tue, 25 Jan 2005 21:24:49 +0000 (21:24 +0000)]
Fix a type in rev. 1.16

15 years agoDisable hardware checksum support by default, it produces packet corruption.
Matthew Dillon [Tue, 25 Jan 2005 19:35:11 +0000 (19:35 +0000)]
Disable hardware checksum support by default, it produces packet corruption.
It is unclear why the corruption occurs, but certain fragmented packets
consistently reproduce it so there's a good chance that there may be alignment
or length requirements that we don't know about, or just pure hardware
brokedness with certain packets.

The checksumming can be turned on again with ifconfig for testing purposes.

 EXTRACTION from Aggelos's packet dumps ]

CLIENT:  (RE0)

11:43:27.261710 192.168.2.2.183764104 > 192.168.2.4.nfs: 1472 write [|nfs] (frag 8031:1480@0+)
11:43:27.261718 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@1480+)
11:43:27.261729 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@2960+)
11:43:27.261743 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@4440+)
11:43:27.261756 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@5920+)
11:43:27.261767 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@7400+)
11:43:27.261781 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@8880+)
11:43:27.261793 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@10360+)
11:43:27.261807 192.168.2.2 > 192.168.2.4: udp (frag 8031:4@11840)

SERVER:  (RL0)

13:56:59.783671 192.168.2.2.183764104 > 192.168.2.4.nfs: 1472 write [|nfs] (frag 8031:1480@0+)
13:56:59.783785 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@1480+)
13:56:59.783915 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@2960+)
13:56:59.784037 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@4440+)
13:56:59.784159 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@5920+)
13:56:59.784283 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@7400+)
13:56:59.784407 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@8880+)
13:56:59.784527 192.168.2.2 > 192.168.2.4: udp (frag 8031:1480@10360+)
13:56:59.784532 0.0.0.0 > 0.0.2.4: udp (frag 8031:4@11840)

Reported-by: aoiko@cc.ece.ntua.gr (Aggelos)
Note-Also: also turned off in FreeBSD /usr/src/sys/dev/re/if_re.c:1.37

15 years agoMostly switch to the patch framework. For cvs.1.patch, it's easier to do by
Joerg Sonnenberger [Tue, 25 Jan 2005 14:00:18 +0000 (14:00 +0000)]
Mostly switch to the patch framework. For cvs.1.patch, it's easier to do by
hand.

Add a patch to let CVS ignore the environment variable CVSREADONLYFS for
remote repositories.  This allows a user to make lock-operation the
default behaviour for local repositories without cludges for remote
support.

15 years ago- Add -v option (verbose). Taken from FreeBSD with my modifications.
Liam J. Foy [Mon, 24 Jan 2005 18:58:20 +0000 (18:58 +0000)]
- Add -v option (verbose). Taken from FreeBSD with my modifications.
- Remove unnecessary header (errno.h)
- Static functions
- Add new -v option to man page

15 years agoRepo-copy vinumparser.c and vinumutil.c from /usr/src/sys/dev/raid/vinum
Matthew Dillon [Mon, 24 Jan 2005 17:57:36 +0000 (17:57 +0000)]
Repo-copy vinumparser.c and vinumutil.c from /usr/src/sys/dev/raid/vinum
and clean up for userland compilation.

Requested-by: Joerg Sonnenberger <joerg@britannica.bec.de>
15 years agore-fix typo. Maybe its time to start drinking coffee in the morning. :-)
David Rhodus [Mon, 24 Jan 2005 15:38:30 +0000 (15:38 +0000)]
re-fix typo.  Maybe its time to start drinking coffee in the morning. :-)

15 years agoFix typo.
David Rhodus [Mon, 24 Jan 2005 15:06:07 +0000 (15:06 +0000)]
Fix typo.

Sent in by: Richard Bradshaw <theglassishalfempty@gmail.com>

15 years agoReverting all of today's changes.
Max Okumoto [Mon, 24 Jan 2005 09:38:01 +0000 (09:38 +0000)]
Reverting all of today's changes.

15 years ago- Cleanup field names in Buffer object, and add better comments.
Max Okumoto [Mon, 24 Jan 2005 06:43:00 +0000 (06:43 +0000)]
- Cleanup field names in Buffer object, and add better comments.

15 years ago- New function Buf_AppendRange(), which is given a pointer to a string and
Max Okumoto [Mon, 24 Jan 2005 05:13:58 +0000 (05:13 +0000)]
- New function Buf_AppendRange(), which is given a pointer to a string and
  a pointer to the end of the range to append to the Buffer object.

15 years ago- New function Buf_Append(), which is given a pointer to a string to
Max Okumoto [Mon, 24 Jan 2005 05:12:58 +0000 (05:12 +0000)]
- New function Buf_Append(), which is given a pointer to a string to
  append to the Buffer object.

15 years ago- Inline silly #define MACRO.
Max Okumoto [Mon, 24 Jan 2005 05:11:01 +0000 (05:11 +0000)]
- Inline silly #define MACRO.

15 years ago- Removed unnessisary append of '\0' to Buffer object. Buffer
Max Okumoto [Mon, 24 Jan 2005 05:09:30 +0000 (05:09 +0000)]
- Removed unnessisary append of '\0' to Buffer object.  Buffer
  already maintains a terminating null byte.

15 years ago- Rewrite Buffer object to maintain only write pointer. There is no
Max Okumoto [Mon, 24 Jan 2005 05:07:34 +0000 (05:07 +0000)]
- Rewrite Buffer object to maintain only write pointer.  There is no
  need to maintain both a write pointer and a length.

15 years agoUse BPF_TAP and BPF_MTAP instead of the expanded versions where possible.
Joerg Sonnenberger [Sun, 23 Jan 2005 20:23:22 +0000 (20:23 +0000)]
Use BPF_TAP and BPF_MTAP instead of the expanded versions where possible.

15 years agoGeneral clean up of lptcontrol. Similar to FreeBSD 1.15
Liam J. Foy [Sun, 23 Jan 2005 19:52:30 +0000 (19:52 +0000)]
General clean up of lptcontrol. Similar to FreeBSD 1.15
with my modifications:

- Remove many unnecessary headers and sort them
- Remove unused #define (PATH_LPCTL)
- Don't bother calling set_interrupt_status. Just call
  both open(2) and ioctl(2) in main.
- Remove modes in open(2)

15 years agoUse memchr(3) instead of a hand-rolled loop.
Chris Pressey [Sun, 23 Jan 2005 19:41:23 +0000 (19:41 +0000)]
Use memchr(3) instead of a hand-rolled loop.

Requested-by: joerg
15 years agoFix kerberos5 build by adding some headers files. These should be generated on
Eirik Nygaard [Sun, 23 Jan 2005 18:55:26 +0000 (18:55 +0000)]
Fix kerberos5 build by adding some headers files. These should be generated on
the fly, but the make depend step is acting up.

Reported by: joerg

15 years agoether_input already handles BPF and dropping of
Joerg Sonnenberger [Sun, 23 Jan 2005 18:50:50 +0000 (18:50 +0000)]
ether_input already handles BPF and dropping of
non-local packages, so stop doing this. Use BPF_MTAP instead of the
expanded version.

15 years agoReplace IPv6 related manual pages that may have violated
Hiroki Sato [Sun, 23 Jan 2005 17:03:13 +0000 (17:03 +0000)]
Replace IPv6 related manual pages that may have violated
the IETF's copyright.

Obtained from: KAME and OpenBSD (via FreeBSD)

15 years ago- Remove a duplicate unnecessary check on errno. strtol(3) will only ever set
Liam J. Foy [Sun, 23 Jan 2005 16:30:07 +0000 (16:30 +0000)]
- Remove a duplicate unnecessary check on errno. strtol(3) will only ever set
  errno to ERANGE which is already checked.

15 years agoRemove the support for lib/csu/${MACHINE_ARCH}-elf.
Joerg Sonnenberger [Sun, 23 Jan 2005 15:36:42 +0000 (15:36 +0000)]
Remove the support for lib/csu/${MACHINE_ARCH}-elf.
This should also prevent some people from shooting themselves with
partly cleaned sources.

15 years agoConsolidate ifqueue macros for the upcoming ALTQ work.
Joerg Sonnenberger [Sun, 23 Jan 2005 13:47:24 +0000 (13:47 +0000)]
Consolidate ifqueue macros for the upcoming ALTQ work.
We don't use ifqueue locking and don't intend to add it,
so the whole IF_LOCK / IF_UNLOCK compatibility with
FreeBSD 5 can just be removed. Similiar the "unlocked"
versions of IF_PREPEND, IF_DEQUEUE and IF_ENQUEUE
(with leading _) are replaced with the normal versions.
IF_QEMPTY from the i4b sources is added to iv_var.h for
symmetry with the ALTQ macros, but not yet used elsewhere.

15 years agoUse __DEQUALIFY, not only __DECONST to get rid of the volatile too.
Joerg Sonnenberger [Sun, 23 Jan 2005 13:26:37 +0000 (13:26 +0000)]
Use __DEQUALIFY, not only __DECONST to get rid of the volatile too.
This is safe for fuword (any interesting architecture has atomic
fetch instructions for integers) and the other uses doesn't touch
the memory at all.

15 years agoAdd forward declaration of struct vnode to fix compiler warning.
Joerg Sonnenberger [Sun, 23 Jan 2005 13:24:20 +0000 (13:24 +0000)]
Add forward declaration of struct vnode to fix compiler warning.

15 years agoAdjust calling convention for idp_input, idp_output and spp_input to match
Joerg Sonnenberger [Sun, 23 Jan 2005 13:21:44 +0000 (13:21 +0000)]
Adjust calling convention for idp_input, idp_output and spp_input to match
what the rest of the kernel uses in protosw.

15 years agoAdd missing 'by' in the license text of the man page.
Joerg Sonnenberger [Sun, 23 Jan 2005 13:06:13 +0000 (13:06 +0000)]
Add missing 'by' in the license text of the man page.
Hook seq(1) into the build process.

15 years agoNow that we generate the ethernet header in place in the mbuf instead
Jeffrey Hsu [Sun, 23 Jan 2005 06:41:55 +0000 (06:41 +0000)]
Now that we generate the ethernet header in place in the mbuf instead
of in a secondary buffer, we have to remove space for the old ethernet
header before we send a packet waiting for ARP resolution back to
ether_output() again.

15 years agoAdd a simple tool to generate a sequence of numbers, without all the
Joerg Sonnenberger [Sat, 22 Jan 2005 19:09:40 +0000 (19:09 +0000)]
Add a simple tool to generate a sequence of numbers, without all the
difficulty of jot. A very similiar tool is part of plan9 and GNU's
core-utilities.

Submitted-by: Brian Ginsbach <ginsbach@pressenter.com>
15 years agoNo longer used.
Eirik Nygaard [Sat, 22 Jan 2005 16:17:41 +0000 (16:17 +0000)]
No longer used.

15 years ago- Complete re-write of sasc.
Liam J. Foy [Sat, 22 Jan 2005 14:01:36 +0000 (14:01 +0000)]
- Complete re-write of sasc.

Ok'ed by: Joerg, and others.

15 years ago- put #ifdef around PrintAddr() proto type.
Max Okumoto [Sat, 22 Jan 2005 11:34:41 +0000 (11:34 +0000)]
- put #ifdef around PrintAddr() proto type.

15 years ago- We use vfork() so if execv fails we should use _exit().
Max Okumoto [Sat, 22 Jan 2005 11:28:03 +0000 (11:28 +0000)]
- We use vfork() so if execv fails we should use _exit().

15 years ago- Move PrintAddr() into only file that uses it.
Max Okumoto [Sat, 22 Jan 2005 11:14:30 +0000 (11:14 +0000)]
- Move PrintAddr() into only file that uses it.

- Put #ifdef around PrintAddr()

15 years agoMove libutil up above KERBEROS5 libs and remove the duplicate entry when
Eirik Nygaard [Fri, 21 Jan 2005 13:01:03 +0000 (13:01 +0000)]
Move libutil up above KERBEROS5 libs and remove the duplicate entry when
WITH_KERBEROS5 is defined during build.

15 years agoFrom FreeBSD:
Joerg Sonnenberger [Fri, 21 Jan 2005 11:09:40 +0000 (11:09 +0000)]
From FreeBSD:
MFC 1.98:
    Plug a mem leak in vinum_scandisk().

15 years agoThe vnode reclamation code contains a race whereby a blocking condition may
Matthew Dillon [Thu, 20 Jan 2005 18:08:54 +0000 (18:08 +0000)]
The vnode reclamation code contains a race whereby a blocking condition may
occur between the clearing of an inode's bitmap bit, the removal of the
inode from the hash table, and the reclamation of the related vnode.

This can cause a file create to block on the vnode undergoing reclamation
if it happens to select the same inode (a case which is more likely these
days due to dirpref).  To avoid the race, adjust UFS to *NOT* allocate
inode numbers which are still present in the inode hash table.

This race is NOT a bug, or at least it is not a known cause for existing bugs,
but both the standard vnode code and especially the softupdates code is
so complex that I am not taking any chances.  As of this commit both FreeBSD-4,
FreeBSD-5, and DragonFly are known to have rare 'dup alloc' and other
related filesystem/inode panics and this commit removes one variable from
that equation.

15 years agoReplace the cache-point linear search algorithm for VM map entries with
Matthew Dillon [Thu, 20 Jan 2005 18:00:38 +0000 (18:00 +0000)]
Replace the cache-point linear search algorithm for VM map entries with
a red-black tree.  This makes VM map lookups O(log N) in all cases.

Note that FreeBSD seems to have gone the splay-tree route, but I really
dislike the fact that splay trees are constantly writing to memory even
for simple lookups.  This would also limit our ability to implement a
separate hinting/caching mechanism.  A red-black tree is basically a
binary tree with internal nodes containing real data in addition to the leafs,
simlar to a B+Tree.  A red-black tree is very similar to a splay tree but it
does not attempt to modify the data structure for pure lookups.

Caveat: we tried to revive the map->hint mechanism but there is currently
a serious crash/lockup bug related to it so it is disabled in this commit.

Submitted-by: Eirik Nygaard <eirikn@kerneled.com>
Using-Red-Black-Macros-From: NetBSD (sys/tree.h)

15 years agoProperly vget() vnodes that the syncer intends to VOP_FSYNC(), rather then
Matthew Dillon [Thu, 20 Jan 2005 17:52:03 +0000 (17:52 +0000)]
Properly vget() vnodes that the syncer intends to VOP_FSYNC(), rather then
just locking the vnode.  The original FreeBSD code allowed a vnode to be
locked without being refd, but DragonFly requires that a vnode be ref'd
if it is going to be locked.  This fixes a rare panic that can occur when
the syncer is flushing a vnode that mainline code tries to access at the
same time.

This also brings the syncer inline with the filesystem sync code which has
been using normal vget()'s for several months now.

Reported-by: David Rhodus
15 years agoSort sections.
Max Okumoto [Thu, 20 Jan 2005 00:31:22 +0000 (00:31 +0000)]
Sort sections.

Taken-from: FreeBSD
Author: ru

15 years agoAdd a man page for this program.
Max Okumoto [Wed, 19 Jan 2005 21:58:04 +0000 (21:58 +0000)]
Add a man page for this program.

15 years agoWhitespace cleanup.
Eirik Nygaard [Wed, 19 Jan 2005 19:05:21 +0000 (19:05 +0000)]
Whitespace cleanup.

15 years agoChange lockcount->lockcountnb in an assertion.
Matthew Dillon [Wed, 19 Jan 2005 18:57:00 +0000 (18:57 +0000)]
Change lockcount->lockcountnb in an assertion.

Noticed-by: David Rhodus <sdrhodus@gmail.com>