dragonfly.git
19 years agoIgnore replies with a negative delay. Correct time of next query and
Joerg Sonnenberger [Thu, 14 Apr 2005 11:22:16 +0000 (11:22 +0000)]
Ignore replies with a negative delay. Correct time of next query and
deadline for all peers in priv_settime is called.

This should fix the problems of ntpd -s with very large initial correction.

19 years agoleap second, not leaf second. fix totally stupid, but consistent spelling
Joerg Sonnenberger [Thu, 14 Apr 2005 11:15:52 +0000 (11:15 +0000)]
leap second, not leaf second. fix totally stupid, but consistent spelling
error.

Noticed-by: corecode
19 years agoMerge from vendor branch NTPD:
Joerg Sonnenberger [Thu, 14 Apr 2005 10:41:29 +0000 (10:41 +0000)]
Merge from vendor branch NTPD:
Sync with OpenBSD. This fixes the bug of -s not working and allows
defered DNS lookups, which might be necessary in certain network
setups.

19 years agoSync with OpenBSD. This fixes the bug of -s not working and allows
Joerg Sonnenberger [Thu, 14 Apr 2005 10:41:29 +0000 (10:41 +0000)]
Sync with OpenBSD. This fixes the bug of -s not working and allows
defered DNS lookups, which might be necessary in certain network
setups.

19 years agoUse corrected system time internally, adjust old offsets after
Joerg Sonnenberger [Thu, 14 Apr 2005 10:31:27 +0000 (10:31 +0000)]
Use corrected system time internally, adjust old offsets after
doing a relative adjust of kern.ntp.delta.

Change the default scaling interval to 0.005 and 0.010, which
means that offsets smaller than 5ms double to probe interval,
anything greater than 10ms uses the default. The value of
QSCALE_OFF_MIN can be decreases even more, once frequency correction
is implemented.

19 years agoUse corrected system time internally, adjust old offsets after
Joerg Sonnenberger [Thu, 14 Apr 2005 10:26:51 +0000 (10:26 +0000)]
Use corrected system time internally, adjust old offsets after
doing a relative adjust of kern.ntp.delta.

Change the default scaling interval to 0.005 and 0.010, which
means that offsets smaller than 5ms double to probe interval,
anything greater than 10ms uses the default. The value of
QSCALE_OFF_MIN can be decreases even more, once frequency correction
is implemented.

19 years agoResurrect some of functions shared by rrestore.
YONETANI Tomokazu [Thu, 14 Apr 2005 10:17:23 +0000 (10:17 +0000)]
Resurrect some of functions shared by rrestore.

19 years agowether ==> whether
Joerg Sonnenberger [Thu, 14 Apr 2005 08:14:31 +0000 (08:14 +0000)]
wether ==> whether

Noticed-by: asmodai
19 years agoSimplified NTP kernel interface:
Joerg Sonnenberger [Thu, 14 Apr 2005 07:55:36 +0000 (07:55 +0000)]
Simplified NTP kernel interface:
- kern.ntp.delta gives the delta to apply (ns)
- kern.ntp.tick_delta is the correction applied in each tick (ns)
- kern.ntp.default_tick_delta is the default correction for each tick (ns)
- kern.ntp.big_delta is the threshold for kern.ntp.delta to use
  10x kern.ntp.default_tick_delta, not the normal value
- kern.ntp.adjust can be used to change the current value of kern.ntp.delta
  relatively.
- kern.ntp.next_leaf_second specifies the time_t of the next leaf second change,
  kern.ntp.insert_leaf_second != 0 means a leaf second is inserted, otherwise
  it is removed

All ntp_* variables are manipulated on CPU #0 with the exception of
set_timeofday. It just sets ntp_delta to 0, which is fine for the moment.

19 years agoRemove another argument name in a prototype.
Joerg Sonnenberger [Wed, 13 Apr 2005 16:08:04 +0000 (16:08 +0000)]
Remove another argument name in a prototype.

19 years agoDecommon a lot of variables, makes some static, fix a small bug in rmtcall
Joerg Sonnenberger [Wed, 13 Apr 2005 16:07:15 +0000 (16:07 +0000)]
Decommon a lot of variables, makes some static, fix a small bug in rmtcall
introduced earlier.

19 years agoRemove a cast, correct another.
Joerg Sonnenberger [Wed, 13 Apr 2005 15:45:37 +0000 (15:45 +0000)]
Remove a cast, correct another.

19 years ago- Let receiver know if the sender accepts replies
Liam J. Foy [Wed, 13 Apr 2005 15:44:03 +0000 (15:44 +0000)]
- Let receiver know if the sender accepts replies
- Use correct headers
- Use err(). In some cases an incorrect error message can be shown
- Strlcpy
- warnx() instead of errx() if sender has messages disabled (OpenBSD)
- Remove non-POSIX S_IWRITE (OpenBSD)
- General cleanup

19 years agoDon't write to tape, strdup it first.
Joerg Sonnenberger [Wed, 13 Apr 2005 15:43:36 +0000 (15:43 +0000)]
Don't write to tape, strdup it first.

Submitted-by: Sepherosa Ziehau <sepherosa@softhome.net>
19 years agoRemove argument names from prototypes. Adjust prototypes to deal
Joerg Sonnenberger [Wed, 13 Apr 2005 15:21:36 +0000 (15:21 +0000)]
Remove argument names from prototypes. Adjust prototypes to deal
with void * vs. char * and const vs. non-const behaviour.

19 years agoMove initialisation of wrote into the loop to prevent longjmp/setjmp
Joerg Sonnenberger [Wed, 13 Apr 2005 14:32:01 +0000 (14:32 +0000)]
Move initialisation of wrote into the loop to prevent longjmp/setjmp
from clobbering it.

19 years agoWarning fixes.
Joerg Sonnenberger [Wed, 13 Apr 2005 14:29:20 +0000 (14:29 +0000)]
Warning fixes.

Submitted-by: Sepherosa Ziehau <sepherosa@softhome.net>
19 years agoSplit atomic into two functions, atomic_read and atomic_write.
Joerg Sonnenberger [Wed, 13 Apr 2005 14:21:06 +0000 (14:21 +0000)]
Split atomic into two functions, atomic_read and atomic_write.
This makes the code more readable and helps the const correctness.

Submitted-by: Sepherosa Ziehau <sepherosa@softhome.net>
19 years agoCompute buffer length only once per rmtcall.
Joerg Sonnenberger [Wed, 13 Apr 2005 14:12:35 +0000 (14:12 +0000)]
Compute buffer length only once per rmtcall.

19 years agoRemove unused functions.
Joerg Sonnenberger [Wed, 13 Apr 2005 14:10:18 +0000 (14:10 +0000)]
Remove unused functions.

Submitted-by: Sepherosa Ziehau <sepherosa@softhome.net>
19 years agoFirst bunch of dump(8) cleanups.
Joerg Sonnenberger [Wed, 13 Apr 2005 14:05:35 +0000 (14:05 +0000)]
First bunch of dump(8) cleanups.

Submitted-by: Sepherosa Ziehau <sepherosa@softhome.net>
19 years agoOnly bump the switch_count counter when lwkt_switch() actually switches
Matthew Dillon [Wed, 13 Apr 2005 04:02:08 +0000 (04:02 +0000)]
Only bump the switch_count counter when lwkt_switch() actually switches
to a different thread.  Otherwise the idle loop causes this counter
to go haywire.

19 years agoOptimize lwkt_send_ipiq() - the IPI based inter-cpu messaging routine.
Matthew Dillon [Wed, 13 Apr 2005 04:00:56 +0000 (04:00 +0000)]
Optimize lwkt_send_ipiq() - the IPI based inter-cpu messaging routine.

* Add a passive version which does not initiate any actual hardware IPI.
  The message will be handled the next time the target cpu polls the
  queue (on each tick typically).  Adjust the free() path to use this
  version when freeing memory owned by another cpu.

* Add an interlock to avoid reissuing and unnecessarily stalling on
  the hardware IPI if a prior hardware IPI to the target cpu has not
  yet completed processing.

  This feature theoretically means that two cpus can tightly couple a
  large number of pipelined messages with only a single actual IPI being
  sent.

* Reorganize the hystersis points in the IPIQ FIFOs.

* Change a token livelock warning into a panic if it occurs 10 times in
  a row.

* Add a call to lwkt_process_ipiq() just after the AP startup code enables
  a cpu, to process any messages that might have built up during startup.
  There shouldn't be any, but this may avoid surprises later.

19 years agoInsert a '#' between the .else directive and the following comment.
Max Okumoto [Tue, 12 Apr 2005 23:37:27 +0000 (23:37 +0000)]
Insert a '#' between the .else directive and the following comment.

19 years agoPut a '#' between {.else, .endif} and the comment following it.
Max Okumoto [Tue, 12 Apr 2005 23:35:37 +0000 (23:35 +0000)]
Put a '#' between {.else, .endif} and the comment following it.
This makes it clear that the following text is a comment.  And
more important, the make parser is going to be a little more
strict about it, soon.

19 years agoThe error message issued when a requested package cannot be found has
Chris Pressey [Tue, 12 Apr 2005 18:07:36 +0000 (18:07 +0000)]
The error message issued when a requested package cannot be found has
become garbled over time.  Ungarble it.

19 years agoFix brokeness by using _pthread_xxx functions instead.
David Xu [Tue, 12 Apr 2005 14:01:31 +0000 (14:01 +0000)]
Fix brokeness by using _pthread_xxx functions instead.

19 years agoRemoved un-nessisary comment. We can get a zero length arg to make
Max Okumoto [Tue, 12 Apr 2005 08:26:17 +0000 (08:26 +0000)]
Removed un-nessisary comment.  We can get a zero length arg to make
if someone quotes it.
% make ''

19 years agoUse the correct macro for printing TCP statistical counters when we only
Hiten Pandya [Mon, 11 Apr 2005 14:51:38 +0000 (14:51 +0000)]
Use the correct macro for printing TCP statistical counters when we only
have one format argument.

19 years agoIck! Seems I was under a placebo, correct a last minute typo.
Hiten Pandya [Mon, 11 Apr 2005 11:00:40 +0000 (11:00 +0000)]
Ick!  Seems I was under a placebo, correct a last minute typo.

19 years agoMechanical cleanup of IP per-cpu statistics code, better naming etc.
Hiten Pandya [Mon, 11 Apr 2005 10:24:45 +0000 (10:24 +0000)]
Mechanical cleanup of IP per-cpu statistics code, better naming etc.

Correct a stale comment regarding initialisation of the counters.

19 years agoForced commit to note previous change, of introducing 'mycpuid' was
Hiten Pandya [Mon, 11 Apr 2005 09:58:38 +0000 (09:58 +0000)]
Forced commit to note previous change, of introducing 'mycpuid' was
originally suggested by Jeffrey Hsu.

19 years agoRemove the '_GD' macro hack:
Hiten Pandya [Mon, 11 Apr 2005 09:54:22 +0000 (09:54 +0000)]
Remove the '_GD' macro hack:

I introduced it some revisions ago so that functions with locally
cached 'globaldata' can redefine it in order to minimise time
required for updating the IP/TCP per-cpu statistics counters.

19 years agoMechanical cleanup of TCP per-cpu statistics code, better naming etc.
Hiten Pandya [Mon, 11 Apr 2005 09:43:50 +0000 (09:43 +0000)]
Mechanical cleanup of TCP per-cpu statistics code, better naming etc.

Correct a stale comment regarding initialisation of the counters.

19 years agoAdd 'mycpuid', a #define for accessing mycpu->gd_cpuid.
Hiten Pandya [Mon, 11 Apr 2005 09:33:31 +0000 (09:33 +0000)]
Add 'mycpuid', a #define for accessing mycpu->gd_cpuid.

Adjust nearby whitespace while I am here.

19 years agoClearly state when ACPI is overriding APM's device entries.
Matthew Dillon [Mon, 11 Apr 2005 06:05:54 +0000 (06:05 +0000)]
Clearly state when ACPI is overriding APM's device entries.

19 years agoBack out revision 1.31. The 'release' target alone should be
Chris Pressey [Sun, 10 Apr 2005 21:45:11 +0000 (21:45 +0000)]
Back out revision 1.31.  The 'release' target alone should be
sufficient for creating a LiveCD containing no additional packages.

Discussed-with: drhodus

19 years agoClean up some register keyword usage.
David Rhodus [Sun, 10 Apr 2005 20:55:38 +0000 (20:55 +0000)]
Clean up some register keyword usage.

19 years agoAdd in a 'livecd' taget for those who don't want to include the
David Rhodus [Sun, 10 Apr 2005 20:27:32 +0000 (20:27 +0000)]
Add in a 'livecd' taget for those who don't want to include the
installer program in their ISO image file.

19 years agoRemove previous hack, for now just use strtoull() instead of strtoumax().
Max Okumoto [Sun, 10 Apr 2005 10:28:21 +0000 (10:28 +0000)]
Remove previous hack, for now just use strtoull() instead of strtoumax().

19 years agoAdded #ifdef to aid people upgrading from before March 17.
Max Okumoto [Sun, 10 Apr 2005 10:18:45 +0000 (10:18 +0000)]
Added #ifdef to aid people upgrading from before March 17.

Needed for cross compile on FreeBSD 4.X.  In addition, people
upgrading DFly via source, from before March 17, 2005 might need
to manually define NEED_STRTOUMAX in CFLAGS, because strtoumax()
did not exist before then.

This code should be removed if when cross compiling from FreeBSD
4.X is no longer required, and no one is upgrading from before
* March 17.     Max Okumoto.

19 years agoAdd standard entries for libcaps, libkinfo and libkcore; they can now be
Hiten Pandya [Sun, 10 Apr 2005 00:09:32 +0000 (00:09 +0000)]
Add standard entries for libcaps, libkinfo and libkcore; they can now be
specified in manual pages using the 'Lb' mdoc macro.

19 years agoAdd entry for DragonFly 1.2.
Hiten Pandya [Sun, 10 Apr 2005 00:02:01 +0000 (00:02 +0000)]
Add entry for DragonFly 1.2.

Update entries for FreeBSD, i.e. 4.11, 5.4 and 6.0.

19 years agoAdd manual page for closefrom(2) system call and hook it to the build.
Hiten Pandya [Sat, 9 Apr 2005 23:41:26 +0000 (23:41 +0000)]
Add manual page for closefrom(2) system call and hook it to the build.

Partly obtained from OpenBSD with my modifications.

19 years agoMerge from FreeBSD:
YONETANI Tomokazu [Sat, 9 Apr 2005 11:02:35 +0000 (11:02 +0000)]
Merge from FreeBSD:

revision 1.7
  date: 2004-07-07 09:38:14 +0000;  author: ru;  state: Exp;  lines: +1 -0
  Arguments to options aren't necessarily separated with whitespace.

  Noticed by: harti

revision 1.6
  date: 2004-02-06 11:00:13 +0000;  author: ru;  state: Exp;  lines: +3 -4
  From what I can tell, install.sh supported all of the install(1)
  options since revision 1.2, so removed the XXX comment now.

  Fixed bogus test(1) expression that would be evaluated as a null
  string test if script is run without arguments, compacted option
  lists.

19 years agoMerge revision 1.5 from FreeBSD:
YONETANI Tomokazu [Sat, 9 Apr 2005 10:39:12 +0000 (10:39 +0000)]
Merge revision 1.5 from FreeBSD:
  Fix typo in the BSD copyright: s/withough/without/

19 years agoFreeBSD-Date: 2005/04/08 10:03:40
Max Okumoto [Sat, 9 Apr 2005 06:24:15 +0000 (06:24 +0000)]
FreeBSD-Date: 2005/04/08 10:03:40
Author: harti

Move the code for parsing .for and .if statements to the place where the
other directives are handled.

19 years agoFreeBSD-Date: 2005/04/07 15:39:38
Max Okumoto [Sat, 9 Apr 2005 06:23:20 +0000 (06:23 +0000)]
FreeBSD-Date: 2005/04/07 15:39:38
Author: harti

When Parse_Error is called after the top-level Makefile is closed we
have no CURFILE anymore so we cannot print a file name or line number.

When ParseSkipLine() returns NULL (it does this when it has detected an
EOF in an .if block) try to pop the input stack and process the next line

19 years agoFreeBSD-Date: 2005/04/07 12:29:39
Max Okumoto [Sat, 9 Apr 2005 05:51:42 +0000 (05:51 +0000)]
FreeBSD-Date: 2005/04/07 12:29:39
Author: harti

Handle popping of the input stack in ParseReadLine() instead of
Parse_File(). Remove a comment and a piece of code comming from
ancient times when the if-directive read like #if and not .if.
Correctly analyze the first character of a line.

19 years agoFreeBSD-Date: 2005/04/07 12:26:15
Max Okumoto [Sat, 9 Apr 2005 05:50:51 +0000 (05:50 +0000)]
FreeBSD-Date: 2005/04/07 12:26:15
Author: harti

Mostly stylistic changes: remove the noPLen field from the Shell
structure - it is just the strlen() of noPrint. Inline JobCondPassSig()
in the only function JobPassSig() using it. Fix the argument types
of JobPrintCommand(). Better parsing for the .SHELL target keywords.

19 years agoSimply the loop based on the knowledge that fd <= fdp->fd_lastfile
Joerg Sonnenberger [Fri, 8 Apr 2005 17:39:31 +0000 (17:39 +0000)]
Simply the loop based on the knowledge that fd <= fdp->fd_lastfile
(already checked) and fd >= 0 (also checked).

Discussed-with: Jeffrey Hsu

19 years agoDon't just undefine USE_RC_SUBR, because it does define the list
Joerg Sonnenberger [Fri, 8 Apr 2005 16:38:31 +0000 (16:38 +0000)]
Don't just undefine USE_RC_SUBR, because it does define the list
of rc scripts if it is defined and not YES. We didn't undefine USE_RCORDER,
which pulled the rc_subr port in.

Fix this by:
(a) save the old value or USE_RCORDER and USE_RC_SUBR to _DF_*.
(b) include the install-rc-script target from ports/Mk/bsd.port.mk,
but use _DF_* for the variables in the actual code.
(c) add _DF_* to the SUB_FILES list and add RC_SUBR to SUB_LIST.
(d) undefine USE_RC_SUBR and USE_RCORDER afterwards.

Problem-reported-by: Erik P. Skaalerud <erik@pentadon.com>
19 years agoTell the world that we have closefrom.
Joerg Sonnenberger [Fri, 8 Apr 2005 11:30:07 +0000 (11:30 +0000)]
Tell the world that we have closefrom.

19 years agoUse kernel's closefrom.
Joerg Sonnenberger [Fri, 8 Apr 2005 11:26:52 +0000 (11:26 +0000)]
Use kernel's closefrom.

19 years agoAdd userland prototype for closefrom.
Joerg Sonnenberger [Fri, 8 Apr 2005 08:32:53 +0000 (08:32 +0000)]
Add userland prototype for closefrom.

19 years agoRegen.
Joerg Sonnenberger [Fri, 8 Apr 2005 08:31:45 +0000 (08:31 +0000)]
Regen.

19 years agoAdd closefrom(2) syscall. It closes all file descriptors equal or greater
Joerg Sonnenberger [Fri, 8 Apr 2005 08:31:06 +0000 (08:31 +0000)]
Add closefrom(2) syscall. It closes all file descriptors equal or greater
than the given descriptor.

This function does exit and return EINTR, when necessary. Other errors from
close() are ignored.

19 years agoBump HEAD's official release #define to 130000.
Matthew Dillon [Fri, 8 Apr 2005 06:40:33 +0000 (06:40 +0000)]
Bump HEAD's official release #define to 130000.

19 years agoThe release is 1.2, bump the HEAD of the tree to 1.3 for post-release
Matthew Dillon [Fri, 8 Apr 2005 06:12:11 +0000 (06:12 +0000)]
The release is 1.2, bump the HEAD of the tree to 1.3 for post-release
development.

19 years agoSync up to the latest installer packages (with netboot server capabilities!).
Matthew Dillon [Fri, 8 Apr 2005 04:22:28 +0000 (04:22 +0000)]
Sync up to the latest installer packages (with netboot server capabilities!).

19 years agoAdd a hardwired dhcpd.conf for the installer's netboot server support.
Matthew Dillon [Fri, 8 Apr 2005 03:25:18 +0000 (03:25 +0000)]
Add a hardwired dhcpd.conf for the installer's netboot server support.

19 years agoThe cdrom MNT_ROOTFS check was interfering with the NFS export handling,
Matthew Dillon [Fri, 8 Apr 2005 03:16:18 +0000 (03:16 +0000)]
The cdrom MNT_ROOTFS check was interfering with the NFS export handling,
preventing a system booted from CD from being able to export /.  Fixed.

19 years agoMake should set optreset to one before it calls getopt() with a new
Max Okumoto [Thu, 7 Apr 2005 07:52:32 +0000 (07:52 +0000)]
Make should set optreset to one before it calls getopt() with a new
set of args.

    o Removed unnessisary forward declaration for MainParseArgs()

    o Use optreset global variable to inform getopt() that we are
      parsing another arg list.

    o Cleanup handling of remaining arguments after getopt()
      completes parsing arguments.  There is no reason to restart
      getopt() for single dash case, just ignore it.  And update
      comment to reflect code.

    o Removed missleading comments.

19 years agoDate: 2005/04/01 16:24:25
Max Okumoto [Thu, 7 Apr 2005 07:23:03 +0000 (07:23 +0000)]
Date: 2005/04/01 16:24:25
Date: 2005/04/05 08:32:12
Date: 2005/04/05 08:40:40
Date: 2005/04/05 08:43:02
Date: 2005/04/05 08:44:11
Date: 2005/04/05 09:09:48
Date: 2005/04/05 13:33:54
Author: harti

o Use a type-safe intrusive list to put jobs on the jobs or stoppedJobs
  list instead of the generic Lst.

o The tfile field of struct Job isn't used anymore since revision
  1.22 so remove it now.

o The static tfile is used only in one single function so move it
  into that function.

o Remove unneccessary local prototypes.

o Remove the definition for STATIC and just use static.

o Remove lots if irritating parantheses and fix two comments.

o Put parantheses into 'if (foo && bar & flag)'. While they are not
  strictly needed, they are useful for the human reader.

o There is not much sense in having an else after Punt() and _exit()
  which never return. Also use pid_t for variables holding PIDs.

19 years agoFreeBSD-Date: 2005/04/01 13:35:35
Max Okumoto [Thu, 7 Apr 2005 07:16:33 +0000 (07:16 +0000)]
FreeBSD-Date: 2005/04/01 13:35:35
FreeBSD-Date: 2005/04/01 16:23:48
Author: harti

Both struct Job and struct Shell are only used inside job.c so there is
no need to have them in a header file that is included by other modules.
Move them both into the c-file.

Remove a forward declaration that isn't needed anymore.

19 years agoFreeBSD-Date: 2005/04/01 10:53:43
Max Okumoto [Thu, 7 Apr 2005 00:44:18 +0000 (00:44 +0000)]
FreeBSD-Date: 2005/04/01 10:53:43
FreeBSD-Date: 2005/04/01 11:12:29
FreeBSD-Date: 2005/04/01 11:20:17
FreeBSD-Date: 2005/04/01 12:31:15
FreeBSD-Date: 2005/04/01 12:42:03
FreeBSD-Date: 2005/04/01 13:02:17
FreeBSD-Date: 2005/04/01 13:06:05
FreeBSD-Date: 2005/04/01 13:25:45
Author: harti

Style: fix indentation

19 years agoFreeBSD-Date: 2005/03/31 11:35:56
Max Okumoto [Thu, 7 Apr 2005 00:37:31 +0000 (00:37 +0000)]
FreeBSD-Date: 2005/03/31 11:35:56
FreeBSD-Date: 2005/03/31 11:40:53
Author: harti

Almost complete rewrite of the archive code (except for the Makefile parsing
part). Archive handling was broken at least since the move from BSD ar/ranlib
to GNU binutils because of the different archive format. This rewrite fixes
this by making make to carry around the defines for all formats (it supports)
so it can support all of them independent of the actually used one. The
supported formats are: traditional BSD (this seems to come from V7 at least,
short names only and __.SYMDEF), BSD4.4 (long names with #1/ and __.SYMDEF)
and SysV (extra name table and //). The only format not supported are broken
traditional archives where the member names are truncated to 15 characters.

Errors in the archive are not ignored anymore, but cause make to stop with
an error message. The command line option -A causes these errors to become
non-fatal. This is almost compatible with previous usage except for the
error message printed in any case.

Use a type-safe intrusive list for the archive cache.

Document the new -A flag for ignoring archive errors.

Reviewed by:    Max Okumoto <okumoto@ucsd.edu> (without new error handling)

19 years agoAdd compat code so code that uses types defined by c99
Max Okumoto [Thu, 7 Apr 2005 00:35:33 +0000 (00:35 +0000)]
Add compat code so code that uses types defined by c99
can compile on FreeBSD 4.X.
intmax_t
uintmax_t
INT64_MIN
strtoumax()

Harti has started using them in the FreeBSD code base.

19 years agoadd ports/polish
Matthew Dillon [Wed, 6 Apr 2005 22:40:30 +0000 (22:40 +0000)]
add ports/polish

19 years agoUpdate the various DragonFly supfiles, rename some of them to make their
Matthew Dillon [Wed, 6 Apr 2005 20:52:55 +0000 (20:52 +0000)]
Update the various DragonFly supfiles, rename some of them to make their
function more obvious.  Note the stable->preview label change.

19 years agoInclude fsid information in the mount point dump.
Matthew Dillon [Wed, 6 Apr 2005 18:40:25 +0000 (18:40 +0000)]
Include fsid information in the mount point dump.

19 years agoCorrect an NFS bug related to ftruncate() operations. When the client
Matthew Dillon [Wed, 6 Apr 2005 18:39:53 +0000 (18:39 +0000)]
Correct an NFS bug related to ftruncate() operations.  When the client
truncates a file it has to do a lot of magic on the buffer cache to scrap
buffers beyond the new EOF and properly handle the buffer that straddles
the truncation point.  To ease the job the NFS client performs a flush.

This creates a problem, however, because the server includes attribute
information in its RPC replies (for NFSv3) which is then cached by the
client via nfs_loadattrcache().  This information is used by the client
to detect races with other entities modifying the same file but it creates
confusion when the client is in the middle of trying to do an ftruncate(),
especially if some of the buffer flushes prior to the truncate extend the
file.  The server will report file sizes that don't match either the 'before'
or 'after' information that the client has.

To deal with this situation we have to check for mismatches after we flush
and loop if we find any, prior to issuing the setattrrpc().   Such mismatches
are virtually guarenteed to occur even with just a single NFS client working
the file.  We also do a sanity check after issuing the stattrrpc().  This
second sanity check will only be triggered if our NFS client is racing
another client on the same file.

It's quite possible that there are still client-side bugs related to this
issue even with this commit.

Reported-by: Andreas Hauser <andy@splashground.de>
19 years agolibstand is used by the boot loader, make sure the stack protector is
Matthew Dillon [Wed, 6 Apr 2005 03:36:27 +0000 (03:36 +0000)]
libstand is used by the boot loader, make sure the stack protector is
turned off.

19 years agoBring in long-forgotten man pages for ACPI components currently available
YONETANI Tomokazu [Wed, 6 Apr 2005 03:25:46 +0000 (03:25 +0000)]
Bring in long-forgotten man pages for ACPI components currently available
on DragonFly.

Requested-By: Erik Wikström <erik-wikstrom [a] telia.com> and others
Acquired-from: FreeBSD
(acpi.4,v 1.50 acpi_thermal.4,v 1.6 acpi_toshiba.4,v 1.5)

19 years agoRemove unused strong reference.
David Xu [Tue, 5 Apr 2005 23:04:22 +0000 (23:04 +0000)]
Remove unused strong reference.

19 years agoAdd some minor in-code documentation.
Matthew Dillon [Tue, 5 Apr 2005 22:37:37 +0000 (22:37 +0000)]
Add some minor in-code documentation.

19 years agoAdd cases for the nvidia nForce3 PRO and PRO S1. Who knows how well it
Matthew Dillon [Tue, 5 Apr 2005 22:37:16 +0000 (22:37 +0000)]
Add cases for the nvidia nForce3 PRO and PRO S1.  Who knows how well it
actually works.

19 years agoMake sure neither the boot loader nor the kernel is compiled with the
Matthew Dillon [Tue, 5 Apr 2005 22:36:33 +0000 (22:36 +0000)]
Make sure neither the boot loader nor the kernel is compiled with the
stack protector.

19 years agoAutomatically calculate the kernel revision for release tags by extracting
Matthew Dillon [Tue, 5 Apr 2005 21:41:19 +0000 (21:41 +0000)]
Automatically calculate the kernel revision for release tags by extracting
the revision from the tag itself.  Remove any DragonFly_ prefix or _Slip
suffix from the branch name.  This will allow us to create a slip tag that
synchronizes the sources with the automated subversion increment.  This also
reduces the work required to create a new, properly identified branch.

Automatically postpend a subversion from /usr/src/sys/conf/subvers-TAG, on
release builds only, where TAG is in the form RELEASE_X_Y.

19 years agoAdd nv(4) man page.
Joerg Sonnenberger [Tue, 5 Apr 2005 17:39:22 +0000 (17:39 +0000)]
Add nv(4) man page.

19 years agoDon't reset getopt after each loop, we don't use the argc / argv
Joerg Sonnenberger [Tue, 5 Apr 2005 09:04:49 +0000 (09:04 +0000)]
Don't reset getopt after each loop, we don't use the argc / argv
and all options have options. This should in fact use either
getopt_long_only or a direct matching, getopt(3) is abusive.
The adjustion of argc / argv is there to match common
behaviour, it gets optimizes away by the compiler.

19 years agoRevamp getopt(3) usage:
Joerg Sonnenberger [Tue, 5 Apr 2005 08:19:35 +0000 (08:19 +0000)]
Revamp getopt(3) usage:
- don't depend on optind=0, it's absolutely not necessary
- set optreset to restart getopt(3)

19 years agoSince optind=0 has a special meaning for GNU getopt compatibility,
Joerg Sonnenberger [Tue, 5 Apr 2005 07:55:02 +0000 (07:55 +0000)]
Since optind=0 has a special meaning for GNU getopt compatibility,
always use optind=1 and increment argc / decrement argv beforehand.

19 years agoApply same bug fix as last commit to IPV6.
Matthew Dillon [Tue, 5 Apr 2005 07:08:52 +0000 (07:08 +0000)]
Apply same bug fix as last commit to IPV6.

Reported-by: Jeffrey Hsu
19 years agoFix a bug in the distributed PCB wildcardhash code for TCP. For the SMP
Matthew Dillon [Tue, 5 Apr 2005 05:43:05 +0000 (05:43 +0000)]
Fix a bug in the distributed PCB wildcardhash code for TCP.   For the SMP
case both the INP_WILDCARD and INP_WILDCARD_MP flags must be set.  The
insertion code was calling in_pcbinswildcardhash_oncpu() instead of
in_pcbinswildcardhash() for the current-cpu case, which leaves the
INP_WILDCARD flag unset.  The wildcard deletion code calls various
oncpu routines which remove the wildcard from the other cpu's hash
tables, then finally calls in_pcbdetach()->in_pcbremlist() on the
originating cpu but this fails to delete the inp because INP_WILDCARD
was not set.

This bug caused the TCP stack to get seriously confused because wildcard
entries with stale inp pointers wind up being left in the hash table.
The bug causes a mix of ignored connection requests (not even an RST),
refused connection requests, successful connection requests, and crashes.

Reported-by: Peter Avalos <pavalos@theshell.com>
19 years agoA program which dumps the wildcard hash table for the TCP protocol for
Matthew Dillon [Tue, 5 Apr 2005 02:49:15 +0000 (02:49 +0000)]
A program which dumps the wildcard hash table for the TCP protocol for
all CPUs.

19 years agoAdd the 'webstress' utility. This program will fork a number of child
Matthew Dillon [Tue, 5 Apr 2005 00:13:20 +0000 (00:13 +0000)]
Add the 'webstress' utility.  This program will fork a number of child
processes and take a series of URLs on the command line or from a file.
Each child will then run through the list continuously.  Various options
may be specified to tune the test.

19 years agoSync nv(4) with nvnet-src-20050312.
Joerg Sonnenberger [Mon, 4 Apr 2005 18:45:07 +0000 (18:45 +0000)]
Sync nv(4) with nvnet-src-20050312.

19 years agoReplace TIMER_USE_1 kernel option with hw.i8254.walltimer tunable.
Joerg Sonnenberger [Mon, 4 Apr 2005 17:49:09 +0000 (17:49 +0000)]
Replace TIMER_USE_1 kernel option with hw.i8254.walltimer tunable.

19 years agoWARNS?=6 cleanup for fstat.
Matthew Dillon [Mon, 4 Apr 2005 17:42:51 +0000 (17:42 +0000)]
WARNS?=6 cleanup for fstat.

Submitted-by: Jonas Trollvik <jontro@gmail.com>
19 years agoWhen ALTQ was detached from an interface queue, the function pointers
Joerg Sonnenberger [Mon, 4 Apr 2005 17:08:16 +0000 (17:08 +0000)]
When ALTQ was detached from an interface queue, the function pointers
for enqueue, dequeue and request ops where reset to NULL. That was fine
in the old days when ifq_* checked wether ALTQ is enabled and fell back
to the classic implementation, but now it just deferences a NULL pointer.
Introduce a new function ifq_set_classic, which resets the pointers to
the same values if_attach initially uses and which implements the
classic BSD queueing. Use this in altq_detach and if_attach.

Reported-by: Stefan Krüger <skrueger@meinberlikomm.de>
19 years agoAdd a macro to print the list of current processes independ of wait state.
Joerg Sonnenberger [Mon, 4 Apr 2005 14:19:10 +0000 (14:19 +0000)]
Add a macro to print the list of current processes independ of wait state.

19 years ago- WARNS -> WARNS?
Liam J. Foy [Mon, 4 Apr 2005 10:41:11 +0000 (10:41 +0000)]
- WARNS -> WARNS?

Noticed by: Sarunas Vancevicius <svan@redbrick.dcu.ie>

19 years agoKKASERT -> KKASSERT
Sascha Wildner [Sun, 3 Apr 2005 19:50:39 +0000 (19:50 +0000)]
KKASERT -> KKASSERT

19 years agoRemove newline so that it looks nice in Postscript, too.
Sascha Wildner [Sun, 3 Apr 2005 19:31:33 +0000 (19:31 +0000)]
Remove newline so that it looks nice in Postscript, too.

19 years agoWARNS=6
Joerg Sonnenberger [Sun, 3 Apr 2005 18:59:24 +0000 (18:59 +0000)]
WARNS=6

19 years agoRemove pre-FreeBSD 3 compat conditionals.
Joerg Sonnenberger [Sun, 3 Apr 2005 18:53:09 +0000 (18:53 +0000)]
Remove pre-FreeBSD 3 compat conditionals.

19 years agoconst changes.
Joerg Sonnenberger [Sun, 3 Apr 2005 17:13:08 +0000 (17:13 +0000)]
const changes.

19 years agoWARNS=6.
Joerg Sonnenberger [Sun, 3 Apr 2005 15:52:40 +0000 (15:52 +0000)]
WARNS=6.

19 years agoWARNS=6.
Joerg Sonnenberger [Sun, 3 Apr 2005 15:46:43 +0000 (15:46 +0000)]
WARNS=6.