dragonfly.git
9 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)

9 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
9 years agoSort sections.
Max Okumoto [Thu, 20 Jan 2005 00:31:22 +0000 (00:31 +0000)]
Sort sections.

Taken-from: FreeBSD
Author: ru

9 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.

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

9 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>
9 years agoKerberos no longer comes with it's own telnet. Always build the one in
Eirik Nygaard [Wed, 19 Jan 2005 18:22:53 +0000 (18:22 +0000)]
Kerberos no longer comes with it's own telnet. Always build the one in
src/usr.bin/

9 years agoKerberos no longer comes with it's own telnet, so always build the one in
Eirik Nygaard [Wed, 19 Jan 2005 18:20:47 +0000 (18:20 +0000)]
Kerberos no longer comes with it's own telnet, so always build the one in
src/usr.bin/

9 years agoANSI and whitespace cleanup. No operational changes.
David Rhodus [Wed, 19 Jan 2005 18:00:39 +0000 (18:00 +0000)]
ANSI and whitespace cleanup.  No operational changes.

9 years agoAdd some descriptive comments.
Matthew Dillon [Wed, 19 Jan 2005 17:41:20 +0000 (17:41 +0000)]
Add some descriptive comments.

9 years agoWhen a PCMCIA networking card is removed the IF code may free() the network
Matthew Dillon [Wed, 19 Jan 2005 17:30:54 +0000 (17:30 +0000)]
When a PCMCIA networking card is removed the IF code may free() the network
interface before processing has completed on pending packets, leaving a
dangling pointer in the mbuf and causing a crash.

The two solutions are to either ref-count the network interface on a
per-packet basis or to synchronize against consumers of the packet.
ref-counting is very expensive in an MP system so we have chosen to
synchronize against consumers by sending a NOP message to all protocol
processing threads and waiting for it to be replied.  This only occurs when
an interface is being brought down and is not expected to introduce any
performance issues.

Crash-Reported-by: Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
9 years agoRemove left-over.
Joerg Sonnenberger [Wed, 19 Jan 2005 11:51:46 +0000 (11:51 +0000)]
Remove left-over.

9 years agoTest commit.
Hiroki Sato [Tue, 18 Jan 2005 23:26:09 +0000 (23:26 +0000)]
Test commit.

9 years agoIgnore zero length mbuf in bus_dmamap_load_mbuf.
Joerg Sonnenberger [Tue, 18 Jan 2005 14:02:05 +0000 (14:02 +0000)]
Ignore zero length mbuf in bus_dmamap_load_mbuf.

Submitted-by: Andrew Atrens <atrens@nortelnetworks.com>
9 years agoUnlike printf(3), fwrite(3) doesn't stop at the first NUL character
Chris Pressey [Tue, 18 Jan 2005 03:13:52 +0000 (03:13 +0000)]
Unlike printf(3), fwrite(3) doesn't stop at the first NUL character
it finds in the string; and since the full length of the string was
being passed to fwrite(3), sysctl(8) commands were mistakenly
outputting a NUL character after their text output.

Fix by only fwrite(3)ing the string up to the first NUL character.

Discovered-by: y0netan1
9 years agoUse PCIB_ROUTE_INTERRUPT instead of PCI_ROUTE_INTERRUPT, the latter is
Joerg Sonnenberger [Mon, 17 Jan 2005 20:24:46 +0000 (20:24 +0000)]
Use PCIB_ROUTE_INTERRUPT instead of PCI_ROUTE_INTERRUPT, the latter is
long dead. Remove the declaration in pci_if.m to avoid future problems.

Spotted-by: corecode
9 years agoAvoid possible copyright problems and add the copyright of the
Joerg Sonnenberger [Mon, 17 Jan 2005 17:50:21 +0000 (17:50 +0000)]
Avoid possible copyright problems and add the copyright of the
original code and the third clause.

9 years agoRaise WARNS to 6.
Chris Pressey [Mon, 17 Jan 2005 07:27:45 +0000 (07:27 +0000)]
Raise WARNS to 6.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
9 years agoRaise WARNS to 6.
Chris Pressey [Mon, 17 Jan 2005 01:49:24 +0000 (01:49 +0000)]
Raise WARNS to 6.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
9 years agoRaise WARNS to 6:
Chris Pressey [Sun, 16 Jan 2005 21:40:42 +0000 (21:40 +0000)]
Raise WARNS to 6:
- Use parentheses in a logical condition to prevent ambiguous
  interpretation (by humans, who are imperfect C parsers.)  In doing
  so, simplify it:  x == 0 implies (x != 1 and x != 2).

9 years agoRaise WARNS to 6.
Chris Pressey [Sun, 16 Jan 2005 21:14:51 +0000 (21:14 +0000)]
Raise WARNS to 6.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
9 years agoWARNS=6. The __DECONST is save, because execv doesn't mess with the strings,
Joerg Sonnenberger [Sun, 16 Jan 2005 19:17:28 +0000 (19:17 +0000)]
WARNS=6. The __DECONST is save, because execv doesn't mess with the strings,
but can't be specified as such.

9 years agoSupport PORTDIRNAME and PKGORIGIN.
Joerg Sonnenberger [Sun, 16 Jan 2005 17:53:35 +0000 (17:53 +0000)]
Support PORTDIRNAME and PKGORIGIN.

9 years agoDon't print the override warning for package-name.
Joerg Sonnenberger [Sun, 16 Jan 2005 17:14:16 +0000 (17:14 +0000)]
Don't print the override warning for package-name.

Instead of trying to guess the PKGNAME, just ask the override port for it.
*Warning*: incorrectly written override ports (using bsd.port.mk) might
produce end-less loops.  The old behaviour didn't correctly handle
PORTSREVISION and PORTSEPOCH.  Also provide PKGFILE.

9 years agoUpdate the kerberos5 build framework to work with heimdal 0.6.3.
Eirik Nygaard [Sun, 16 Jan 2005 14:25:47 +0000 (14:25 +0000)]
Update the kerberos5 build framework to work with heimdal 0.6.3.

Based on: Kerberos5 build framework from FreeBSD.

9 years agoMerge from vendor branch HEIMDAL:
Eirik Nygaard [Sun, 16 Jan 2005 14:07:46 +0000 (14:07 +0000)]
Merge from vendor branch HEIMDAL:
Add heimdal-0.6.3

9 years agoAdd heimdal-0.6.3
Eirik Nygaard [Sun, 16 Jan 2005 14:07:46 +0000 (14:07 +0000)]
Add heimdal-0.6.3

9 years agoAdd directory /usr/include/kadm5.
Eirik Nygaard [Sun, 16 Jan 2005 13:31:24 +0000 (13:31 +0000)]
Add directory /usr/include/kadm5.

Submitted by: Richard Nyberg <rnyberg@it.su.se>

9 years agoFix type. It is pkgs and not pksgs.
Eirik Nygaard [Sun, 16 Jan 2005 11:18:16 +0000 (11:18 +0000)]
Fix type. It is pkgs and not pksgs.

9 years agoRaise WARNS to 6:
Chris Pressey [Sun, 16 Jan 2005 04:59:53 +0000 (04:59 +0000)]
Raise WARNS to 6:
- Keep const parameters const while casting.

9 years agoRaise WARNS to 6.
Chris Pressey [Sun, 16 Jan 2005 04:28:00 +0000 (04:28 +0000)]
Raise WARNS to 6.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
9 years agoRaise WARNS to 6:
Chris Pressey [Sat, 15 Jan 2005 08:36:25 +0000 (08:36 +0000)]
Raise WARNS to 6:
- Constify a string constant;
- Compare a pointer with NULL, not zero.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
9 years agofalloc() was not returning an error code on failure.
Matthew Dillon [Fri, 14 Jan 2005 19:28:10 +0000 (19:28 +0000)]
falloc() was not returning an error code on failure.

Reported-by: David Rhodus <sdrhodus@gmail.com>
9 years agoBack out part of rev 1.24. The intention the quoting backfires and bad
Joerg Sonnenberger [Fri, 14 Jan 2005 11:30:16 +0000 (11:30 +0000)]
Back out part of rev 1.24. The intention the quoting backfires and bad
quoting is generated. Running 'make all-depends-list' in x11-fonts/libXft
does something like this:
PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig /usr/ports/devel/pkgconfig
/usr/ports/print/freetype2 /usr/ports/devel/gmake /usr/ports/converters/libiconv
/usr/ports/devel/gettext
/usr/ports/devel/libtool13
/usr/ports/devel/libtool15
/usr/ports/textproc/expat2

After quoting this becomes:
PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig\ /usr/ports/devel/pkgconfi
g\
/usr/ports/print/freetype2\ /usr/ports/devel/gmake\ /usr/ports/converters/libico
nv\
/usr/ports/devel/gettext\
/usr/ports/devel/libtool13\
/usr/ports/devel/libtool15\
/usr/ports/textproc/expat2\

The next make tries to do this, the following happens:
before: PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig /usr/ports/devel/pkgconfi
g\
after: PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig\ /usr/ports/devel/pkgconfi
g\\
and the final \\ confuses the shell.

Thanks to asmodai for suggesting a make problem as source.

9 years agoInstead of messing around with sprintf, use asprintf to do the allocation
Joerg Sonnenberger [Fri, 14 Jan 2005 07:14:15 +0000 (07:14 +0000)]
Instead of messing around with sprintf, use asprintf to do the allocation
for us. Don't read before the start of the string, if "" is passed in.

9 years agostrl* conversion.
Joerg Sonnenberger [Fri, 14 Jan 2005 07:03:59 +0000 (07:03 +0000)]
strl* conversion.

Original-patch-by: Andre Nathan <andre@digirati.com.br>
9 years agoReplace temporary allocation from alloca with malloc/free.
Joerg Sonnenberger [Fri, 14 Jan 2005 06:51:38 +0000 (06:51 +0000)]
Replace temporary allocation from alloca with malloc/free.

Requested-by: dillon
9 years agoRaise WARNS to 6:
Chris Pressey [Fri, 14 Jan 2005 06:38:41 +0000 (06:38 +0000)]
Raise WARNS to 6:
- Use a full array initializer element;
- Fix signedness issues.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
9 years agoRaise WARNS to 6.
Chris Pressey [Fri, 14 Jan 2005 06:02:45 +0000 (06:02 +0000)]
Raise WARNS to 6.

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_dom>
9 years agoFix typo in error message.
Chris Pressey [Fri, 14 Jan 2005 06:00:04 +0000 (06:00 +0000)]
Fix typo in error message.

Submitted-by: Roland Hammerle <rjh_at_who_dot_net>
9 years agoTesting auth forwarding. Me am idiot!
Justin C. Sherrill [Fri, 14 Jan 2005 05:08:17 +0000 (05:08 +0000)]
Testing auth forwarding.  Me am idiot!

9 years agoMinor correction in umtx_*() calls, the mutex pointer should point to
Matthew Dillon [Fri, 14 Jan 2005 04:21:16 +0000 (04:21 +0000)]
Minor correction in umtx_*() calls, the mutex pointer should point to
volatile store.  Also correct the type, we are expecting to point to an
integer.

9 years agoMinor correction in umtx_*() calls, the mutex pointer should point to
Matthew Dillon [Fri, 14 Jan 2005 04:19:55 +0000 (04:19 +0000)]
Minor correction in umtx_*() calls, the mutex pointer should point to
volatile store.

9 years agoAdd umtx.c, a simple utility which implements userland mutexes using
Matthew Dillon [Fri, 14 Jan 2005 04:15:12 +0000 (04:15 +0000)]
Add umtx.c, a simple utility which implements userland mutexes using
the new umtx_*() system calls.  Compile normally and play around, e.g.:

umtx -v -t 10 /tmp/lock.dat sleep 5
umtx -v -t 10 /tmp/lock.dat ls

The test code includes some simple ^C cleanup code as well, though I
don't block signals during the global variable fixup so there is a race in
the ^C cleanup code.

9 years agoAdd missing kern_umtx.c to sys/conf/files.
Matthew Dillon [Fri, 14 Jan 2005 03:25:31 +0000 (03:25 +0000)]
Add missing kern_umtx.c to sys/conf/files.

Noticed-by: David Rhodus
9 years agoDon't remove /usr/bin/perl if it's a symlink, which was probably
YONETANI Tomokazu [Fri, 14 Jan 2005 03:13:51 +0000 (03:13 +0000)]
Don't remove /usr/bin/perl if it's a symlink, which was probably
created by `use.perl port'.

Ok'ed-by: David Rhodus

9 years agoInitial part of DEVICE_POLLING support for wi(4). Still some rough edges,
Joerg Sonnenberger [Fri, 14 Jan 2005 02:35:09 +0000 (02:35 +0000)]
Initial part of DEVICE_POLLING support for wi(4). Still some rough edges,
e.g. occasional timeouts, but working otherwise.

9 years agoInitial jail support for varsyms.
Joerg Sonnenberger [Fri, 14 Jan 2005 02:25:08 +0000 (02:25 +0000)]
Initial jail support for varsyms.

9 years agoAdd syscall primitives for generic userland accessible sleep/wakeup
Matthew Dillon [Fri, 14 Jan 2005 02:20:27 +0000 (02:20 +0000)]
Add syscall primitives for generic userland accessible sleep/wakeup
functions.  These functions are capable of sleeping and waking up based on
a generic user VM address.  Programs capable of sharing memory are also
capable of interaction through these functions.

Also regenerate our system calls.

umtx_sleep(ptr, matchvalue, timeout)

    If *(int *)ptr (userland pointer) does not match the matchvalue,
    sleep for timeout microseconds.  Access to the contents of *ptr plus
    entering the sleep is interlocked against calls to umtx_wakeup().
    Various error codes are turned depending on what causes the function
    to return.  Note that the timeout may not exceed 1 second.

utmx_wakeup(ptr, count)

    Wakeup at least count processes waiting on the specified userland
    address.  A count of 0 wakes all waiting processes up.  This function
    interlocks against umtx_sleep().

The typical race case showing resolution between two userland processes is
shown below.  A process releasing a contested mutex may adjust the contents
of the pointer after the kernel has tested *ptr in umtx_sleep(), but this does
not matter because the first process will see that the mutex is set to a
contested state and will call wakeup after changing the contents of the
pointer.  Thus, the kernel itself does not have to execute any
compare-and-exchange operations in order to support userland mutexes.

    PROCESS 1 PROCESS 2 ******** RACE#1 ******

    cmp_exg(ptr, FREE, HELD)
. cmp_exg(ptr, HELD, CONTESTED)
. umtx_sleep(ptr, CONTESTED, 0)
. [kernel tests *ptr]     <<<< COMPARE vs
    cmp_exg(CONTESTED, FREE) . <<<< CHANGE
. tsleep(....)
    umtx_wakeup(ptr, 1) .
. .
. .

    PROCESS 1 PROCESS 2 ******** RACE#2 ******

    cmp_exg(ptr, FREE, HELD)
cmp_exg(ptr, HELD, CONTESTED)
umtx_sleep(ptr, CONTESTED, 0)
    cmp_exg(CONTESTED, FREE) <<<< CHANGE vs
    umtx_wakeup(ptr, 1)
[kernel tests *ptr] <<<< COMPARE
[MISMATCH, DO NOT TSLEEP]

These functions are very loosely based on Jeff Roberson's umtx work in
FreeBSD.  These functions are greatly simplified relative to that work in
order to provide a more generic mechanism.

This is precursor work for a port of David Xu's 1:1 userland threading
library.

9 years agoRemove the old system perl binary when performing 'make upgrade'.
David Rhodus [Thu, 13 Jan 2005 23:29:40 +0000 (23:29 +0000)]
Remove the old system perl binary when performing 'make upgrade'.

This fixes several problems such a 'make index' which traversed the PATH
and would use the old system perl.

9 years agoFollowup note last commit: FreeBSD PR/66242, FreeBSD/1.68 originally
Matthew Dillon [Thu, 13 Jan 2005 23:20:07 +0000 (23:20 +0000)]
Followup note last commit: FreeBSD PR/66242, FreeBSD/1.68 originally
submitted by Dmitry Sivachenko.

9 years agoDo not early terminate if ^C is hit just as a valid job is returned by
Matthew Dillon [Thu, 13 Jan 2005 23:17:17 +0000 (23:17 +0000)]
Do not early terminate if ^C is hit just as a valid job is returned by
wait*(), otherwise the job termination will not be properly recorded.

9 years agoproc0 is still used by e.g. smbfs to fork off a kernel thread and certain
Matthew Dillon [Thu, 13 Jan 2005 23:10:11 +0000 (23:10 +0000)]
proc0 is still used by e.g. smbfs to fork off a kernel thread and certain
namecache records may be NULL.  Handle the case.

9 years agoOops, undo accidental commit. The last commit was not related to the
Matthew Dillon [Thu, 13 Jan 2005 23:08:03 +0000 (23:08 +0000)]
Oops, undo accidental commit.  The last commit was not related to the
datagram reconnection bug for these particular files.

9 years agowx(4) is gone. Also remove the module itself.
Sascha Wildner [Thu, 13 Jan 2005 23:06:05 +0000 (23:06 +0000)]
wx(4) is gone. Also remove the module itself.

9 years agoWhen re-connecting an already connected datagram socket be sure to clean
Matthew Dillon [Thu, 13 Jan 2005 23:05:32 +0000 (23:05 +0000)]
When re-connecting an already connected datagram socket be sure to clean
up its pending error state, which may be set in some rare conditions
resulting in the connect() syscall returning a bogus error and making
application believe that the attempt to change association has failed,
when in fact it has succeeded.

Submitted-by: Maxim Sobolev <sobomax@FreeBSD.org>
Taken-from: FreeBSD/1.225 (Maxim Sobolev)

9 years agontpdate(8) is gone and has been replaced by rdate(8).
Sascha Wildner [Thu, 13 Jan 2005 22:24:59 +0000 (22:24 +0000)]
ntpdate(8) is gone and has been replaced by rdate(8).

9 years agoWARNS6 clean.
Max Okumoto [Thu, 13 Jan 2005 18:57:56 +0000 (18:57 +0000)]
WARNS6 clean.

Changes:
- removed the (void) cast of functions that don't use a
  return value;
- the envtmp declaration moved into extern.h;
- type of some pointers to constant string changed from
  'char *' to 'char const *';

9 years agoFix -iostat feature by properly calculating the divisor in stat1().
YONETANI Tomokazu [Thu, 13 Jan 2005 12:45:39 +0000 (12:45 +0000)]
Fix -iostat feature by properly calculating the divisor in stat1().
Also add a safeguard in histogram() in case a negative value is given
as the first argument(probably very rare now that our cp_time[] are
64-bit values).

9 years agoAdd SC_PIXEL_MODE because it's nice to have higher console resolutions
Sascha Wildner [Wed, 12 Jan 2005 20:20:21 +0000 (20:20 +0000)]
Add SC_PIXEL_MODE because it's nice to have higher console resolutions
available immediately (think of the live CD). The vesa module still
has to be kldloaded separately since it does video bios calls upon
initialization and these might still cause timer problems.

9 years agoAdd "proc" command.
Joerg Sonnenberger [Wed, 12 Jan 2005 13:16:51 +0000 (13:16 +0000)]
Add "proc" command.

9 years agoDon't include the kvm backend, it's not really working anyway.
Joerg Sonnenberger [Wed, 12 Jan 2005 11:24:24 +0000 (11:24 +0000)]
Don't include the kvm backend, it's not really working anyway.
Rename the kcore backend to kgdb. Adjust a bunch of function names
for consistence.

9 years agoInstead of explicitly initializing "fp" to NULL in kern_sendfile(),
Jeffrey Hsu [Wed, 12 Jan 2005 08:08:09 +0000 (08:08 +0000)]
Instead of explicitly initializing "fp" to NULL in kern_sendfile(),
fix holdsock() so it correctly always initializes "fp" or NULLs it.

Approved by: Joerg Sonnenberger <joerg@dragonflybsd.org>

9 years agoExplicitly initialize fp to NULL. If sendfile is called on a non-socket,
Joerg Sonnenberger [Wed, 12 Jan 2005 06:23:18 +0000 (06:23 +0000)]
Explicitly initialize fp to NULL. If sendfile is called on a non-socket,
holdsock is a nop and the fdrop must not be called.

9 years agoRIP acpica-unix-20031203.
Joerg Sonnenberger [Wed, 12 Jan 2005 05:56:07 +0000 (05:56 +0000)]
RIP acpica-unix-20031203.

9 years agomkdep(1) seems to want the current directory on the include path,
Chris Pressey [Wed, 12 Jan 2005 04:03:46 +0000 (04:03 +0000)]
mkdep(1) seems to want the current directory on the include path,
so reinstate it in the Makefile.

Reported-by: drhodus
9 years agoNow that we have dhcpd and dhcrelay in base, fix the inherited rcNG scripts
Joerg Sonnenberger [Wed, 12 Jan 2005 02:32:15 +0000 (02:32 +0000)]
Now that we have dhcpd and dhcrelay in base, fix the inherited rcNG scripts
and install them.

9 years agoRaise WARNS to 6:
Chris Pressey [Wed, 12 Jan 2005 01:36:50 +0000 (01:36 +0000)]
Raise WARNS to 6:
- Initialize a variable that GCC can't tell will never be used
  uninitialized.

9 years agoRaise WARNS to 6:
Chris Pressey [Wed, 12 Jan 2005 01:20:26 +0000 (01:20 +0000)]
Raise WARNS to 6:
- Use a fully-specified NULL-filled entry to terminate an array
  initializer;
- Remove an inner-block redeclaration of a variable with the same
  name and purpose as the local in the outer block.

9 years agoRaise WARNS to 6.
Chris Pressey [Wed, 12 Jan 2005 01:17:54 +0000 (01:17 +0000)]
Raise WARNS to 6.

Advised-by: joerg
9 years agoReduce warnings when compiled under WARNS=6:
Chris Pressey [Wed, 12 Jan 2005 00:26:03 +0000 (00:26 +0000)]
Reduce warnings when compiled under WARNS=6:
- Constify many char *'s;
- Rename a local variable;
- Initialize an option list element using strdup (as is done elsewhere)
  instead of directly assigning a string constant to it.

9 years agoCorrectly reset place in getopt_long_only the next time it is used.
Joerg Sonnenberger [Wed, 12 Jan 2005 00:08:13 +0000 (00:08 +0000)]
Correctly reset place in getopt_long_only the next time it is used.
Remove unused retval in getopt wrapper.

9 years agoRaise WARNS to 3:
Chris Pressey [Wed, 12 Jan 2005 00:03:40 +0000 (00:03 +0000)]
Raise WARNS to 3:
- Make an int variable unsigned;
- Use WARNS level instead of hand-specifying warning flags;
- Remove unneeded -I. -I${.CURDIR} from CFLAGS in Makefile.

9 years agoRaise WARNS to 6:
Chris Pressey [Tue, 11 Jan 2005 23:58:55 +0000 (23:58 +0000)]
Raise WARNS to 6:
- Constify several char *'s.
- Mark unused parameters as __unused.
- Rename local variables.
- Format function prototypes and remove parameter names.
- Expand a macro that was only used twice (on the same
  parameter) into a real variable to eliminate signed
  versus unsigned comparison warning [1].

Submitted-by: Larry Lansing <lansil_at_fuzzynerd_dot_com>
Additional-work-by: cpressey [1]
9 years agoDon't write the name of the sysctl to a temporary variable and truncate
Joerg Sonnenberger [Tue, 11 Jan 2005 23:36:39 +0000 (23:36 +0000)]
Don't write the name of the sysctl to a temporary variable and truncate
it on the '=' there. If the argument is actually longer than the buffer,
this would result in a NULL reference. Instead, allocate the necessary
buffer with alloca and copy the name part.

Discovered-by: Suleiman Souhlal <ssouhlal@FreeBSD.org>
9 years agounknown_incoming may be customized so we only install it if it doesn't
Sascha Wildner [Tue, 11 Jan 2005 23:01:31 +0000 (23:01 +0000)]
unknown_incoming may be customized so we only install it if it doesn't
already exist.

Noticed-by: Joerg Anslik <joerg@anslik.de>
9 years ago- Add WARNS?=6 and $DragonFly$ to Makefile.
Max Okumoto [Tue, 11 Jan 2005 22:20:52 +0000 (22:20 +0000)]
- Add WARNS?=6 and $DragonFly$ to Makefile.

9 years ago- Add back marco that joerg added that I deleted, because I thought
Max Okumoto [Tue, 11 Jan 2005 21:27:13 +0000 (21:27 +0000)]
- Add back marco that joerg added that I deleted, because I thought
  I added it by accident. :-)

9 years agoScheduled mdoc(7) sweep.
Max Okumoto [Tue, 11 Jan 2005 21:21:09 +0000 (21:21 +0000)]
Scheduled mdoc(7) sweep.

Taken-from: FreeBSD
Author: ru

9 years ago- Clean up wc (remove (void) etc)
Liam J. Foy [Tue, 11 Jan 2005 20:03:11 +0000 (20:03 +0000)]
- Clean up wc (remove (void) etc)
- Remove unnecessary cast
- Add WARNS 6

Submitted by: Alexander 'alxl' Lobachov <alxl@alxl.info>

9 years agoAdd some documentation for ntpd_flags.
Sascha Wildner [Tue, 11 Jan 2005 20:01:07 +0000 (20:01 +0000)]
Add some documentation for ntpd_flags.

9 years ago- Remove unnecessary headers
Liam J. Foy [Tue, 11 Jan 2005 19:36:09 +0000 (19:36 +0000)]
- Remove unnecessary headers
- Remove main proto
- Constify
- Add WARNS 6
- Minor cleans

9 years agontpdate(8) is gone and has been replaced by rdate(8).
Sascha Wildner [Tue, 11 Jan 2005 19:14:58 +0000 (19:14 +0000)]
ntpdate(8) is gone and has been replaced by rdate(8).

9 years agoAdd default if_re_load line.
Joerg Sonnenberger [Tue, 11 Jan 2005 18:29:38 +0000 (18:29 +0000)]
Add default if_re_load line.

9 years agotypo
Joerg Sonnenberger [Tue, 11 Jan 2005 15:03:48 +0000 (15:03 +0000)]
typo

9 years agoAdd gmp handling to upgrade_etc.
Joerg Sonnenberger [Tue, 11 Jan 2005 14:44:15 +0000 (14:44 +0000)]
Add gmp handling to upgrade_etc.

9 years agoRemove LIBGMP and LIBMP.
Joerg Sonnenberger [Tue, 11 Jan 2005 14:36:49 +0000 (14:36 +0000)]
Remove LIBGMP and LIBMP.

9 years agoDeorbit libgmp.
Joerg Sonnenberger [Tue, 11 Jan 2005 14:36:02 +0000 (14:36 +0000)]
Deorbit libgmp.

9 years agoConvert to keyserv, telnetd and telnet to libcrypto's BIGNUM
Joerg Sonnenberger [Tue, 11 Jan 2005 13:22:41 +0000 (13:22 +0000)]
Convert to keyserv, telnetd and telnet to libcrypto's BIGNUM
implementatation.

9 years agoRemove another Perl left over.
Joerg Sonnenberger [Tue, 11 Jan 2005 13:12:32 +0000 (13:12 +0000)]
Remove another Perl left over.

Submitted-by: Chris Pressey <cpressey@catseye.mine.nu>
9 years agoRemove some debugging printfs. Fix an error message.
Joerg Sonnenberger [Tue, 11 Jan 2005 13:08:35 +0000 (13:08 +0000)]
Remove some debugging printfs. Fix an error message.

9 years ago- Swap location of Buf_Expand() function.
Max Okumoto [Tue, 11 Jan 2005 05:51:46 +0000 (05:51 +0000)]
- Swap location of Buf_Expand() function.

9 years ago- Pass NULL as 2nd param to Buf_GetAll(buf, &len), the callers don't need
Max Okumoto [Tue, 11 Jan 2005 05:13:33 +0000 (05:13 +0000)]
- Pass NULL as 2nd param to Buf_GetAll(buf, &len), the callers don't need
  that info.

9 years agoAdd forgotten cast back. This code depends on BASE being short and
Joerg Sonnenberger [Tue, 11 Jan 2005 01:08:06 +0000 (01:08 +0000)]
Add forgotten cast back. This code depends on BASE being short and
signed.

9 years agoSwitch chkey/newkey to use libcrypto instead of libmp for the internal
Joerg Sonnenberger [Tue, 11 Jan 2005 00:58:23 +0000 (00:58 +0000)]
Switch chkey/newkey to use libcrypto instead of libmp for the internal
PK generation.

Submitted-by: Dmitri Nikulin <setagllib@optusnet.com.au>
Additional cleanups and bugfixes by myself.

9 years agoWARNS=6 cleaness.
Joerg Sonnenberger [Tue, 11 Jan 2005 00:51:11 +0000 (00:51 +0000)]
WARNS=6 cleaness.

9 years ago- Inline Buf_OvAddByte() since it is only used in one place.
Max Okumoto [Tue, 11 Jan 2005 00:30:22 +0000 (00:30 +0000)]
- Inline Buf_OvAddByte() since it is only used in one place.

9 years agoMake newkey WARNS=6 clean.
Joerg Sonnenberger [Tue, 11 Jan 2005 00:29:12 +0000 (00:29 +0000)]
Make newkey WARNS=6 clean.

9 years agoMark OpenSSL 0.9.7d as dead.
Joerg Sonnenberger [Mon, 10 Jan 2005 22:36:43 +0000 (22:36 +0000)]
Mark OpenSSL 0.9.7d as dead.

9 years agoAdd splitpatch.
Joerg Sonnenberger [Mon, 10 Jan 2005 22:20:27 +0000 (22:20 +0000)]
Add splitpatch.