dragonfly.git
19 years agoDo a cleanup pass on the mbuf allocator. Reorder the mmbfree cache tests
Matthew Dillon [Thu, 18 Nov 2004 01:42:26 +0000 (01:42 +0000)]
Do a cleanup pass on the mbuf allocator.  Reorder the mmbfree cache tests
to improve the critical path.  Use critical sections instead of spls for
protection.

19 years agoRemove unused junk from the slab allocator.
Matthew Dillon [Wed, 17 Nov 2004 23:36:21 +0000 (23:36 +0000)]
Remove unused junk from the slab allocator.

Remove M_FAILSAFE and M_INTALLOC.  M_FAILSAFE was a double check for
interrupt-time allocations but using it was problematic at best and as
a consequence it was never used.  M_INTALLOC was a macro that used
M_FAILSAFE and was also never used.  The standard M_ flags for interrupt
time allocations are M_INTNOWAIT and M_INTWAIT.

19 years agoProperly propagate the FIN flag from the following to-be-coalesced segment.
Jeffrey Hsu [Wed, 17 Nov 2004 21:50:46 +0000 (21:50 +0000)]
Properly propagate the FIN flag from the following to-be-coalesced segment.

Questionable use of logical AND caught by: Matt Dillon

19 years agoNormally we want to warn if the local IP address is used by a different
Joerg Sonnenberger [Wed, 17 Nov 2004 21:04:05 +0000 (21:04 +0000)]
Normally we want to warn if the local IP address is used by a different
host. This isn't useful for 0.0.0.0, because it is used by dhclient
when no address is known.

19 years agoFix bug with wrong length being used when coalescing out-of-order segments.
Jeffrey Hsu [Wed, 17 Nov 2004 20:51:16 +0000 (20:51 +0000)]
Fix bug with wrong length being used when coalescing out-of-order segments.

19 years agoFollow NOFSCHG if defined. (It's needed to be able to run make installworld
Matthew Dillon [Wed, 17 Nov 2004 19:16:12 +0000 (19:16 +0000)]
Follow NOFSCHG if defined.  (It's needed to be able to run make installworld
in a jail, in FreeBSD 5).

Submitted-by: Suleiman Souhlal <ssouhlal@FreeBSD.org>
19 years agoCave in and remove NULL checks for M_WAITOK mallocs. DragonFly's M_WAITOK
Matthew Dillon [Wed, 17 Nov 2004 18:59:21 +0000 (18:59 +0000)]
Cave in and remove NULL checks for M_WAITOK mallocs.  DragonFly's M_WAITOK
malloc will panic rather then return NULL, unless M_NULLOK is also specified,
so we don't actually have to check for NULL most of the time.

Submitted-by: Andrew Atrens <atrens@nortelnetworks.com>
19 years agoFix a bug in the checking of malloc()'s return value. It turns out to have
Matthew Dillon [Wed, 17 Nov 2004 18:27:17 +0000 (18:27 +0000)]
Fix a bug in the checking of malloc()'s return value.  It turns out to have
been masked by the fact that M_WAITOK does not return NULL anyway.

Submitted-by: Andrew Atrens <atrens@nortelnetworks.com>
19 years agoUse the YACC source for c-exp.y and f-exp.y, not the pre-built
Joerg Sonnenberger [Wed, 17 Nov 2004 12:27:59 +0000 (12:27 +0000)]
Use the YACC source for c-exp.y and f-exp.y, not the pre-built
BISON parse. This solves the *very* strange build problem with
-jX in buildworld, where make tries to build this files from
source using the default rules. Those rules are not save for
parallel builds.

19 years agoAlways use the width field from the varent, not the original width.
Joerg Sonnenberger [Wed, 17 Nov 2004 10:09:44 +0000 (10:09 +0000)]
Always use the width field from the varent, not the original width.
This fixes the output of oversized fields messing the overall table
layout.

Reported-by: Peter Avalos <pavalos@theshell.com>
19 years agoTemporarily change the net.inet.tcp.sack default from 1 to 0 after confirmed
Matthew Dillon [Wed, 17 Nov 2004 02:18:17 +0000 (02:18 +0000)]
Temporarily change the net.inet.tcp.sack default from 1 to 0 after confirmed
reports of file corruption in downloads.  This will be changed back to 1
after we figure out and fix the issue.

Corrupted-downloads-reported-by: walt <wa1ter@myrealbox.com>
19 years agoReplace spkrtest script with a shell version.
Joerg Sonnenberger [Tue, 16 Nov 2004 22:21:15 +0000 (22:21 +0000)]
Replace spkrtest script with a shell version.

Obtained-from: FreeBSD

19 years agoDon't install the undocumented scriptdump Perl script.
Joerg Sonnenberger [Tue, 16 Nov 2004 22:04:37 +0000 (22:04 +0000)]
Don't install the undocumented scriptdump Perl script.

19 years agoOverride USE_GCC=3.4, we want to use our system compiler in that case.
Joerg Sonnenberger [Tue, 16 Nov 2004 20:09:26 +0000 (20:09 +0000)]
Override USE_GCC=3.4, we want to use our system compiler in that case.

19 years ago- Use the correct error functions
Liam J. Foy [Tue, 16 Nov 2004 19:06:29 +0000 (19:06 +0000)]
- Use the correct error functions
- Use the correct function to close the client

19 years ago- Set the clnt error functions 's' argument to const char *
Liam J. Foy [Tue, 16 Nov 2004 18:55:45 +0000 (18:55 +0000)]
- Set the clnt error functions 's' argument to const char *
- Update rpc.3

19 years ago- Set the clnt error functions protos from char * -> const char *
Liam J. Foy [Tue, 16 Nov 2004 18:55:04 +0000 (18:55 +0000)]
- Set the clnt error functions protos from char * -> const char *

19 years agoDo not overwrite z*grep commands with shell wrappers in this directory.
YONETANI Tomokazu [Tue, 16 Nov 2004 16:54:57 +0000 (16:54 +0000)]
Do not overwrite z*grep commands with shell wrappers in this directory.
These z*grep shell wrappers rely on `--label' option when they deal with
multiple files, and our version of grep doesn't have that option.

19 years agoMove away from GNU traceroute and use the BSD licensed one.
Eirik Nygaard [Tue, 16 Nov 2004 14:49:54 +0000 (14:49 +0000)]
Move away from GNU traceroute and use the BSD licensed one.

19 years agoFix traceroute.
Eirik Nygaard [Tue, 16 Nov 2004 14:36:01 +0000 (14:36 +0000)]
Fix traceroute.
sendto() to a inet socket wants wants ip->ip_len to be in host order, not
network order.

Submitted by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>

19 years agoFix a bug in parsefmt where a string still referenced would be freed.
Joerg Sonnenberger [Tue, 16 Nov 2004 12:38:04 +0000 (12:38 +0000)]
Fix a bug in parsefmt where a string still referenced would be freed.

Submitted-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Slightly modified from the original version.

19 years ago- use STAILQ, instead of hand grown implementation
Joerg Sonnenberger [Tue, 16 Nov 2004 12:16:36 +0000 (12:16 +0000)]
- use STAILQ, instead of hand grown implementation
- split VARENT/VAR into varent with a const point to var and header, width
  and dwidth as modifiable fields
- change users of most VARENT fields to use the modifiable fields
- make VAR[] var static const now
- remove dwidth field from VAR, not needed now
- while changing prototypes anyway, remove the unneeded space before the
  argument list

19 years agoWARNS= 6 cleanup.
Eirik Nygaard [Mon, 15 Nov 2004 19:57:35 +0000 (19:57 +0000)]
WARNS= 6 cleanup.

19 years agoAdd some more hacks for dfport handling, to allow make index to mostly
Joerg Sonnenberger [Mon, 15 Nov 2004 14:29:00 +0000 (14:29 +0000)]
Add some more hacks for dfport handling, to allow make index to mostly
work.

19 years agoBack out constification. This caused a SIGBUS becaus a functon wanted to write
Eirik Nygaard [Mon, 15 Nov 2004 14:04:33 +0000 (14:04 +0000)]
Back out constification. This caused a SIGBUS becaus a functon wanted to write
to the var struct.

Noticed by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>

19 years agoCleanup send-pr and ptx on next update.
Joerg Sonnenberger [Mon, 15 Nov 2004 10:19:07 +0000 (10:19 +0000)]
Cleanup send-pr and ptx on next update.

19 years agoRemove the old release infrastruture. Certain parts e.g. sysinstall or
Joerg Sonnenberger [Mon, 15 Nov 2004 10:18:15 +0000 (10:18 +0000)]
Remove the old release infrastruture. Certain parts e.g. sysinstall or
the picobsd stuff should be kept for future reference in the attic.

19 years agoSync with FreeBSD. This removes the need for perl.
Joerg Sonnenberger [Mon, 15 Nov 2004 10:01:41 +0000 (10:01 +0000)]
Sync with FreeBSD. This removes the need for perl.

19 years agoAdd preprocessor handling for newer processor, they should get the better
Joerg Sonnenberger [Mon, 15 Nov 2004 08:16:02 +0000 (08:16 +0000)]
Add preprocessor handling for newer processor, they should get the better
assembler too.

19 years agoThe code and sources here haven't been used since FreeBSD 2.x, nuke
Joerg Sonnenberger [Mon, 15 Nov 2004 08:15:15 +0000 (08:15 +0000)]
The code and sources here haven't been used since FreeBSD 2.x, nuke
them.

Inspired-by: FreeBSD
19 years agoRemove ptx, it isn't maintained and hasn't been used by base for years.
Joerg Sonnenberger [Mon, 15 Nov 2004 08:14:00 +0000 (08:14 +0000)]
Remove ptx, it isn't maintained and hasn't been used by base for years.

Inspired-by: FreeBSD
Remove send-pr, once we have an official bugtracker, we can replace it
with a matching script. But we don't want to use GNATS, so no need for
send-pr.

19 years agoSync with FreeBSD. Most importantly, this removes the need for perl.
Joerg Sonnenberger [Mon, 15 Nov 2004 08:11:59 +0000 (08:11 +0000)]
Sync with FreeBSD. Most importantly, this removes the need for perl.

19 years agoFix an inverted conditional which could lead to nameBuf being truncated in
Matthew Dillon [Sun, 14 Nov 2004 20:13:12 +0000 (20:13 +0000)]
Fix an inverted conditional which could lead to nameBuf being truncated in
the later snprintf().

Noticed-by: Max Okumoto <okumoto@home>
19 years ago- Remove sys/time.h
Liam J. Foy [Sun, 14 Nov 2004 20:07:25 +0000 (20:07 +0000)]
- Remove sys/time.h
- Use __unused in the sig handlers
- Static functions
- Other minor changes

Note: The sig handler nonfs is not save. Joerg is going to work on this
himself.

19 years agoContinuing synchronization from FreeBSD.
Matthew Dillon [Sun, 14 Nov 2004 20:05:26 +0000 (20:05 +0000)]
Continuing synchronization from FreeBSD.

Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agoFix a lhs-cast by casting first to unsigned char and then to the
Joerg Sonnenberger [Sun, 14 Nov 2004 19:38:34 +0000 (19:38 +0000)]
Fix a lhs-cast by casting first to unsigned char and then to the
type-correct char.

19 years agoRemove the dependency on either asprintf or va_copy. This will be included
Joerg Sonnenberger [Sun, 14 Nov 2004 18:45:55 +0000 (18:45 +0000)]
Remove the dependency on either asprintf or va_copy. This will be included
in later versions by default.

Obtained-from: Tim Kientzle <tim@kientzle.com>

19 years agoRemove CFLAGS?= 2
Joerg Sonnenberger [Sun, 14 Nov 2004 18:20:08 +0000 (18:20 +0000)]
Remove CFLAGS?= 2

19 years ago-Wall -Wstrict-prototypes already in CFLAGS.
Joerg Sonnenberger [Sun, 14 Nov 2004 18:18:30 +0000 (18:18 +0000)]
-Wall -Wstrict-prototypes already in CFLAGS.

19 years ago-W is included in CFLAGS already.
Joerg Sonnenberger [Sun, 14 Nov 2004 18:17:41 +0000 (18:17 +0000)]
-W is included in CFLAGS already.

19 years agoFix an endian bug in pflog. The DragonFly version of PF uses the normal
Joerg Sonnenberger [Sun, 14 Nov 2004 17:27:31 +0000 (17:27 +0000)]
Fix an endian bug in pflog. The DragonFly version of PF uses the normal
host byte order instead of network byte order as used by OpenBSD and
FreeBSD. Normally the ether_output code converts this back, but for
pflog, we shortcut these code. Therefore, before calling bpf_mtap, switch
the byte order back to network order and revert it afterwards.

Problem-reported-by: Erik P. Skaalerud
19 years agoRemove xpt_release_simq_timeout(), this function has not been in use since the
Eirik Nygaard [Sun, 14 Nov 2004 16:48:36 +0000 (16:48 +0000)]
Remove xpt_release_simq_timeout(), this function has not been in use since the
timeout/untimeout ==> callout_* transformation.

19 years agoIf the first slot is empty, don't continue scanning. This fixes hangs
Joerg Sonnenberger [Sun, 14 Nov 2004 15:20:05 +0000 (15:20 +0000)]
If the first slot is empty, don't continue scanning. This fixes hangs
on some machines.

Obtained-from: FreeBSD

19 years agoMerge from vendor branch GDB:
Joerg Sonnenberger [Sun, 14 Nov 2004 15:16:59 +0000 (15:16 +0000)]
Merge from vendor branch GDB:
Add solib-legacy.c, it is needed for proper attach support.

I don't really understand why gdb doesn't include this file for itself.

19 years agoAdd solib-legacy.c, it is needed for proper attach support.
Joerg Sonnenberger [Sun, 14 Nov 2004 15:16:59 +0000 (15:16 +0000)]
Add solib-legacy.c, it is needed for proper attach support.

I don't really understand why gdb doesn't include this file for itself.

19 years agoAdd solib-legacy.c, it is needed for proper attach support.
Joerg Sonnenberger [Sun, 14 Nov 2004 15:16:59 +0000 (15:16 +0000)]
Add solib-legacy.c, it is needed for proper attach support.

I don't really understand why gdb doesn't include this file for itself.

19 years agoConstify VAR.
Eirik Nygaard [Sun, 14 Nov 2004 13:58:42 +0000 (13:58 +0000)]
Constify VAR.

Submitted by: joerg

WARNS=6 cleanup.

19 years agodirect sysargs to /dev/null for the emualtion system call sets to avoid a
Matthew Dillon [Sun, 14 Nov 2004 01:45:25 +0000 (01:45 +0000)]
direct sysargs to /dev/null for the emualtion system call sets to avoid a
make all_sysent build error.

19 years agoPartial sync from FreeBSD, add dummy syscalls for extended attribte
Matthew Dillon [Sun, 14 Nov 2004 01:41:41 +0000 (01:41 +0000)]
Partial sync from FreeBSD, add dummy syscalls for extended attribte
operations to return ENOATTR rather then ENOSYS (which causes a core dump).

Reported-by: John Duncan <agley@optusnet.com.au>
19 years agoImplement SACK.
Jeffrey Hsu [Sun, 14 Nov 2004 00:49:08 +0000 (00:49 +0000)]
Implement SACK.

19 years ago* Restore indentation to tabs.
Matthew Dillon [Sat, 13 Nov 2004 23:23:08 +0000 (23:23 +0000)]
* Restore indentation to tabs.
* Make it WARNS?=6 clean.
* Remove an unnecessary void cast.
* Declare static functions as static..
* Remove some unnecessary return statements at the end of void functions.

Submitted-by: Sascha Wildner <saw@online.de>
19 years agoAdd support for the ATI Radeon 9600 XT and XT_S.
Matthew Dillon [Sat, 13 Nov 2004 23:04:14 +0000 (23:04 +0000)]
Add support for the ATI Radeon 9600 XT and XT_S.

Submitted-by: "Pablo M<E9>ndez Hern<E1>ndez" <ciph3r@telefonica.net>
19 years agoSpelling corrections.
Matthew Dillon [Sat, 13 Nov 2004 22:42:43 +0000 (22:42 +0000)]
Spelling corrections.

Submitted-by: Max Okumoto <okumoto@home>
Taken-from: FreeBSD (2001/02/18 10:43:32)

19 years agoRemove left-over '{'.
Joerg Sonnenberger [Sat, 13 Nov 2004 17:31:00 +0000 (17:31 +0000)]
Remove left-over '{'.

19 years agoFix the condition under which yacc -o is used. This should fix the parallel
Joerg Sonnenberger [Sat, 13 Nov 2004 16:52:36 +0000 (16:52 +0000)]
Fix the condition under which yacc -o is used. This should fix the parallel
build in gdb.

Obtained-from: FreeBSD
Problems-reported-by: various folks
19 years ago- Remove main proto
Liam J. Foy [Sat, 13 Nov 2004 16:14:33 +0000 (16:14 +0000)]
- Remove main proto
- Don't bother using *logfile, just use _PATH_LASTLOG
- WARN 6 and remove CFLAGS

Ok'ed: Joerg

19 years agoShow the CPU used by the multi-threaded network stack to handle a socket.
Joerg Sonnenberger [Sat, 13 Nov 2004 13:57:36 +0000 (13:57 +0000)]
Show the CPU used by the multi-threaded network stack to handle a socket.

Submitted-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Slightly modified to skip the column on single CPU machines.

19 years agoRemove ntpdate from FILES list as well.
Joerg Sonnenberger [Sat, 13 Nov 2004 13:12:09 +0000 (13:12 +0000)]
Remove ntpdate from FILES list as well.

Reminder-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
19 years agoMake both arguments to str_concat() const char *'s and remove STR_DOFREE
Matthew Dillon [Sat, 13 Nov 2004 07:25:17 +0000 (07:25 +0000)]
Make both arguments to str_concat() const char *'s and remove STR_DOFREE
support.  Manually free the strings in the one routine in dir.c that used
that option, plus some other minor cleanups.

Reported-by: Max Okumoto <okumoto@home>
19 years agoDocument the slightly surprising behaviour of 'ifconfig -alias' when
Chris Pressey [Sat, 13 Nov 2004 04:13:22 +0000 (04:13 +0000)]
Document the slightly surprising behaviour of 'ifconfig -alias' when
no network address is given.

Prompted-by: Marc G. Fournier <scrappyAThubDOTorg>'s Nov 5 2004
             post to freebsd-stable mailing list

19 years agoSplit var.c into var.c and var_modify.c and move all the modification funcs
Matthew Dillon [Sat, 13 Nov 2004 00:10:09 +0000 (00:10 +0000)]
Split var.c into var.c and var_modify.c and move all the modification funcs
to var_modify.c, for readability.  constify some low hanging fruit (string
manipulation functions) and the upper layers appropriately.  No longer use
the private strstr(3) implementation, while changing string code.  Add var.h

Taken-From: FreeBSD/jmallett

19 years agoSplit var.c into var.c and var_modify.c and move all the modification funcs
Matthew Dillon [Sat, 13 Nov 2004 00:06:16 +0000 (00:06 +0000)]
Split var.c into var.c and var_modify.c and move all the modification funcs
to var_modify.c, for readability.  constify some low hanging fruit (string
manipulation functions) and the upper layers appropriately.  No longer use
the private strstr(3) implementation, while changing string code.  Add var.h

Taken-From: FreeBSD/jmallett

19 years agoPossibly expand the variable name's embedded variables before using it, as
Matthew Dillon [Fri, 12 Nov 2004 23:26:52 +0000 (23:26 +0000)]
Possibly expand the variable name's embedded variables before using it, as
seen (somewhat) in NetBSD.  This catches a few extra recursion cases that
could be hidden by expanding a NIL variable causing an existing variable to
be returned (which caused infinite looping and climbing memory usage in at
least one case).

Taken-From: FreeBSD/1.27,1.28 (jmallett), originally obtained from NetBSD

19 years agoConvert make(1) to use ANSI style function declarations. Variable
Matthew Dillon [Fri, 12 Nov 2004 22:57:04 +0000 (22:57 +0000)]
Convert make(1) to use ANSI style function declarations.  Variable
documentation already adequatedly existed in the description in most
cases.  Where it did not, it was added.  If no documentation existed
beforehand, then none was added.  Some unused dummies for use in the
traversal functions were marked as __unused during the conversion.
Occasionally, local style fixes were applied to lines already being
modified or influenced.

Taken-from: FreeBSD/jmallett

19 years agoMake the DEBUGF() macro portable by (ugh) adding a Debug() function, which
Matthew Dillon [Fri, 12 Nov 2004 22:42:36 +0000 (22:42 +0000)]
Make the DEBUGF() macro portable by (ugh) adding a Debug() function, which
is merely printf() but to stderr.  This takes care of the caveat which lead
to the use of a vararg macro -- getting everything to stderr.

Move common use of if (DEBUG(FOO)) printf... to DEBUGF(FOO, ...), using
variable length arguments to a macro.  Bump version as this makes DEBUG
statements *always* go to stderr rather than sometimes stdout.  There are
a few stragglers, which I will take care of as soon as I can.  Mostly these
relate to the need-for-death-of some of the remote job code.

Taken-From: FreeBSD/jmallett

19 years agoDiff reduction for great justice against NetBSD, cast to unsigned char when
Matthew Dillon [Fri, 12 Nov 2004 22:28:05 +0000 (22:28 +0000)]
Diff reduction for great justice against NetBSD, cast to unsigned char when
passing an argument to isspace(3).

Taken-from: FreeBSD/jmallett

19 years agoPartial sync from FreeBSD/jmallet:
Matthew Dillon [Fri, 12 Nov 2004 22:11:33 +0000 (22:11 +0000)]
Partial sync from  FreeBSD/jmallet:

String lengths and sizeof()s are size_t not int.  Mark an unused parameter
of ReadMakefile as __unused, it's there because this function is used by
the abstracted list interface

19 years agoDo some deregisterization.
Matthew Dillon [Fri, 12 Nov 2004 22:02:51 +0000 (22:02 +0000)]
Do some deregisterization.

Taken-From: FreeBSD/obrien.

19 years agoefree()->free(). remove #define efree (which was defined to free).
Matthew Dillon [Fri, 12 Nov 2004 21:52:04 +0000 (21:52 +0000)]
efree()->free().  remove #define efree (which was defined to free).

Taken-From: FreeBSD

19 years agoThe strings package passes back a pointer via brk_string() to internal
Matthew Dillon [Fri, 12 Nov 2004 21:46:09 +0000 (21:46 +0000)]
The strings package passes back a pointer via brk_string() to internal
memory, it should not be deallocated.  The memory is allocated in str_init()
and release in str_end() which are only called in main().

Submitted-by: Max Okumoto <okumoto@home>
Taken-from: FreeBSD/1.22

19 years agoRemove various forms of NULL, and cleanup types. This is a partial sync from
Matthew Dillon [Fri, 12 Nov 2004 21:41:54 +0000 (21:41 +0000)]
Remove various forms of NULL, and cleanup types.  This is a partial sync from
FreeBSD's make.

Submitted-by: Max Okumoto <okumoto@home>
19 years agoAdd a missing com_unlock() to the serial port drain test code. This code
Matthew Dillon [Fri, 12 Nov 2004 20:51:29 +0000 (20:51 +0000)]
Add a missing com_unlock() to the serial port drain test code.  This code
is necessary to detect non-existant serial ports on machines (such as the
eMachines laptop) which don't have any serial port hardware at all, but
the missing com_unlock() caused systems to crash in certain situations for
obvious reasons.

Many thanks to Glenn Johnson <glennpj@charter.net> for keeping on my back
about the issue and for testing the fix.  This should also fix the last of the
serial-port related bug reports stemming from the original 1.0A release.

19 years agoSwitch to OpenNTPD by default. For the moment, the documentation is
Joerg Sonnenberger [Fri, 12 Nov 2004 19:45:36 +0000 (19:45 +0000)]
Switch to OpenNTPD by default. For the moment, the documentation is
not in-sync, -S [Do not set the time immediately], because when a
default route exists, but DNS traffic is lost, the startup time is
*big*.

You can change this by overriding ntpd_flags in /etc/rc.conf.

19 years agoFix systat -netstat and remove the dependency on KVM for this part.
Joerg Sonnenberger [Fri, 12 Nov 2004 19:03:10 +0000 (19:03 +0000)]
Fix systat -netstat and remove the dependency on KVM for this part.

Submitted-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
19 years agoChange zconf.h and zlib.h to use underscored protection macros.
Joerg Sonnenberger [Fri, 12 Nov 2004 18:10:42 +0000 (18:10 +0000)]
Change zconf.h and zlib.h to use underscored protection macros.

Reported-by: Andrew Houghton <aah@roarmouse.org>
19 years agoForced commit, correct comment for last commit. 1.25 has nothing to do with
Matthew Dillon [Fri, 12 Nov 2004 17:50:56 +0000 (17:50 +0000)]
Forced commit, correct comment for last commit.  1.25 has nothing to do with
VFS and instead fixes an arithmatic overflow in the calculation of
(primarily) the nanoseconds field.  In particular, cputimer_freq64_nsec
cannot be multiplied much beyond cputimer_freq without overflowing.  The
overflow can result in a seriously incorrect nanoseconds field and mess up
ntpdate and pthreads, amoung other things.

19 years agoSpelling: Filesystem is one word.
David Rhodus [Fri, 12 Nov 2004 16:38:06 +0000 (16:38 +0000)]
Spelling: Filesystem is one word.

19 years agoQuiet tinderbox:
David Rhodus [Fri, 12 Nov 2004 16:34:00 +0000 (16:34 +0000)]
Quiet tinderbox:
Turn off the build for NULLFS, UMAPFS, UNION, CODA filesystems until
we have time to rework their VOP entry methods.

19 years agoDefault vfs.fastdev to 1 for wider testing, so the vnode bypass for device
Matthew Dillon [Fri, 12 Nov 2004 10:58:59 +0000 (10:58 +0000)]
Default vfs.fastdev to 1 for wider testing, so the vnode bypass for device
read and write is now the default.

This is a precursor to the continued work on a kernel-managed cache layer
on top of the VFS layer.  That is, the intention is to eventually switch the
VM page cache to be ABOVE the VFS layer rather then BELOW the VFS layer for
standard read() and write() calls, with potentially major performance
benefits.

19 years agoTemporarily remove union and nullfs from the vfs build list, they are
Matthew Dillon [Fri, 12 Nov 2004 10:07:32 +0000 (10:07 +0000)]
Temporarily remove union and nullfs from the vfs build list, they are
currently broken in HEAD.

19 years agoInitialize pseudointr_ch in fdc.
Joerg Sonnenberger [Fri, 12 Nov 2004 09:50:38 +0000 (09:50 +0000)]
Initialize pseudointr_ch in fdc.

19 years agoAdd _ntp to the user database, correct the path to nologin for proxy
Joerg Sonnenberger [Fri, 12 Nov 2004 09:37:26 +0000 (09:37 +0000)]
Add _ntp to the user database, correct the path to nologin for proxy
and _pflogd.

19 years agoAdd a 'preupgrade' target which creates any missing users and groups
Matthew Dillon [Fri, 12 Nov 2004 09:10:01 +0000 (09:10 +0000)]
Add a 'preupgrade' target which creates any missing users and groups
(relative to FreeBSD-4) that are required before installworld can be
run.

Adjust the installworld prechecks to bail if required users or groups
do not exist, with a message pointing to the new preupgrade target.

The 'make upgrade' target will automatically run the preupgrade target.

Required users: smmsp, _pflogd, _ntp.
Required groups: smmsp, authpf, _pflogd, _ntp

Devon noted that the 'pw' program seems to do what we need here.

19 years agoCorrect minor tinderbox -DDEBUG error.
Matthew Dillon [Fri, 12 Nov 2004 06:07:36 +0000 (06:07 +0000)]
Correct minor tinderbox -DDEBUG error.

19 years agoInitialize 'version' variable to silence compiler warning.
David Rhodus [Fri, 12 Nov 2004 02:30:29 +0000 (02:30 +0000)]
Initialize 'version' variable to silence compiler warning.

19 years agoSpelling.
David Rhodus [Fri, 12 Nov 2004 02:25:51 +0000 (02:25 +0000)]
Spelling.

19 years agoSync up items from the GENERIC config and a few more items to make
David Rhodus [Fri, 12 Nov 2004 02:24:28 +0000 (02:24 +0000)]
Sync up items from the GENERIC config and a few more items to make
this config file more handy to use on testing systems.

19 years agoUpdate the 3ware card comment to better reflect which cards are supported.
David Rhodus [Fri, 12 Nov 2004 02:21:19 +0000 (02:21 +0000)]
Update the 3ware card comment to better reflect which cards are supported.

19 years agoVFS messaging/interfacing work stage 9/99: VFS 'NEW' API WORK.
Matthew Dillon [Fri, 12 Nov 2004 00:09:56 +0000 (00:09 +0000)]
VFS messaging/interfacing work stage 9/99: VFS 'NEW' API WORK.

NOTE: unionfs and nullfs are temporarily broken by this commit.

* Remove the old namecache API.  Remove vfs_cache_lookup(), cache_lookup(),
  cache_enter(), namei() and lookup() are all gone.  VOP_LOOKUP() and
  VOP_CACHEDLOOKUP() have been collapsed into a single non-caching
  VOP_LOOKUP().

* Complete the new VFS CACHE (namecache) API.  The new API is able to
  supply topological guarentees and is able to reserve namespaces,
  including negative cache spaces (whether the target name exists or not),
  which the new API uses to reserve namespace for things like NRENAME
  and NCREATE (and others).

* Complete the new namecache API.  VOP_NRESOLVE, NLOOKUPDOTDOT, NCREATE,
  NMKDIR, NMKNOD, NLINK, NSYMLINK, NWHITEOUT, NRENAME, NRMDIR, NREMOVE.
  These new calls take (typicaly locked) namecache pointers rather then
  combinations of directory vnodes, file vnodes, and name components.  The
  new calls are *MUCH* simpler in concept and implementation.  For example,
  VOP_RENAME() has 8 arguments while VOP_NRENAME() has only 3 arguments.

  The new namecache API uses the namecache to lock namespaces without having
  to lock the underlying vnodes.  For example, this allows the kernel
  to reserve the target name of a create function trivially.  Namecache
  records are maintained BY THE KERNEL for both positive and negative hits.

  Generally speaking, the kernel layer is now responsible for resolving
  path elements.  NRESOLVE is called when an unresolved namecache record
  needs to be resolved.  Unlike the old VOP_LOOKUP, NRESOLVE is simply
  responsible for associating a vnode to a namecache record (positive hit)
  or telling the system that it's a negative hit, and not responsible for
  handling symlinks or other special cases or doing any of the other
  path lookup work, much unlike the old VOP_LOOKUP.

  It should be particularly noted that the new namecache topology does not
  allow disconnected namecache records.  In rare cases where a vnode must
  be converted to a namecache pointer for new API operation via a file handle
  (i.e. NFS), the cache_fromdvp() function is provided and a new API VOP,
  VOP_NLOOKUPDOTDOT() is provided to allow the namecache to resolve the
  topology leading up to the requested vnode.  These and other topological
  guarentees greatly reduce the complexity of the new namecache API.

  The new namei() is called nlookup().  This function uses a combination
  of cache_n*() calls, VOP_NRESOLVE(), and standard VOP calls resolve the
  supplied path, deal with symlinks, and so forth, in a nice small compact
  compartmentalized procedure.

* The old VFS code is no longer responsible for maintaining namecache records,
  a function which was mostly adhoc cache_purge()s occuring before the VFS
  actually knows whether an operation will succeed or not.

  The new VFS code is typically responsible for adjusting the state of
  locked namecache records passed into it.  For example, if NCREATE succeeds
  it must call cache_setvp() to associate the passed namecache record with
  the vnode representing the successfully created file.  The new requirements
  are much less complex then the old requirements.

* Most VFSs still implement the old API calls, albeit somewhat modified
  and in particular the VOP_LOOKUP function is now *MUCH* simpler.  However,
  the kernel now uses the new API calls almost exclusively and relies on
  compatibility code installed in the default ops (vop_compat_*()) to
  convert the new calls to the old calls.

* All kernel system calls and related support functions which used to do
  complex and confusing namei() operations now do far less complex and
  far less confusing nlookup() operations.

* SPECOPS shortcutting has been implemented.  User reads and writes now go
  directly to supporting functions which talk to the device via fileops
  rather then having to be routed through VOP_READ or VOP_WRITE, saving
  significant overhead.  Note, however, that these only really effect
  /dev/null and /dev/zero.

  Implementing this was fairly easy, we now simply pass an optional
  struct file pointer to VOP_OPEN() and let spec_open() handle the
  override.

SPECIAL NOTES: It should be noted that we must still lock a directory vnode
LK_EXCLUSIVE before issuing a VOP_LOOKUP(), even for simple lookups, because
a number of VFS's (including UFS) store active directory scanning information
in the directory vnode.  The legacy NAMEI_LOOKUP cases can be changed to
use LK_SHARED once these VFS cases are fixed.  In particular, we are now
organized well enough to actually be able to do record locking within a
directory for handling NCREATE, NDELETE, and NRENAME situations, but it hasn't
been done yet.

Many thanks to all of the testers and in particular David Rhodus for
finding a large number of panics and other issues.

19 years agoStyle(9):
Chris Pressey [Thu, 11 Nov 2004 21:16:46 +0000 (21:16 +0000)]
Style(9):
- Do not implicitly treat NUL characters, NULL pointers, or 0-valued
  integers as false-valued booleans; use explicit tests instead.
- Prefer char **argv to char *argv[].
- Small whitespace adjustments.
- No functional changes.

19 years agoAdd various improvements to the "pre-flight installer":
Chris Pressey [Thu, 11 Nov 2004 20:30:05 +0000 (20:30 +0000)]
Add various improvements to the "pre-flight installer":

- Add pfi_autologin variable.  If set to a valid username, the
  installation medium boot process will automatically log in as
  that user.  Defaults to "NONE".

- Add pfi_shutdown_command variable.  This can be set to the
  desired command used to shut down the system when the installer
  finishes doing its thing.  Defaults to "shutdown -h now".

- Launch thttpd on boot if pfi_frontend="cgi".

  In combination, these three settings allow completely
  headless (no monitor, no keyboard) operation of the installer
  independent of a serial connection (i.e. over the network.)

- Have the pfi_sshd_permit_root_login variable honour
  "without-password" and "forced-commands-only" settings. [1]

[1] Submitted by: geekgod

19 years agoUpdate installer to 1.1.2.
Chris Pressey [Thu, 11 Nov 2004 19:45:19 +0000 (19:45 +0000)]
Update installer to 1.1.2.

The most significant change in this update is that there are now two
seperate directories on the install medium, /etc and /etc.hdd :

- /etc contains the configuration used for booting the LiveCD only.
  It is NOT copied to the hard drive.

- /etc.hdd contains the default configuration used for booting from
  a hard drive.  It is NOT used for booting the LiveCD.  It IS copied
  to the hard drive, as /etc .

This avoids the `copy pristine files afterward' rigamarole and, in
so doing, simplifies both manual and automatic install routines.

The README file has also been updated to reflect this change.

Suggested-by: dillon (a while ago)
19 years agoThe 'start = 1' change wasn't needed, revert that one little bit back to
Matthew Dillon [Wed, 10 Nov 2004 20:19:51 +0000 (20:19 +0000)]
The 'start = 1' change wasn't needed, revert that one little bit back to
'start = 0'.

19 years ago- style(9) cleanup
Joerg Sonnenberger [Wed, 10 Nov 2004 18:30:13 +0000 (18:30 +0000)]
- style(9) cleanup
- allow rl_detach to be used for all error recovery in rl_attach
- drop rl_unit and use device_printf instead
- rl_list_tx_init can't fail, make it void
- eliminate splimp in rl_attach, drop it ASAP in rl_detach
- use DEFINE_CLASS_0 instead of expanding it manually

From FreeBSD:
- support cardbus attachments
- support 6bit and 8bit EEPROMs
- use ether_crc32_be instead of local code
- fix some unnessary watchdog conditions
- depend on miibus
- use pci_get_powerstate()/pci_set_powerstate()
- add various PCI and CardBus devices
- bus_dma conversion

19 years agoAdd libarchive to prebuilt libraries.
Joerg Sonnenberger [Wed, 10 Nov 2004 18:05:36 +0000 (18:05 +0000)]
Add libarchive to prebuilt libraries.

19 years agoMerge from vendor branch LIBARCHIVE:
Joerg Sonnenberger [Wed, 10 Nov 2004 18:02:24 +0000 (18:02 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
at installworld time by setting WITH_BSDTAR. This is not the default yet.

Obtained-from: FreeBSD

19 years agoMerge from vendor branch BSDTAR:
Joerg Sonnenberger [Wed, 10 Nov 2004 18:02:24 +0000 (18:02 +0000)]
Merge from vendor branch BSDTAR:
Import libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
at installworld time by setting WITH_BSDTAR. This is not the default yet.

Obtained-from: FreeBSD

19 years agoImport libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
Joerg Sonnenberger [Wed, 10 Nov 2004 18:02:24 +0000 (18:02 +0000)]
Import libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
at installworld time by setting WITH_BSDTAR. This is not the default yet.

Obtained-from: FreeBSD

19 years agoImport libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
Joerg Sonnenberger [Wed, 10 Nov 2004 18:02:24 +0000 (18:02 +0000)]
Import libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
at installworld time by setting WITH_BSDTAR. This is not the default yet.

Obtained-from: FreeBSD

19 years agoImport libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
Joerg Sonnenberger [Wed, 10 Nov 2004 18:02:24 +0000 (18:02 +0000)]
Import libarchive and bsdtar. The default tar (/usr/bin/tar) can be choosen
at installworld time by setting WITH_BSDTAR. This is not the default yet.

Obtained-from: FreeBSD