dragonfly.git
13 years agoiwi(4): Hook it into the build again and enable it everywhere else.
Sascha Wildner [Sun, 18 Jul 2010 16:24:45 +0000 (18:24 +0200)]
iwi(4): Hook it into the build again and enable it everywhere else.

13 years agoUpdate iwi(4) from FreeBSD.
Johannes Hofmann [Sat, 17 Jul 2010 10:16:09 +0000 (12:16 +0200)]
Update iwi(4) from FreeBSD.

13 years agosys/tools/fw_stub.awk: Change printf to kprintf as this is kernel code.
Sascha Wildner [Sun, 18 Jul 2010 16:04:13 +0000 (18:04 +0200)]
sys/tools/fw_stub.awk: Change printf to kprintf as this is kernel code.

Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1794>

13 years agorpcbind.3: Fix two more errors in the SYNOPSIS which I overlooked before
Sascha Wildner [Sun, 18 Jul 2010 14:18:49 +0000 (16:18 +0200)]
rpcbind.3: Fix two more errors in the SYNOPSIS which I overlooked before

13 years agoudev.3: Add final newline and remove extra space.
Sascha Wildner [Sun, 18 Jul 2010 10:31:25 +0000 (12:31 +0200)]
udev.3: Add final newline and remove extra space.

13 years agodevattr.3: Add final newline.
Sascha Wildner [Sun, 18 Jul 2010 10:31:11 +0000 (12:31 +0200)]
devattr.3: Add final newline.

13 years agorpcbind.3: Fix function declaration in the SYNOPSIS.
Sascha Wildner [Sun, 18 Jul 2010 10:28:48 +0000 (12:28 +0200)]
rpcbind.3: Fix function declaration in the SYNOPSIS.

13 years agoprop_*.[39]: Fix include path.
Sascha Wildner [Sun, 18 Jul 2010 10:26:08 +0000 (12:26 +0200)]
prop_*.[39]: Fix include path.

13 years agowpi - Remove unneeded WPI_UNLOCKs
Joe Talbott [Tue, 22 Jun 2010 01:08:10 +0000 (21:08 -0400)]
wpi - Remove unneeded WPI_UNLOCKs

13 years agokern_linker - Rearrange locking a bit for module loading.
Joe Talbott [Tue, 22 Jun 2010 01:14:28 +0000 (21:14 -0400)]
kern_linker - Rearrange locking a bit for module loading.

This was needed to get automatic firmware module loading to work
properly.

13 years agoifconfig.8: Re-add our documentation for the 'powersavemode' parameter.
Sascha Wildner [Sat, 17 Jul 2010 16:48:21 +0000 (18:48 +0200)]
ifconfig.8: Re-add our documentation for the 'powersavemode' parameter.

13 years ago<sys/_null.h>: Remove the #include guard.
Sascha Wildner [Sat, 17 Jul 2010 10:11:23 +0000 (12:11 +0200)]
<sys/_null.h>: Remove the #include guard.

POSIX states that various headers (such as <unistd.h>, <stddef.h>,
<string.h> etc.) all shall provide a definition of NULL. We do that
by including <sys/_null.h> in these headers.

The problem with the #include guard is that NULL will no longer be
defined if a program does something like this:

#include <stddef.h>
#undef NULL
#include <unistd.h>

<sys/_null.h>'s guard will still be defined and NULL is not getting
(re-)defined.

Therefore, remove the #include guard. It's just belt and suspenders
since there is an "#ifndef NULL" around everything in <sys/_null.h>
anyway.

In-discussion-with: beket

13 years agoudevd - Big memory and thread cleanup
Alex Hornung [Sat, 17 Jul 2010 08:49:20 +0000 (09:49 +0100)]
udevd - Big memory and thread cleanup

* Adjust read_xml() to allocate just the right size of memory, so we
  don't waste anything by allocating 12 MB per client, when the usual
  client xml is a few kB.

* Detach threads so that they can free resources whenever they return
  from their startup function.

* Release the memory associated with a particular iterator and with some
  of the fields in the event filters, which were previously leaking.

* Let the monitor thread check every few (2) seconds if the underlying
  connection is still alive. Previously the threads were staying around
  even after the connection was closed when no event (attach/detach)
  occured.

* Clean up the pdev array on a clean exit so it's easier to find memory
  leaks, since the amount of allocations done by proplib on behalf of
  the pdev stuff is huge.

* Incidentally, don't forget to update the pdev array when a device is
  detached.

Reported-by: Antonio Huete (tuxillo@)
13 years agolibdevattr - Visibility change, stop memory waste
Alex Hornung [Sat, 17 Jul 2010 08:46:10 +0000 (09:46 +0100)]
libdevattr - Visibility change, stop memory waste

* Change the visibility of some function prototypes in devattr.h to be
  only visible from within libdevattr (or when LIBDEVATTR_INTERNAL is
  specified).

* Stop wasting memory when reading the socket. Since we receive the size
  of the remaining data first, we can allocate exactly the right amount
  instead of wasting it big time by allocating 12MB no matter what.

13 years agoAdd support for $CCVER="clangsvn"
Sascha Wildner [Wed, 14 Jul 2010 08:14:26 +0000 (10:14 +0200)]
Add support for $CCVER="clangsvn"

This is for clang/llvm installed from SVN trunk to /usr/local
(which is its default location).

13 years agoBSD.include.dist: Use spaces for indentation.
Sascha Wildner [Tue, 13 Jul 2010 23:38:50 +0000 (01:38 +0200)]
BSD.include.dist: Use spaces for indentation.

13 years agolt(1): Change mode to 644.
Sascha Wildner [Tue, 13 Jul 2010 23:38:01 +0000 (01:38 +0200)]
lt(1): Change mode to 644.

13 years agolibdevmapper/liblvm: Also needs libdevattr
Matthew Dillon [Tue, 13 Jul 2010 21:56:06 +0000 (14:56 -0700)]
libdevmapper/liblvm: Also needs libdevattr

* liblvm's shared library generation also needs libdevattr.

* Add libdevattr to the prebuild list in Makefile.inc1.

Suggested-by: Alex Hornung
13 years agoudev_enumerate.3: Improve macro declaration a bit.
Sascha Wildner [Tue, 13 Jul 2010 13:57:31 +0000 (15:57 +0200)]
udev_enumerate.3: Improve macro declaration a bit.

13 years agoudev_enumerate.3: Some cleanup.
Sascha Wildner [Tue, 13 Jul 2010 13:38:29 +0000 (15:38 +0200)]
udev_enumerate.3: Some cleanup.

* Fix function name.

* Remove trailing whitespace.

* Add final newline.

13 years agoudev_{device,monitor}.3: Add final newline.
Sascha Wildner [Tue, 13 Jul 2010 13:37:34 +0000 (15:37 +0200)]
udev_{device,monitor}.3: Add final newline.

13 years agolibdevmapper/liblvm: Add SHLIB_MAJOR so we get the .so too.
Sascha Wildner [Tue, 13 Jul 2010 12:33:09 +0000 (14:33 +0200)]
libdevmapper/liblvm: Add SHLIB_MAJOR so we get the .so too.

13 years agoFix LINT build.
Sascha Wildner [Tue, 13 Jul 2010 12:31:27 +0000 (14:31 +0200)]
Fix LINT build.

13 years agowlan - Don't use M_NOWAIT in kmalloc() calls.
Joe Talbott [Mon, 12 Jul 2010 23:27:31 +0000 (19:27 -0400)]
wlan - Don't use M_NOWAIT in kmalloc() calls.

13 years agoaltq - Get rid of unneeded fields in struct altq.
Joe Talbott [Mon, 12 Jul 2010 23:23:27 +0000 (19:23 -0400)]
altq - Get rid of unneeded fields in struct altq.

This was incorrectly brought over from FreeBSD.

13 years agoral - Don't use M_NOWAIT in kmalloc() calls.
Joe Talbott [Mon, 12 Jul 2010 23:22:14 +0000 (19:22 -0400)]
ral - Don't use M_NOWAIT in kmalloc() calls.

13 years agowpi - Fix mbuf flags and kmalloc flags, plus refcount nodes.
Joe Talbott [Mon, 12 Jul 2010 23:06:02 +0000 (19:06 -0400)]
wpi - Fix mbuf flags and kmalloc flags, plus refcount nodes.

Use MB_xxx flags to mbuf API calls rather than M_xxx.

Don't use M_NOWAIT in kmalloc() calls.

Bring in some ieee80211_node reference counting as discussed on
the FreeBSD-Current mailing list recently.

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=178502+0+current/freebsd-current

Discussed-With: dillon

13 years agowlan - Fix mbuf handling when using encryption.
Joe Talbott [Mon, 12 Jul 2010 22:38:58 +0000 (18:38 -0400)]
wlan - Fix mbuf handling when using encryption.

Re-add a __FreeBSD__ only section of code that copies an mbuf chain to
a writtable version before encapsulating the packet.

Uses m_dup() since we don't have m_unshare() (yet).

Discussed-With: dillon

13 years agoRemove the old udevd binary (it's now in /sbin) via 'make upgrade.
Sascha Wildner [Mon, 12 Jul 2010 10:00:08 +0000 (12:00 +0200)]
Remove the old udevd binary (it's now in /sbin) via 'make upgrade.

13 years agoMakefile_upgrade.inc: Move some stuff to the right place.
Sascha Wildner [Mon, 12 Jul 2010 09:59:18 +0000 (11:59 +0200)]
Makefile_upgrade.inc: Move some stuff to the right place.

13 years agorc.conf - add lvm and udevd related settings
Alex Hornung [Sun, 11 Jul 2010 21:39:24 +0000 (22:39 +0100)]
rc.conf - add lvm and udevd related settings

13 years agorc.d - add lvm rc script
Alex Hornung [Sun, 11 Jul 2010 21:27:13 +0000 (22:27 +0100)]
rc.d - add lvm rc script

* Add an rc.d script for lvm taken from NetBSD.

* Drop the dependency of udevd on syslog since it's not critical anyways
* to avoid a circular dependency.

13 years agolibdevattr & udevd - add man pages
Alex Hornung [Sun, 11 Jul 2010 19:57:13 +0000 (20:57 +0100)]
libdevattr & udevd - add man pages

13 years agolibdm - restore libdm-netbsd.h
Alex Hornung [Sun, 11 Jul 2010 00:01:41 +0000 (01:01 +0100)]
libdm - restore libdm-netbsd.h

* libdm-netbsd.h was accidentally deleted a few commits ago

13 years agomkinitrd - improve man page a bit
Alex Hornung [Sat, 10 Jul 2010 23:06:44 +0000 (00:06 +0100)]
mkinitrd - improve man page a bit

* Mention the vfs.root.realroot loader tunable and how to use it,
  including the currently supported types of root.

13 years agoinitrd - minor fixes
Alex Hornung [Sat, 10 Jul 2010 15:13:37 +0000 (16:13 +0100)]
initrd - minor fixes

* mount the new root as read-only so that fsck doesn't complain and
  drop us to single-user mode.

* drop a few unnecessary tools from the initrd

* Remove a debug printf from the mini_init.

* Mount the device as read-only in rcmount_crypt since fsck and so on
  expect it that way.

13 years agolvm - use libdevattr for device cache checks
Alex Hornung [Sat, 10 Jul 2010 21:59:41 +0000 (22:59 +0100)]
lvm - use libdevattr for device cache checks

* Improve the device checking of devices that go into that cache and
  that don't by using libdevattr and the tagged stuff.

13 years agoudev - Tag some subsystems/drivers
Alex Hornung [Sat, 10 Jul 2010 09:12:35 +0000 (10:12 +0100)]
udev - Tag some subsystems/drivers

* While here, fix a number of bugs in the udev kernel implementation.

13 years agodm - Bind into build system, fix small problem
Alex Hornung [Fri, 9 Jul 2010 18:36:57 +0000 (19:36 +0100)]
dm - Bind into build system, fix small problem

* Bind into the kernel build system.

* Make cmd_fn static, so it doesn't interfere with udev's cmd_fn

13 years agoinitrd - Update for LVM root support
Alex Hornung [Wed, 7 Jul 2010 22:31:26 +0000 (23:31 +0100)]
initrd - Update for LVM root support

* Also add support for some generic mounting of local volumes
  (configured via the loader tunable vfs.root.realroot) and scriptable
  mounting of other kinds of volumes.

* Add some more tools to the default mkinitrd set

* Add support to mount crypt volumes

13 years agomkinitrd - add dm-related tools
Alex Hornung [Tue, 6 Jul 2010 22:19:55 +0000 (23:19 +0100)]
mkinitrd - add dm-related tools

13 years agovfs_conf - export vfs.root.realroot via sysctl
Alex Hornung [Wed, 7 Jul 2010 22:28:46 +0000 (23:28 +0100)]
vfs_conf - export vfs.root.realroot via sysctl

* export the tunable vfs.root.realroot via vfs.real_root sysctl.

13 years agolvm/dm - clean up debug, fix open bug
Alex Hornung [Fri, 9 Jul 2010 08:14:31 +0000 (09:14 +0100)]
lvm/dm - clean up debug, fix open bug

* Clean up debug code and change it to log_verbose, mostly. Also remove
  some of the older, now irrelevant, comments.

* For dm, add a sysctl and tunable to enable debugging (debug.dm_debug)

* in the dragonfly filter, open the device early enough, and definitely
  before closing it ;)

13 years agodm - General printout cleanup
Alex Hornung [Tue, 6 Jul 2010 19:58:36 +0000 (20:58 +0100)]
dm - General printout cleanup

13 years agodm_target_crypt - Make compatible with luks
Alex Hornung [Sun, 4 Jul 2010 22:02:17 +0000 (23:02 +0100)]
dm_target_crypt - Make compatible with luks

* Make dm_target_crypt compatible with cryptsetup+luks, or at least with
  the main features.

13 years agocryptsetup - Port to DragonFly
Alex Hornung [Thu, 8 Jul 2010 08:11:46 +0000 (09:11 +0100)]
cryptsetup - Port to DragonFly

13 years agocryptsetup - Delete unneeded files
Alex Hornung [Sun, 4 Jul 2010 19:56:02 +0000 (20:56 +0100)]
cryptsetup - Delete unneeded files

13 years agocryptsetup - add our READMEs
Alex Hornung [Sun, 4 Jul 2010 08:33:28 +0000 (09:33 +0100)]
cryptsetup - add our READMEs

13 years agoImport cryptsetup-1.1.2
Alex Hornung [Sun, 4 Jul 2010 08:21:46 +0000 (09:21 +0100)]
Import cryptsetup-1.1.2

13 years agolvm2 stuff - bind into build system
Alex Hornung [Sat, 3 Jul 2010 22:39:32 +0000 (23:39 +0100)]
lvm2 stuff - bind into build system

* Bind all the lvm2 stuff into the build system and get rid of useless
  lvm2tools.mk.

13 years agolibdm - fix two warnings
Alex Hornung [Sat, 3 Jul 2010 22:38:16 +0000 (23:38 +0100)]
libdm - fix two warnings

* Fix to warnings related to devname visibility.

libdm-dragonfly-iface foo3

13 years agodm - Add crypt target
Alex Hornung [Sun, 27 Jun 2010 01:10:19 +0000 (02:10 +0100)]
dm - Add crypt target

* Add an initial crypt target. It's WIP, full of bugs, but is a general
  outline of how I want to approach the crypt target for dm.

* As per Aggelos' recommendation, I'm using pbkdf2 and hmac sha from
  other crypto implementations instead of rolling my own, for good
  cryptography's sake :P

13 years agoinclude - Install dm includes
Alex Hornung [Wed, 2 Jun 2010 11:20:35 +0000 (11:20 +0000)]
include - Install dm includes

13 years agolvm2 - port to DragonFly
Alex Hornung [Thu, 8 Jul 2010 08:11:13 +0000 (09:11 +0100)]
lvm2 - port to DragonFly

13 years agodm - Port to DragonFly
Alex Hornung [Wed, 2 Jun 2010 10:13:06 +0000 (10:13 +0000)]
dm - Port to DragonFly

* port the device mapper kernel support to DragonFly

13 years agodm - Import verbatim from NetBSD
Alex Hornung [Tue, 27 Apr 2010 19:13:09 +0000 (19:13 +0000)]
dm - Import verbatim from NetBSD

13 years agoImport lvm2 from NetBSD
Alex Hornung [Wed, 2 Jun 2010 10:22:50 +0000 (10:22 +0000)]
Import lvm2 from NetBSD

13 years agoman(1): Lots of cleanup.
Sascha Wildner [Sun, 11 Jul 2010 09:21:43 +0000 (11:21 +0200)]
man(1): Lots of cleanup.

Remove 'register', ansify, remove dead code for Xenix and whatnot etc.

No functional changes.

Raise WARNS to 6.

13 years agoudevd - add pidfile & SIGTERM handler
Alex Hornung [Sat, 10 Jul 2010 15:13:00 +0000 (16:13 +0100)]
udevd - add pidfile & SIGTERM handler

* Add the creation of a pidfile and a SIGTERM handler that disposes of
  the pidfile.

* add pidfile to rc script

13 years agolibdevattr - install include
Alex Hornung [Sat, 10 Jul 2010 09:12:22 +0000 (10:12 +0100)]
libdevattr - install include

13 years agoudevd - bring into sbin, add rc script
Alex Hornung [Sat, 10 Jul 2010 08:41:40 +0000 (09:41 +0100)]
udevd - bring into sbin, add rc script

* Bring udevd into sbin so it can be used very early on, for example in
  the initrd environment.

* Add an rc script for udevd.

* Remove debugging flags from libdevattr Makefile

13 years agotmpfs - fix failing writes with no swap
Alex Hornung [Sat, 10 Jul 2010 21:10:27 +0000 (22:10 +0100)]
tmpfs - fix failing writes with no swap

* When no swap is available, tmpfs was trying to use bawrite, causing
  some further problems down the line. We avoid this by now forcing the
  use of buwrite() for this case (no swap).

Suggested-by: Matt Dillon
13 years agokernel - fix crash in smb mount
Nicolas Thery [Sat, 10 Jul 2010 08:43:31 +0000 (10:43 +0200)]
kernel - fix crash in smb mount

The samba kernel-side daemon smbiod is created with
kthread_create_compat().

Kernel threads created with kthread_create_compat() have no td_ucred, as
other kernel threads, but have td_proc != NULL because this function
under the hood forks the process 0.

prison_replace_wildcard() was assuming that if td_proc != NULL it is
dealing with a user thread that has a valid td_ucred thus causing a NULL
ptr dereference when operating on kthread_create_compat()-threads.

Reported-and-fixed-by: Tero Jaasko
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1790>

13 years agomkinitrd - make use of lt
Alex Hornung [Thu, 8 Jul 2010 21:36:57 +0000 (22:36 +0100)]
mkinitrd - make use of lt

13 years agolt - add new tree-like utility
Alex Hornung [Thu, 8 Jul 2010 21:24:02 +0000 (22:24 +0100)]
lt - add new tree-like utility

* lt shows the directory structure below some specified directory much
  like the tree utility does.

13 years agolibmd - add sha512, fix warnings in tests
Alex Hornung [Sun, 4 Jul 2010 13:05:58 +0000 (14:05 +0100)]
libmd - add sha512, fix warnings in tests

* Add a SHA512 implementation taken from sys/crypto/sha2.

* Fix the test driver warnings up to the set WARNS level.

13 years agolibc - correct pthread_once stub
Alex Hornung [Sun, 4 Jul 2010 22:37:18 +0000 (23:37 +0100)]
libc - correct pthread_once stub

* Make the pthread_once stub in libc work correctly.

* This fixes an issue with pthread_once not being called even once in
  libprop for programs not linked against lpthread.

Suggested-by: Simon 'corecode' Schubert
Obtained-from: NetBSD

13 years agokernel - skip PG_MARKER vm pages.
Matthew Dillon [Thu, 8 Jul 2010 05:15:05 +0000 (22:15 -0700)]
kernel - skip PG_MARKER vm pages.

* The contigmalloc code was improperly interpreting PG_MARKER
  VM pages, resulting in an infinite blocking condition.

13 years agodevfs(4): Remove a bogus assertion (nchildren is unsigned, hence can't be <0).
Sascha Wildner [Wed, 7 Jul 2010 15:45:06 +0000 (17:45 +0200)]
devfs(4): Remove a bogus assertion (nchildren is unsigned, hence can't be <0).

In-discussion-with: alexh

13 years agokernel - Fix altq for x86_64 vkernel build
Matthew Dillon [Wed, 7 Jul 2010 04:29:24 +0000 (21:29 -0700)]
kernel - Fix altq for x86_64 vkernel build

* Remove i386-conditionalization for TSC access
* Probably also fixes x864_64 normal kernel build too.

13 years agokernel - MPSAFE work - Basic tokenization for vkernel x86_64 pmap.c
Matthew Dillon [Wed, 7 Jul 2010 04:28:50 +0000 (21:28 -0700)]
kernel - MPSAFE work - Basic tokenization for vkernel x86_64 pmap.c

* Tokenize the vkernel x86_64 pmap.c file

13 years agokernel - MPSAFE work - Basic tokenization for vkernel i386 pmap.c
Matthew Dillon [Tue, 6 Jul 2010 04:31:09 +0000 (21:31 -0700)]
kernel - MPSAFE work - Basic tokenization for vkernel i386 pmap.c

* Tokenize the vkernel i386 pmap.c file
* Add minor documentation to x86_64 pmap.c

13 years agosys/conf/kmod.mk: Adjust the genassym stuff a wee bit.
Sascha Wildner [Tue, 6 Jul 2010 01:22:38 +0000 (03:22 +0200)]
sys/conf/kmod.mk: Adjust the genassym stuff a wee bit.

This should fix 'make -j X buildkernel'.

Reported-by: sephe
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1792>
Modeled-after: FreeBSD

13 years ago/usr/Makefile: Adjust to our new handling of the pkgsrc GIT repository.
Sascha Wildner [Mon, 5 Jul 2010 12:42:03 +0000 (14:42 +0200)]
/usr/Makefile: Adjust to our new handling of the pkgsrc GIT repository.

13 years agotop: Fix count of process states
Stathis Kamperis [Sun, 4 Jul 2010 06:19:44 +0000 (09:19 +0300)]
top: Fix count of process states

The count was not in correspondence with our enumeration constants
for the process states. For example, an "active" process could be
counted as "running".

Only tested with i386/UP :)

13 years agoacpi_{hp,thinkpad}.4: Fix sysctl names.
Sascha Wildner [Sun, 4 Jul 2010 19:07:30 +0000 (21:07 +0200)]
acpi_{hp,thinkpad}.4: Fix sysctl names.

13 years agoral.4: We don't have %U, so use %O for URLs for now.
Sascha Wildner [Sun, 4 Jul 2010 18:45:45 +0000 (20:45 +0200)]
ral.4: We don't have %U, so use %O for URLs for now.

13 years agoacpi_sony(4): Sync with FreeBSD.
Sascha Wildner [Sun, 4 Jul 2010 18:43:09 +0000 (20:43 +0200)]
acpi_sony(4): Sync with FreeBSD.

13 years agoacpi_sony.4: Fix sysctl names.
Sascha Wildner [Sun, 4 Jul 2010 18:36:38 +0000 (20:36 +0200)]
acpi_sony.4: Fix sysctl names.

13 years agoMake the loader load ehci.ko by default.
Sascha Wildner [Sun, 4 Jul 2010 15:50:44 +0000 (17:50 +0200)]
Make the loader load ehci.ko by default.

It seems to do more good than harm.

HOWEVER!

Unfortunately, There are systems that don't play nice with ehci. One
of my boxes, for example, won't reboot with ehci loaded.

Therefore, the behavior introduced with this commit can be disabled
by doing one of the following things:

1) 'unset ehci_load' from the loader prompt before booting.

2) Booting in 'safe mode'.

3) Putting 'hint.ehci.0.disabled=1' in /boot/loader.conf.

This is all modeled after the way the automatic loading of acpi.ko is
handled.

13 years agotest commit
Sascha Wildner [Sun, 4 Jul 2010 16:05:11 +0000 (18:05 +0200)]
test commit

13 years agomkinitrd(8): Strip binaries when copying so they will fit in the image.
Sascha Wildner [Sun, 4 Jul 2010 01:47:05 +0000 (03:47 +0200)]
mkinitrd(8): Strip binaries when copying so they will fit in the image.

While here, comment out a call of the tree utility which we don't have
in base.

13 years agoinitrd: /usr/share/initrd/sbin wasn't being created. Add it via mtree(8).
Sascha Wildner [Sun, 4 Jul 2010 01:45:25 +0000 (03:45 +0200)]
initrd: /usr/share/initrd/sbin wasn't being created. Add it via mtree(8).

This led to oinit being installed as a file named 'sbin'. Remove this
file via etc/Makefile (during 'make upgrade') so that with the next
upgrade the file is installed correctly.

13 years agostandards.7: Write some more and mention the default environment.
Sascha Wildner [Sat, 3 Jul 2010 23:54:30 +0000 (01:54 +0200)]
standards.7: Write some more and mention the default environment.

13 years agoAdd a few __printflike() and __scanflike() to various header files.
Sascha Wildner [Sat, 3 Jul 2010 20:35:42 +0000 (22:35 +0200)]
Add a few __printflike() and __scanflike() to various header files.

13 years agovinum(4): Use char for has_part since that's what we scanf() later on.
Sascha Wildner [Sat, 3 Jul 2010 20:35:04 +0000 (22:35 +0200)]
vinum(4): Use char for has_part since that's what we scanf() later on.

13 years agoUncomment vinum in LINT to have it covered by -Werror.
Sascha Wildner [Sat, 3 Jul 2010 20:34:04 +0000 (22:34 +0200)]
Uncomment vinum in LINT to have it covered by -Werror.

13 years agokernel - MPSAFE work - Basic tokenization for x86_64 pmap.c
Matthew Dillon [Sat, 3 Jul 2010 18:20:58 +0000 (11:20 -0700)]
kernel - MPSAFE work - Basic tokenization for x86_64 pmap.c

* Tokenize x86_64 pmap.c, it still needs documenting and cleanup
  like i386 pmap.c has.

13 years agokernel - MPSAFE work - Finish tokenizing vm_page.c
Matthew Dillon [Sat, 3 Jul 2010 18:19:26 +0000 (11:19 -0700)]
kernel - MPSAFE work - Finish tokenizing vm_page.c

* Finish tokenizing vm_page.c

* Certain global procedures, particular vm_page_hold() and vm_page_unhold(),
  are best called with the vm_token already held for implied non-blocking
  operation.

13 years agokernel - MPSAFE work - Add missing token release
Matthew Dillon [Sat, 3 Jul 2010 18:16:54 +0000 (11:16 -0700)]
kernel - MPSAFE work - Add missing token release

* Add a missing token release in a rare code path.

13 years agolinux emu - MPSAFE work
Alex Hornung [Sat, 3 Jul 2010 17:40:10 +0000 (18:40 +0100)]
linux emu - MPSAFE work

* Reduce the uses of the mplock to a bare minimum, such as when calling
  exit1.

* Change the emuldata lock to lockmgr; it shouldn't have been mplock in
  the first place.

* Reduce the scope locked by the emuldata lock as much as possible.

13 years agokmod.mk - attempt to enable use of assym for kmods
Alex Hornung [Sat, 3 Jul 2010 17:38:21 +0000 (18:38 +0100)]
kmod.mk - attempt to enable use of assym for kmods

* Half-working attempt at being able to use assym.s in kernel modules
  when doing a 'make' in the directory of the module. It will now fail
  because of opt_nfs.h being included by nfs.h, included by genassym.c
  not being found.

Obtained-from: FreeBSD

13 years agosk(4): Initialize if_multiaddrs (in ether_ifattach), before touching it
Sepherosa Ziehau [Sat, 3 Jul 2010 05:30:11 +0000 (13:30 +0800)]
sk(4): Initialize if_multiaddrs (in ether_ifattach), before touching it

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1789

13 years agokernel - hold MP lock in idlezero for now
Matthew Dillon [Sat, 3 Jul 2010 02:07:14 +0000 (19:07 -0700)]
kernel - hold MP lock in idlezero for now

* The MP lock must be held in the idlezero code for now until tokenization
  is finished on the rest of the code base.

* Fixes random memory corruption which could occur when idlezero was
  turned on.

13 years agounmount - fix issue with process refs on unmount
Alex Hornung [Fri, 2 Jul 2010 20:29:17 +0000 (21:29 +0100)]
unmount - fix issue with process refs on unmount

* The p_textnch introduction made this issue appear, as some processes
  are still alive at system shutdown and their p_textnch were holding
  these references to the mount nch.

* On unmount of a filesystem we now scan all active processes for procs
  whose p_textnch is related to the mountpoint we are getting rid of,
  and release these.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1708
Special-Thanks-To: Antonio Huete (tuxillo@) for identifying the
offending commit and extensive testing

13 years agomkinitrd.8: Remove some trailing whitespace.
Sascha Wildner [Fri, 2 Jul 2010 20:37:22 +0000 (22:37 +0200)]
mkinitrd.8: Remove some trailing whitespace.

13 years agoRemove opt_global.h inclusion, it is included by default.
Sascha Wildner [Thu, 1 Jul 2010 16:54:49 +0000 (18:54 +0200)]
Remove opt_global.h inclusion, it is included by default.

13 years agoif_detach(): Fix unoptimized compilation without ALTQ in the config.
Sascha Wildner [Thu, 1 Jul 2010 16:51:26 +0000 (18:51 +0200)]
if_detach(): Fix unoptimized compilation without ALTQ in the config.

altq_disable() and altq_detach() aren't available until ALTQ is configured
and compilation with -O0 failed linking.

$deity knows why this worked when building optimized (our default).

13 years agomkinitrd.8: Remove empty line.
Sascha Wildner [Thu, 1 Jul 2010 16:03:08 +0000 (18:03 +0200)]
mkinitrd.8: Remove empty line.

13 years agomkinitrd(8): Miscellaneous permission related clean up.
Sascha Wildner [Thu, 1 Jul 2010 15:24:48 +0000 (17:24 +0200)]
mkinitrd(8): Miscellaneous permission related clean up.

Also, rename mkinitrd -> mkinitrd.sh in src/ so it is easy to recognize
as a script. Our build infrastructure will handle installing it without
the suffix.