dragonfly.git
11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 11 May 2012 05:21:02 +0000 (22:21 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agomount - Split mount into mount_ufs, auto-detect fstype from disklabel
Matthew Dillon [Fri, 11 May 2012 05:20:33 +0000 (22:20 -0700)]
mount - Split mount into mount_ufs, auto-detect fstype from disklabel

* Followup minor adjustment for compile error.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 11 May 2012 05:19:21 +0000 (22:19 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agomount - Split mount into mount_ufs, auto-detect fstype from disklabel
Matthew Dillon [Fri, 11 May 2012 05:12:28 +0000 (22:12 -0700)]
mount - Split mount into mount_ufs, auto-detect fstype from disklabel

* Move the compiled-in ufs mount code from mount to a new utility called
  mount_ufs.

* When mount determines the filesystem type is ufs it now exec's mount_ufs
  instead of calling the built-in ufs code.

* When mounting a disklabeled device and the fstype is not specified
  mount will attempt to figure out the fstype from the disklabel.

  Devices matching acd%d and cd%d will default to the 'cd9660' fstype.

  It defaults to ufs if it cannot figure it out (as before).

* If your filesystems are properly labeled this allows you to specify
  the mount generically as in this example:

      mount /dev/da0s1d /mnt

  And mount will exec mount_ufs or mount_hammer (etc...) as appropriate.

* NOTE! mount cannot currently auto-detect msdosfs or extract the DOS
  slice type.  It would be cool if it were extended further to do this
  as well.  Currently it only understands DragonFly disklabels.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 11 May 2012 00:45:41 +0000 (17:45 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agotmpfs - Remove size cap
Matthew Dillon [Fri, 11 May 2012 00:20:06 +0000 (17:20 -0700)]
tmpfs - Remove size cap

tmpfs normally caps manually requested filesystem sizes to available
memory and swap.  However, this messes up size specifications in /etc/fstab
during boot which mount tmpfs prior to turning on swap.

For now just disable it.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 10 May 2012 22:31:52 +0000 (15:31 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agolibedit: Upgrade NetBSD version 2011-03-11
John Marino [Thu, 10 May 2012 05:03:28 +0000 (07:03 +0200)]
libedit: Upgrade NetBSD version 2011-03-11

As NetBSD has properly packaged regular releases of their libedit
library (readline replacement), a new vendor branch has been created
for it.  Libedit was last synchronized with NetBSD 4 years ago, to
the week.

During that time, a new function was added to the DragonFly version
that still doesn't exist on NetBSD.  It is necessary to support GDB
7.x, so the addition of rl_completion_word_break_hook function has
been carried over to this update.

11 years agonew libedit: Add DragonFly README files to contrib
John Marino [Thu, 10 May 2012 20:28:57 +0000 (22:28 +0200)]
new libedit: Add DragonFly README files to contrib

11 years agonew libedit: add rl_completion_word_break_hook functionality
John Marino [Thu, 10 May 2012 00:45:00 +0000 (02:45 +0200)]
new libedit: add rl_completion_word_break_hook functionality

Recreates commit:
e2624a299cd1858e0a04301d42b946851c336c37

"This follows roughly what is described in the readline manual.
 rl_completion_word_break_hook is needed by gdb-7."

11 years agonew libedit: Fix mismatch between 0 and pointers
John Marino [Thu, 10 May 2012 00:26:13 +0000 (02:26 +0200)]
new libedit: Fix mismatch between 0 and pointers

Partially recreates commit:
678e8cc6002ecd3a79cdae95ac8b454437219fc5

"For better readability, don't compare pointers with 0 or assign 0
 to them. Use NULL instead."

11 years agonew libedit: Silence -Wold-style-definition
John Marino [Thu, 10 May 2012 00:19:06 +0000 (02:19 +0200)]
new libedit: Silence -Wold-style-definition

Partially recreates commit:
9a92bb4ce6ff1ff9b84161d1e22abd74e726c553

11 years agonew libedit: Local modifications to enable build
John Marino [Thu, 10 May 2012 20:19:31 +0000 (22:19 +0200)]
new libedit: Local modifications to enable build

The unmodified libedit source doesn't build on DragonFly without
minor modifications to three files.

11 years agoMerge branch 'vendor/LIBEDIT'
John Marino [Thu, 10 May 2012 21:36:29 +0000 (23:36 +0200)]
Merge branch 'vendor/LIBEDIT'

11 years agoImport NetBSD's LibEdit version 2012-03-11 on vendor branch
John Marino [Thu, 10 May 2012 21:34:55 +0000 (23:34 +0200)]
Import NetBSD's LibEdit version 2012-03-11 on vendor branch

11 years agoRemove some AppleTalk remains.
Sascha Wildner [Thu, 10 May 2012 18:52:36 +0000 (20:52 +0200)]
Remove some AppleTalk remains.

11 years agonetstat: Move SACK rescue stats to the "packet sent" block
Sepherosa Ziehau [Thu, 10 May 2012 05:14:39 +0000 (13:14 +0800)]
netstat: Move SACK rescue stats to the "packet sent" block

11 years agotcp: Adjust early rexmit start condition for the adaptive DupThresh algorithm
Sepherosa Ziehau [Thu, 10 May 2012 05:09:58 +0000 (13:09 +0800)]
tcp: Adjust early rexmit start condition for the adaptive DupThresh algorithm

11 years agoacpi_asus(4): Bring in a small fix from FreeBSD.
Sascha Wildner [Wed, 9 May 2012 21:17:02 +0000 (23:17 +0200)]
acpi_asus(4): Bring in a small fix from FreeBSD.

Prefer correct and simpler backlight control methods for ASUS G2K laptop.

Taken-from: FreeBSD

11 years agotcp/sack: Don't reduce retransmit threshold as recommended by RFC3517bis
Sepherosa Ziehau [Wed, 9 May 2012 08:48:15 +0000 (16:48 +0800)]
tcp/sack: Don't reduce retransmit threshold as recommended by RFC3517bis

- Don't reduce byte threshold in IsLost()
- Don't retransmit if IsLost(tcpcb.snd_una) is true

They cause spurious retransmits.

Add sysctl node net.inet.tcp.rfc3517bis_rxt to enable the RFC3517bis
recommended retransmit threshold reduction.  It is disabled by default.

11 years agotcp/sack: Implement RFC3517bis
Sepherosa Ziehau [Tue, 8 May 2012 09:56:00 +0000 (17:56 +0800)]
tcp/sack: Implement RFC3517bis

http://tools.ietf.org/html/draft-ietf-tcpm-3517bis-02, which will
be become "Standards Track" soon.

net.inet.tcp.rfc3517bis sysctl node is added to enable this update.
It is off by default.

11 years agogrep: Restore modification for HAMMER FS
John Marino [Tue, 8 May 2012 16:25:35 +0000 (18:25 +0200)]
grep: Restore modification for HAMMER FS

The first version of this modification was created by Matthias Schmidt.
Unmodified, grep used on a HAMMER filesystem will emit "Invalid argument"
when scanning directories because HAMMER doesn't treat them as files.

Unmodified behavior:
> cd /usr/src
> grep test: *
Makefile:test:
grep: cat: Invalid argument
[...]

After modification:
> cd /usr/src
> grep test: *
Makefile:test:

The modification was removed because it didn't merge simply with the
grep upgrade from 2.9 to 2.12.  Now that the merge is complete, the
new version of the modification is applied to restore the correct
behavior of grep on the HAMMER filesystem.

11 years agogrep: Upgrade from version 2.9 to 2.12
John Marino [Tue, 8 May 2012 10:36:23 +0000 (12:36 +0200)]
grep: Upgrade from version 2.9 to 2.12

=====================   Version 2.10 (16 NOV 2011)   =====================

It's been nearly five months and 80 commits since 2.9, yet few big
changes in grep proper.  However, there have been many changes in gnulib,
including a few portability fixes that affect grep.   We inherited 750+
portability and robustness improvements by using gnulib.

[Bug fixes]
* grep no longer mishandles high-bit-set pattern bytes on systems
  where "char" is a signed type. [bug appears to affect only MS-Windows]

* grep now rejects a command like "grep -r pattern . > out",
  in which the output file is also one of the inputs,
  because it can result in an "infinite" disk-filling loop.
  [bug present since "the beginning"]

[Build-related]
  "make dist" no longer builds .tar.gz files.
  xz is portable enough and in wide-enough use that distributing
  only .tar.xz files is enough.

=====================   Version 2.11 (02 MAR 2012)   =====================

In just 2.5 months, we've seen more changes than in the five months
leading up to 2.10, addressing a surprising number of old bugs.
Special thanks to Paulo Bonzini and Paul Eggert for many fine patches.  We
inherited 340+ portability and robustness improvements by using gnulib.

[New features]
* If no file operand is given, and a command-line -r or equivalent
  option is given, grep now searches the working directory.  Formerly
  grep ignored the -r and searched standard input nonrecursively.
  An -r found in GREP_OPTIONS does not have this new effect.

* grep now supports color highlighting of matches on MS-Windows.

[Bug fixes]
* grep no longer dumps core on lines whose lengths do not fit in 'int'.
  (e.g., lines longer than 2 GiB on a typical 64-bit host).
  Instead, grep either works as expected, or reports an error.
  An error can occur if not enough main memory is available, or if the
  GNU C library's regular expression functions cannot handle such long
  lines. [bug present since "the beginning"]

* The -m, -A, -B, and -C options no longer mishandle context line
  counts that do not fit in 'int'.  Also, grep -c's counts are now
  limited by the type 'intmax_t' (typically less than 2**63) rather
  than 'int' (typically less than 2**31).

* grep no longer silently suppresses errors when reading a directory
  as if it were a text file.  For example, "grep x ." now reports a
  read error on most systems; formerly, it ignored the error.
  [bug introduced in grep-2.5]

* grep now exits with status 2 if a directory loop is found,
  instead of possibly exiting with status 0 or 1.
  [bug introduced in grep-2.3]

* The -s option now suppresses certain input error diagnostics that it
  formerly failed to suppress.  These include errors when closing the
  input, when lseeking the input, and when the input is also the output.
  [bug introduced in grep-2.4]

* On POSIX systems, commands like "grep PAT < FILE >> FILE"
  now report an error instead of looping.
  [bug present since "the beginning"]

* The --include, --exclude, and --exclude-dir options now handle
  command-line arguments more consistently.  --include and --exclude
  apply only to non-directories and --exclude-dir applies only to
  directories.  "-" (standard input) is never excluded, since it is
  not a file name.
  [bug introduced in grep-2.5]

* grep no longer rejects "grep -qr . > out", i.e., when run with -q
  and an input file is the same as the output file, since with -q
  grep generates no output, so there is no risk of infinite loop or
  of an output-affecting race condition.  Thus, the use of the following
  options also disables the input-equals-output failure:
    --max-count=N (-m) (for N >= 2)
    --files-with-matches (-l)
    --files-without-match (-L)
  [bug introduced in grep-2.10]

* grep no longer emits an error message and quits on MS-Windows when
  invoked with the -r option.

* grep no longer misinterprets some alternations involving anchors
  (^, $, \<  \>  \B, \b).  For example, grep -E "(^|\B)a" no
  longer reports a match for the string "x a".
  [bug present since "the beginning"]

[Changes in behavior]
* Use of the --mmap option now elicits a warning.  It has been a no-op
  since March of 2010.

* grep no longer diagnoses write errors repeatedly; it exits after
  diagnosing the first write error.  This is better behavior when
  writing to a dangling pipe.

* Syntax errors in GREP_COLORS are now ignored, instead of sometimes
  eliciting warnings.  This is more consistent with programs that
  (e.g.) ignore errors in termcap entries.

=====================   Version 2.12 (23 APR 2012)   =====================

There have been 22 commits by 3 people in the 7 weeks since 2.11.
In spite of the relatively small number of commits, this is a
significant delta, with two regression fixes, Paul's conversion,
from grep's crufty old dir-traversal code to the use of gnulib's fts
and the change to how -r (--recursive) works.

[Bug fixes]
* "echo P|grep --devices=skip P" once again prints P, as it did in 2.10
  [bug introduced in grep-2.11]

* grep no longer segfaults with -r --exclude-dir and no file operand.
  I.e., ":|grep -r --exclude-dir=D PAT" would segfault.
  [bug introduced in grep-2.11]

* Recursive grep now uses fts for directory traversal, so it can
  handle much-larger directories without reporting things like "File
  name too long", and it can run much faster when dealing with large
  directory hierarchies. [bug present since the beginning]

* grep -E 'a{1000000000}' now reports an overflow error rather than
  silently acting like grep -E 'a\{1000000000}'.

[New features]
* The -R option now has a long-option alias --dereference-recursive.

[Changes in behavior]
* The -r (--recursive) option now follows only command-line symlinks.
  Also, by default -r now reads a device only if it is named on the
  command line; this can be overridden with --devices.  -R acts as
  before, so use -R if you prefer the old behavior of following all
  symlinks and defaulting to reading all devices.

11 years agoMerge branch 'vendor/GREP'
John Marino [Tue, 8 May 2012 21:54:01 +0000 (23:54 +0200)]
Merge branch 'vendor/GREP'

11 years agogrep: remove local option --only-files permanently
John Marino [Tue, 8 May 2012 17:02:03 +0000 (19:02 +0200)]
grep: remove local option --only-files permanently

The grep option --only-files exists only on DragonFly.  It was added in
late 2005 by Simon Schubert as a quick and dirty way to search object
directories using grep rather than a complex find command.  The issue
was that some directory symlinks were created that produced recursive
loops.  There wasn't a lot of support for the suggestion, but when the
code was altered to allow non-directory symlinks to be followed by the
--only-files option, the main objection was addressed.

The problem is that this modification is making it difficult to maintain
grep.  The code that it touches changes frequently, and its unmergable
with grep 2.12.  The burden of maintaining this option is too much
considering it may only have a single user.

Discussed with: Dillon

For the purposes of merging grep 2.12, the hammer bug fix is also being
removed since it doesn't merge cleanly, but it will be restored after
the merge.

11 years agoUpgrade grep version 2.9 to 2.12 on the vendor branch
John Marino [Tue, 8 May 2012 10:48:47 +0000 (12:48 +0200)]
Upgrade grep version 2.9 to 2.12 on the vendor branch

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Tue, 8 May 2012 17:17:28 +0000 (10:17 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel -- vn: Implement BUF_CMD_FLUSH for vn(ode) devices.
Venkatesh Srinivas [Tue, 8 May 2012 12:33:56 +0000 (05:33 -0700)]
kernel -- vn: Implement BUF_CMD_FLUSH for vn(ode) devices.

File-backed vnode devices implement BUF_CMD_FLUSH by VOP_FSYNC-ing
the backing vnode.

11 years agoAdd a small wdog(9) manual page.
Sascha Wildner [Tue, 8 May 2012 07:11:22 +0000 (09:11 +0200)]
Add a small wdog(9) manual page.

11 years agotcp/sack: Guard against ACK reordering when adding SACK blocks
Sepherosa Ziehau [Tue, 8 May 2012 05:56:07 +0000 (13:56 +0800)]
tcp/sack: Guard against ACK reordering when adding SACK blocks

The reordered ACK could carry SACK blocks which are all covered by
tcpcb.snd_una

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Tue, 8 May 2012 00:13:21 +0000 (17:13 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agortld: Fix gethints()
John Marino [Mon, 7 May 2012 15:56:36 +0000 (17:56 +0200)]
rtld: Fix gethints()

The function that retrieves the hints file contents had a logic flaw.
It's supposed to return either the full or filtered version of the
hints file depending if the object has the nodefaultlib flag set or
not.  The problem was that every subsequent call would return the
first call's result regardless of the nodefaultlib flag setting.

The function's API was changed to simplify the code.  The function is
never called without a valid object, so there was no need to test for
that in order the check the nodefaultlib flag.  Now the flag is passed
to gethints() directly.

Reported and submitted by: Konstantin Belousov

11 years agokernel -- ffs: Correct incorrect prototype change that snuck into last commit.
Venkatesh Srinivas [Mon, 7 May 2012 20:28:00 +0000 (13:28 -0700)]
kernel -- ffs: Correct incorrect prototype change that snuck into last commit.

11 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Venkatesh Srinivas [Mon, 7 May 2012 20:25:13 +0000 (13:25 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Mon, 7 May 2012 18:43:26 +0000 (11:43 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel - Attempt to fix illegal xfer buffer in ulpt*
Matthew Dillon [Mon, 7 May 2012 18:41:27 +0000 (11:41 -0700)]
kernel - Attempt to fix illegal xfer buffer in ulpt*

Use usbd_alloc_buffer() to allocate the dummy input buffer for reading
status from the printer instead of passing a (possibly badly misaligned or
illegally addressed) buffer embedded in the softc.

This appears to fix numerous issues with ulpt on 64-bit systems.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Mon, 7 May 2012 18:34:38 +0000 (11:34 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel -- ffs: Softdep lock and assorted fixes
Venkatesh Srinivas [Mon, 7 May 2012 15:28:48 +0000 (08:28 -0700)]
kernel -- ffs: Softdep lock and assorted fixes

* Remove interlocked_sleep; we can just use lksleep directly

* sema_get no longer eats the interlock passed in; all of its
  callers were retaking the lock eventually or immediately.

* softdep was setting up a callout to wake itself in request_cleanup.
  Switch to directly using timeout in lksleep for this purpose.

* Do not access inodedep structure outside of softdep lock in
  softdep_update_inodeblock for buffer field.

* Remove prio field from semaphores; they were unused and the DFly
  tsleep routines do not respect priority anyway.

* Do not release softdep lock before panic()ing

11 years agodevelopment.7: Fix the git documentation URL.
Sascha Wildner [Mon, 7 May 2012 13:02:20 +0000 (15:02 +0200)]
development.7: Fix the git documentation URL.

Reported-by: Joachim de Groot <jdegroot@web.de>
11 years agopw: Sync with FreeBSD
Peter Avalos [Sun, 6 May 2012 19:11:50 +0000 (12:11 -0700)]
pw:  Sync with FreeBSD

* Spelling fixes.
* Stop hard-coding default directory mode as 0777.
* Use arc4random_uniform() to avoid "modulo bias".
* Before updating the password database, the pw(8) utility first
  performs a sanity check by invoking "pwd_mkdb -C".  However, if this
  failed it silently returned success.  Fix this so it fails the update
  operation instead.
* Increase the size of the salt in pw(8) from 8 to 32.
* Make it possible to have a '/' in the salt.
* Add the groupmod '-d' option to pw to allow the deletion of existing
  users from a group without the need to perform the same operation by
  replacing the existing list via the '-M' option.  The '-M' option
  requires someone to fetch the existing members with pw, deleting the
  undesired members from the list and sending the altered list back.
* Do the right thing with symlinks in the skeleton directory.
* Accept passwords which contain whitespace.
* Introduce the new option -M to allow to set the permissions of the
  user's newly created home directory.
* Use strlcpy(3).
* Shift file locking to source file instead of temp file.
* Add a `-H <fd>' option that is like `-h <fd>', but accepts an already
  encrypted password on the specified file descriptor.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue2362>
Obtained-from:  FreeBSD

11 years agortld.1: Some mdoc improvement.
Sascha Wildner [Sun, 6 May 2012 19:23:31 +0000 (21:23 +0200)]
rtld.1: Some mdoc improvement.

11 years agoarcmsr(4): Sync with FreeBSD.
Sascha Wildner [Sun, 6 May 2012 17:18:28 +0000 (19:18 +0200)]
arcmsr(4): Sync with FreeBSD.

Updates to 1.20.00.22

Some bugfixing (mainly, better timeout handling) and cleanups.

11 years agortld(1): Add shared object search order to the man page
John Marino [Sun, 6 May 2012 12:25:20 +0000 (14:25 +0200)]
rtld(1): Add shared object search order to the man page

The shared library search order on the dynamic linker was updated a few
weeks ago, but the man page was not updated to reflect its new behavior.
DragonFly's search order is the same as Linux, but differs from FreeBSD
and other BSDs due to the recently added support for DT_RUNPATH and
-z nodefaultlib.

To clarify, FreeBSD and DragonFly *recognized* the DT_RUNPATH dynamic
tag but considered it an alias of DT_RPATH and thus wasn't handling the
tag as intended.

DragonFly is likely is the only BSD that searches shared objects like
Linux, but FreeBSD developers have patches from DragonFly in case they
want to follow suit.

11 years agoamdsbwd.4 & ichwd.4: Clean up SEE ALSO.
Sascha Wildner [Sun, 6 May 2012 10:22:24 +0000 (12:22 +0200)]
amdsbwd.4 & ichwd.4: Clean up SEE ALSO.

Also, bump the date to when it was brought in.

11 years agoisa.4: List amdsbwd(4) and ichwd(4).
Sascha Wildner [Sun, 6 May 2012 09:50:26 +0000 (11:50 +0200)]
isa.4: List amdsbwd(4) and ichwd(4).

11 years agoAdd a missing '-width' in various manpages' lists.
Sascha Wildner [Sun, 6 May 2012 09:32:52 +0000 (11:32 +0200)]
Add a missing '-width' in various manpages' lists.

11 years agoImport amdsbwd(4) from FreeBSD
Francois Tigeot [Thu, 3 May 2012 22:06:47 +0000 (00:06 +0200)]
Import amdsbwd(4) from FreeBSD

This is a device driver for the watchdog timer included in SB600
and more recent AMD south bridges.

11 years agortld: Utilize malloc capability of recently updated realpath
John Marino [Sat, 5 May 2012 16:10:56 +0000 (18:10 +0200)]
rtld: Utilize malloc capability of recently updated realpath

Now that DragonFly's realpath works like the FreeBSD version, rtld can
use the FreeBSD code without modification which is a little more
efficient.

11 years agorealpath(3): Upgrade to POSIX IEEE Std 1003.1-2008
John Marino [Sat, 5 May 2012 16:07:58 +0000 (18:07 +0200)]
realpath(3): Upgrade to POSIX IEEE Std 1003.1-2008

Recent updates to realpath implements some of the missing POSIX
functionality, but the requirement to allocate memory for the pointer
returned by the function when a null pointer is passed to the
resolved_path argument was missing.

The prototype changes in the following ways:
1.  The restrict type qualifier is added to both arguments
2.  The second argument changes from "char resolved[PATH_MAX]" to
    "char * resolved"

The new prototype is backwards-compatible with the old one.

This should bring realpath up to Open Group Specifications Issue 7
IEEE Std 1003.1-2008
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

Taken from:
FreeBSD SVN 206893 (20 APR 2010)
FreeBSD SVN 206898 (20 APR 2010)
FreeBSD SVN 217144 (08 JAN 2011)
FreeBSD SVN 227090 (04 NOV 2011)

11 years agokernel/crypto: Remove some unnecessary casts to the own type.
Sascha Wildner [Sat, 5 May 2012 08:25:39 +0000 (10:25 +0200)]
kernel/crypto: Remove some unnecessary casts to the own type.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Sat, 5 May 2012 08:01:30 +0000 (10:01 +0200)]
kernel: Remove some unused variables.

11 years agomps(4): Use a variable.
Sascha Wildner [Sat, 5 May 2012 07:47:28 +0000 (09:47 +0200)]
mps(4): Use a variable.

11 years agortld: Add two special directives to libmap.conf
John Marino [Fri, 4 May 2012 16:54:27 +0000 (18:54 +0200)]
rtld: Add two special directives to libmap.conf

include <file>:
    Parse the contents of file before continuing with the current file.

includedir <dir>:
    Parse the contents of every file in dir that ends in .conf before
    continuing with the current file.

Any file or directory encountered while processing include or includedir
directives will be parsed exactly once, even if it is encountered multiple
times.

Taken from FreeBSD SVN 234851 (30 APR 2012) with modification:

1) DragonFly realpath works differently than FreeBSD's and doesn't
   accept a null value for the resolved_path argument.
2) FreeBSD's debug lines reflect the wrong function, lm_init, instead
   of lmc_parse_file.  lmc_parse_dir also calls lmc_parse_file, so
   the debug message is definitely wrong and was corrected.
3) FreeBSD keeps using path even after determining realpath and putting
   the result in the rpath variable.  It uses path for debug messages
   and opening a file descriptor.  DragonFly doesn't use path again and
   only uses rpath after it is determined.
4) FreeBSD's lmc_parse_file code had a bug in the linked list used to
   track which conf files had already been parsed.  Memory for the
   filename was allocated so it wouldn't get overwritten after multiple
   passes, which is standard for the includedir functionality.

11 years agortld: Sync with FreeBSD after gnu_hash import
John Marino [Fri, 4 May 2012 16:41:58 +0000 (18:41 +0200)]
rtld: Sync with FreeBSD after gnu_hash import

For the most part, FreeBSD took our gnu_hash implementation without much
modification.  Most of these changes are caused by whitespace differences
due to a different style scheme, and by declarating variables separately
from their assignments.  Notable exceptions were:
* FreeBSD didn't use int_fast32_t type
* FreeBSD keeps checking the first character before doing strcmp
* FreeBSD renamed the symlook_obj2 to symlook_obj1_*

The only additions were two debug statements.  This commits syncs the
following back to DragonFly:

FreeBSD SVN 234840 (30 APR 2012)
FreeBSD SVN 234841 (30 APR 2012)

11 years agomake upgrade: Now that we have devfs, don't try to remove any /dev/*
Sascha Wildner [Fri, 4 May 2012 19:15:54 +0000 (21:15 +0200)]
make upgrade: Now that we have devfs, don't try to remove any /dev/*

11 years agotcp: Per-connection DupThresh
Sepherosa Ziehau [Fri, 4 May 2012 09:48:24 +0000 (17:48 +0800)]
tcp: Per-connection DupThresh

This eases implementing adaptive DupThresh algorithm, e.g. RFC4653

11 years agotcp: Disable aggressive rescue retransmission for SACK by default
Sepherosa Ziehau [Fri, 4 May 2012 04:58:22 +0000 (12:58 +0800)]
tcp: Disable aggressive rescue retransmission for SACK by default

It could cause medium spurious retransmit when segments are reordered
but not lost.

11 years agotcp: Dragging RescueRxt along with HighRxt should depend on tcp.rescuesack_agg
Sepherosa Ziehau [Fri, 4 May 2012 04:16:21 +0000 (12:16 +0800)]
tcp: Dragging RescueRxt along with HighRxt should depend on tcp.rescuesack_agg

11 years agotcp: Move useless DSACK detection before increasing dupacks
Sepherosa Ziehau [Fri, 4 May 2012 04:07:14 +0000 (12:07 +0800)]
tcp: Move useless DSACK detection before increasing dupacks

- Avoid the spurious retransmit in the following dump:
  http://leaf.dragonflybsd.org/~sephe/fast1.xpl (~9.755sec)
- Loosely meet the requirement of RFC3042: no new segments should be
  sent upon ACKs carrying useless SACK information
- Add sysctl net.inet.tcp.ignore_redun_dsack to disable useless
  DSACK detection; default on

11 years agokernel: Remove the unused HW_WDOG option.
Sascha Wildner [Thu, 3 May 2012 21:02:27 +0000 (23:02 +0200)]
kernel: Remove the unused HW_WDOG option.

11 years agokernel/wdog: Compile in kern_wdog.c by default.
Sascha Wildner [Thu, 3 May 2012 20:58:16 +0000 (22:58 +0200)]
kernel/wdog: Compile in kern_wdog.c by default.

Actually it was always compiled in by default but the code depended
on the WATCHDOG_ENABLED option which is not in the GENERIC kernels.

Simply remove the WATCHDOG_ENABLE option. The code is small, it does
nothing by default than initializing a lock, a /dev/wdog and a
callout, and it also makes it easier for people who want to use
ichwd(4) by simply kldloading it.

11 years agoImport ichwd(4) from FreeBSD
Francois Tigeot [Thu, 3 May 2012 07:22:27 +0000 (09:22 +0200)]
Import ichwd(4) from FreeBSD

This is a device driver for the watchdog timer function present on the
LPC interface bridge in Intel ICH-series chipsets.

11 years agokernel/ecc: Remove unneeded MFILES line in the Makefile.
Sascha Wildner [Thu, 3 May 2012 11:16:18 +0000 (13:16 +0200)]
kernel/ecc: Remove unneeded MFILES line in the Makefile.

Reported-by: ftigeot
11 years agoKernel: do not manipulate watchdog list if empty
François Tigeot [Thu, 3 May 2012 10:43:52 +0000 (12:43 +0200)]
Kernel: do not manipulate watchdog list if empty

Suggested-by: Alex Hornung
11 years agotcp: Ignore duplicate ACK carries useless DSACK
Sepherosa Ziehau [Thu, 3 May 2012 08:37:17 +0000 (16:37 +0800)]
tcp: Ignore duplicate ACK carries useless DSACK

This mainly used to avoid unnecessary early retransmit and fast
retransmit as show in the following two dumps:
http://leaf.dragonflybsd.org/~sephe/early.xpl (~4.8sec)
http://leaf.dragonflybsd.org/~sephe/fast.xpl (~12.35sec)

11 years agoUpdate to per-CPU hardware resources format.
Francois Tigeot [Wed, 2 May 2012 17:57:03 +0000 (19:57 +0200)]
Update to per-CPU hardware resources format.

11 years agotcp_var.h: White space cleanup
Sepherosa Ziehau [Wed, 2 May 2012 03:27:22 +0000 (11:27 +0800)]
tcp_var.h: White space cleanup

11 years agovmstat - Remove the busy_time == 0 hack
Matthew Dillon [Wed, 2 May 2012 03:06:44 +0000 (20:06 -0700)]
vmstat - Remove the busy_time == 0 hack

Remove a very old busy_time == 0 hack which assumed that a delta busy time
of 0 with transactions present simply meant that a transaction didn't
complete within one second and that the device was 100% busy.

In fact, disk devices are so fast these days (particularly SSDs) that it is
possible for many transactions to complete without causing the busy counter
to tick-over.  The device is more likely to be less than 1% busy.

This fixes the '% busy' display for e.g. 'systat -vm 1' to properly report
0% in these situations.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Wed, 2 May 2012 01:43:23 +0000 (18:43 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agokernel: Remove some bogus casts of NULL to something.
Sascha Wildner [Tue, 1 May 2012 17:48:16 +0000 (19:48 +0200)]
kernel: Remove some bogus casts of NULL to something.

11 years agohptmv(4): Remove an unneeded NULL check after M_WAITOK.
Sascha Wildner [Tue, 1 May 2012 14:04:40 +0000 (16:04 +0200)]
hptmv(4): Remove an unneeded NULL check after M_WAITOK.

11 years agokernel/plip: A little indent fix.
Sascha Wildner [Tue, 1 May 2012 13:12:05 +0000 (15:12 +0200)]
kernel/plip: A little indent fix.

11 years agokernel: Adjust some indentation.
Sascha Wildner [Tue, 1 May 2012 12:21:57 +0000 (14:21 +0200)]
kernel: Adjust some indentation.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Tue, 1 May 2012 09:48:27 +0000 (11:48 +0200)]
kernel: Remove some unused variables.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Mon, 30 Apr 2012 22:51:32 +0000 (15:51 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2

11 years agoHAMMER VFS - Only set B_CLUSTEROK on 64K buffers
Matthew Dillon [Mon, 30 Apr 2012 22:48:32 +0000 (15:48 -0700)]
HAMMER VFS - Only set B_CLUSTEROK on 64K buffers

* Only set B_CLUSETEROK on 64K buffers.  This should fix a fairly rare
  panic related to buffer size mismatches due to the bufdaemon crossing
  the 16K/64K buffer size boundary when clustering buffers.

11 years agokernel - Fix degenerate cluster_write() cases
Matthew Dillon [Mon, 30 Apr 2012 22:44:53 +0000 (15:44 -0700)]
kernel - Fix degenerate cluster_write() cases

* cluster_write() should bdwrite() as a fallback, not bawrite().

  Note that cluster_awrite() always bawrite()'s or equivalent.  The
  DragonFly API split the functions out, so cluster_write() can now
  almost always bdwrite() for the non-clustered case.

* Solves some serious performance and real-time disk space usage issues
  when HAMMER1 was updated to use the cluster calls.  The disk space
  would be recovered by the daily cleanup but the extra writes could
  end up being quite excessive, 25:1 unnecessary writes vs necessary
  writes.

Reported-by: multiple, testing by tuxillo
11 years agoRevert "kernel/vga: Remove some unneeded #ifdef/#define's."
Sascha Wildner [Mon, 30 Apr 2012 22:11:13 +0000 (00:11 +0200)]
Revert "kernel/vga: Remove some unneeded #ifdef/#define's."

This reverts commit 617e8b12b140696ebd906ac4c3e01ea56643c624.

Sorry, it wasn't unneeded at all.

11 years agokernel/vga: Remove some unneeded #ifdef/#define's.
Sascha Wildner [Mon, 30 Apr 2012 22:02:13 +0000 (00:02 +0200)]
kernel/vga: Remove some unneeded #ifdef/#define's.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Mon, 30 Apr 2012 20:24:01 +0000 (22:24 +0200)]
kernel: Remove some unused variables.

11 years agokernel: Remove some unused variables.
Sascha Wildner [Mon, 30 Apr 2012 18:02:58 +0000 (20:02 +0200)]
kernel: Remove some unused variables.

11 years agotcp: Implement part of Eifel Response Algorithm (RFC4015)
Sepherosa Ziehau [Sat, 28 Apr 2012 02:36:17 +0000 (10:36 +0800)]
tcp: Implement part of Eifel Response Algorithm (RFC4015)

It adapts the retransmission timer to avoid further spurious timeouts.

11 years agovquota.8: Remove extra .El
Sascha Wildner [Sun, 29 Apr 2012 18:21:44 +0000 (20:21 +0200)]
vquota.8: Remove extra .El

11 years agokernel: Use LIST_FOREACH in some places.
Sascha Wildner [Sun, 29 Apr 2012 12:12:00 +0000 (14:12 +0200)]
kernel: Use LIST_FOREACH in some places.

11 years agovquotactl.2: Add back a reference to loader.conf(5).
Sascha Wildner [Sat, 28 Apr 2012 20:42:08 +0000 (22:42 +0200)]
vquotactl.2: Add back a reference to loader.conf(5).

Add some words about the tunable, too.

Also adjust vquota(8)'s manpage in a similar manner.

11 years agovquotactl.2: Fix some small mdoc issues.
Sascha Wildner [Sat, 28 Apr 2012 19:57:52 +0000 (21:57 +0200)]
vquotactl.2: Fix some small mdoc issues.

11 years agoDocument the vquotactl() syscall
Francois Tigeot [Sat, 28 Apr 2012 19:25:40 +0000 (21:25 +0200)]
Document the vquotactl() syscall

11 years agonrelease: Build the git we ship on the LiveCD without Python support.
Sascha Wildner [Sat, 28 Apr 2012 18:23:23 +0000 (20:23 +0200)]
nrelease: Build the git we ship on the LiveCD without Python support.

This saves quite some space (>60MB) on the ISO.

11 years agomake upgrade: Don't remove /var/heimdal.
Sascha Wildner [Sat, 28 Apr 2012 11:41:10 +0000 (13:41 +0200)]
make upgrade: Don't remove /var/heimdal.

pkgsrc's heimdal package will create it, too.

11 years agokernel: Remove newlines from the panic messages that have one.
Sascha Wildner [Sat, 21 Apr 2012 09:03:04 +0000 (11:03 +0200)]
kernel: Remove newlines from the panic messages that have one.

panic() itself will add a newline.

11 years agoAdd tap(4) to LINT/LINT64.
Sascha Wildner [Sat, 28 Apr 2012 07:29:07 +0000 (09:29 +0200)]
Add tap(4) to LINT/LINT64.

11 years agotap(4): Use the number of instances from the kernel config file.
Sascha Wildner [Sat, 28 Apr 2012 07:28:35 +0000 (09:28 +0200)]
tap(4): Use the number of instances from the kernel config file.

11 years agomsgport: Implement dropmsg for spin port
Sepherosa Ziehau [Sat, 28 Apr 2012 01:45:54 +0000 (09:45 +0800)]
msgport: Implement dropmsg for spin port

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2354

11 years agoRemove some CLEANFILES in kernel module Makefiles.
Sascha Wildner [Fri, 27 Apr 2012 22:26:16 +0000 (00:26 +0200)]
Remove some CLEANFILES in kernel module Makefiles.

11 years agoUpdate files for OpenSSL-1.0.1b import.
Peter Avalos [Fri, 27 Apr 2012 19:42:09 +0000 (12:42 -0700)]
Update files for OpenSSL-1.0.1b import.

11 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Fri, 27 Apr 2012 19:39:35 +0000 (12:39 -0700)]
Merge branch 'vendor/OPENSSL'

11 years agoImport OpenSSL-1.0.1b.
Peter Avalos [Fri, 27 Apr 2012 19:35:59 +0000 (12:35 -0700)]
Import OpenSSL-1.0.1b.

      o Make FIPS capable OpenSSL ciphers work in non-FIPS mode.
      o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0

11 years agotcp: Update snd_last upon spurious timeout retransmission restore
Sepherosa Ziehau [Fri, 27 Apr 2012 08:15:55 +0000 (16:15 +0800)]
tcp: Update snd_last upon spurious timeout retransmission restore

According to RFC4015; mainly to avoid delay spike.

11 years agotcp: Fix window scaling for accecpted socket
Sepherosa Ziehau [Fri, 27 Apr 2012 06:49:07 +0000 (14:49 +0800)]
tcp: Fix window scaling for accecpted socket

- Retire tcpcb.requested_s_scale, use tcpcb.snd_scale directly.
- Set tcpcb.snd_wnd in SYN_SENT state only if the TCP flags contains SYN.
- Save other side advertised window into syncache, and setup tcpcb.snd_wnd
  according to the save value after the 3-way hand shake is done.
- Delay tiwin setup in tcp_input(), specificly after tcpcb.snd_scale is
  setup on the SO_ACCEPTCONN path.

This tends to fix the window scaling bug: when the sender accepts
connection and data only follow from sender to receiver.

11 years agoMerge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 26 Apr 2012 16:49:28 +0000 (09:49 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2