dragonfly.git
14 years agoDEVFS - Fix asynchronous race on reprobe, remove devfs_msg id, cleanup
Matthew Dillon [Fri, 7 Aug 2009 17:39:24 +0000 (10:39 -0700)]
DEVFS - Fix asynchronous race on reprobe, remove devfs_msg id, cleanup

* The synchronous DISK_DISK_REPROBE and DISK_SLICE_REPROBE messages
  return while make_dev devices are still queued to devfs.  Add
  a call to devfs_config() to wait for the creation of those devices
  to finish before returning.

  This fixes numerous problems with shell scripts which fdisk + disklabel +
  newfs in a batch.

* Remove devfs_msg->id, also fixing an issue where the id was retrieves
  after the message is freed.  Async entry points now return void instead
  of the id.

* Adjust devfs_msg_send() to execute the message directly if the calling
  thread is the devfs message thread.  This is not strictly needed right
  now but may be used in the future.

* General cleanup.

14 years agoKernel mtx - Add mtxsleep(), interlocked tsleep w/ mutexes
Matthew Dillon [Fri, 7 Aug 2009 06:09:19 +0000 (23:09 -0700)]
Kernel mtx - Add mtxsleep(), interlocked tsleep w/ mutexes

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 7 Aug 2009 01:44:55 +0000 (18:44 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoDEVFS - vknetd - Change default socket path from /dev/vknet to /var/run/vknet
Matthew Dillon [Fri, 7 Aug 2009 01:43:55 +0000 (18:43 -0700)]
DEVFS - vknetd - Change default socket path from /dev/vknet to /var/run/vknet

Move the default socket path to something not inside /dev.

14 years agokern_memio - fix check for zerodev to fix memory mappings
Alex Hornung [Thu, 6 Aug 2009 23:00:05 +0000 (00:00 +0100)]
kern_memio - fix check for zerodev to fix memory mappings

* Change iszerodev() to check against a saaved cdev_t returned by
  the make_dev creating /dev/zero instead of relying on some
  major/minor magic.

* This fixes a problem when running mono, which caused a segfault
  on memset().

Reported-By: Hasso Tepper
Reported-By: Matthew Dillon
14 years agomtree: No need to create the /dev/fd/ directory anymore.
Sascha Wildner [Thu, 6 Aug 2009 22:02:15 +0000 (00:02 +0200)]
mtree: No need to create the /dev/fd/ directory anymore.

14 years agoMakefile_upgrade.inc: Fix paths.
Sascha Wildner [Thu, 6 Aug 2009 21:34:30 +0000 (23:34 +0200)]
Makefile_upgrade.inc: Fix paths.

14 years agofchmodat.2: Fix MLINKS
Sascha Wildner [Thu, 6 Aug 2009 21:11:43 +0000 (23:11 +0200)]
fchmodat.2: Fix MLINKS

14 years agoDEVFS - Cleanup of devfs_core, devfs_rules and devfs_vfsops
Alex Hornung [Thu, 6 Aug 2009 19:18:53 +0000 (20:18 +0100)]
DEVFS - Cleanup of devfs_core, devfs_rules and devfs_vfsops

14 years agoDEVFS - Code Cleanup
Matthew Dillon [Thu, 6 Aug 2009 17:09:01 +0000 (10:09 -0700)]
DEVFS - Code Cleanup

14 years agoDEVFS - Code cleanup.
Matthew Dillon [Thu, 6 Aug 2009 16:52:42 +0000 (09:52 -0700)]
DEVFS - Code cleanup.

* Syntax, indentation, structure, and minor code changes to make it
  more readable.

14 years agoDEVFS - add vfs ops fhtovp, vptofh and vget
Alex Hornung [Thu, 6 Aug 2009 12:34:45 +0000 (13:34 +0100)]
DEVFS - add vfs ops fhtovp, vptofh and vget

* Add fhtovp and vptofh vfs ops in devfs_vfsops.c, which also fix
  an issue with coredumps. The issue was that, whenever a core
  dump should be generated of an image with a /dev/* node open,
  vptofh would return EOPNOTSUPP and hence the generated core
  would be 0 bytes.

* Add helper function for fhtovp, devfs_inode_to_vnode and
  family to devfs_core.c

* Also add vget vfs op, using the same mechanism as fhtovp.

Reported-By: Hasso Tepper
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 6 Aug 2009 15:00:37 +0000 (08:00 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agogetdevpath - support API moved to <fstab.h>
Matthew Dillon [Thu, 6 Aug 2009 15:00:21 +0000 (08:00 -0700)]
getdevpath - support API moved to <fstab.h>

14 years agoRevert "mount - Add missing LDADD and #include"
Alex Hornung [Thu, 6 Aug 2009 12:35:49 +0000 (13:35 +0100)]
Revert "mount - Add missing LDADD and #include"

This reverts commit 891d9aee856c439ef8fc18f5ee7ab785b6c7c899.

14 years agomount - Add missing LDADD and #include
Alex Hornung [Thu, 6 Aug 2009 11:13:16 +0000 (12:13 +0100)]
mount - Add missing LDADD and #include

In mount.c, libutil.h was not being included, but getdevpath() is
used.
Also, -lutil was missing for the link stage.

14 years agosubr_disk - Use serializing tokens for disklist acceses
Alex Hornung [Thu, 6 Aug 2009 08:12:30 +0000 (09:12 +0100)]
subr_disk - Use serializing tokens for disklist acceses

Add the use of lwkt serializing tokens for every operation on the
disklist to avoid possible races.

Reported-By: Antonio Huete
14 years agoDEVFS - Use dyn. memory for alias and clone handler
Alex Hornung [Thu, 6 Aug 2009 07:46:47 +0000 (08:46 +0100)]
DEVFS - Use dyn. memory for alias and clone handler

Change the ->name element for both alias and clone handler structs
to use dynamic memory, allocated just after allocation of the
structs.
Also fix a problem in devfs_make_alias_worker() which would have
caused a warning and non-creation of alias in case one requested
creation of da0 after da0s1a because of a missing length check.

Reported-By: Matthew Dillon
14 years agoadd fchmodat(2) system call
Nicolas Thery [Wed, 5 Aug 2009 20:05:00 +0000 (22:05 +0200)]
add fchmodat(2) system call

Add also its libc_r wrapper and man page.

14 years agoDEVTAB - Add devtab support for manual mounts
Matthew Dillon [Thu, 6 Aug 2009 05:06:13 +0000 (22:06 -0700)]
DEVTAB - Add devtab support for manual mounts

* 2-argument mounts now do a devtab lookup on the device being mounted,
  similar to the lookup done by the fstab scanning code.

14 years agoNFS - Fix crash on client on write attempt to ro fs. Fix ro-test on server.
Matthew Dillon [Thu, 6 Aug 2009 02:58:53 +0000 (19:58 -0700)]
NFS - Fix crash on client on write attempt to ro fs.  Fix ro-test on server.

* A NFS client attempting to create a file would crash on a read-only NFS
  mount instead of returning EROFS.  The bug was introduced with the nfsm
  commit.

* A NFS server was improperly allowing certain modifying operations through.

14 years agoDEVTAB - Add mountroot & fstab support for serial numbers, and devtab.
Matthew Dillon [Thu, 6 Aug 2009 02:37:53 +0000 (19:37 -0700)]
DEVTAB - Add mountroot & fstab support for serial numbers, and devtab.

* The vfs.root.mountfrom /boot/loader.conf variable may now specify
  devfs aliases, allowing it to specify root mounts by serial number.
  Here is an example:

    vfs.root.mountfrom="hammer:serno/L41JYE0G.s1d"

  Note that vfs.root.mountfrom may NOT currently specify /etc/devtab labels.

* /etc/fstab may now specify devfs relative paths (such as serial numbers)
  as well as /etc/devtab labels.  A ".suffix" may be used to extend the
  translation so /etc/devtab only needs to specify the base label.

  Example /etc/fstab:

    # Device                Mountpoint FStype  Options  Dump    Pass
    #
    driveA.s1d              /          hammer  rw       1       1
    driveA.s1b              none       swap    sw       0       0
    driveA.s1a              /boot      ufs     rw       1       1
    serno/L41JYE0G.s1d      /fubar     hammer  rw       1       1

   /etc/devtab:

    driveA          serno   L41JYE0G

14 years agoDEVFS - Cleanup, remove debug messages.
Matthew Dillon [Thu, 6 Aug 2009 00:42:05 +0000 (17:42 -0700)]
DEVFS - Cleanup, remove debug messages.

14 years agoDEVFS - Remove numerous leftovers of the old device code.
Matthew Dillon [Thu, 6 Aug 2009 00:30:32 +0000 (17:30 -0700)]
DEVFS - Remove numerous leftovers of the old device code.

* Remove hashdev(), make_adhoc_dev(), make_sub_dev(), cdev_terminate(),
 dkmodpart(), and dkmodslice().

* Minor cleanup of pty code.

14 years agoDEVFS - Remove use of make_adhoc_dev() by keyboard driver
Matthew Dillon [Thu, 6 Aug 2009 00:13:23 +0000 (17:13 -0700)]
DEVFS - Remove use of make_adhoc_dev() by keyboard driver

* Record the cdev_t for later detach instead of using make_adhoc_dev()
  to look it up.

* Clean the code up a bit.

14 years agoDEVFS - Use v_associate_rdev; fix vcount/count_dev
Alex Hornung [Wed, 5 Aug 2009 22:41:54 +0000 (23:41 +0100)]
DEVFS - Use v_associate_rdev; fix vcount/count_dev

to avoid trouble with both vrevoke() and the drm code which calls
vm_mmap, which in turn expects a vnode as handle, but drm only has
a cdev. If associate_rdev is used, the cdev will have a list of
vnodes currently in use  associated with it.

- This fixes a problem with drm which caused a panic when used.

- count_dev, which is used by vcount, now returns the vnodes'
opencount instead of the number of references.

Reported-By: Johannes Hofmann
14 years agoRemove various references to MAKEDEV(8).
Sascha Wildner [Wed, 5 Aug 2009 22:47:10 +0000 (00:47 +0200)]
Remove various references to MAKEDEV(8).

14 years agoRemove some devices.conf(5) and MAKEDEV(8) related stuff.
Sascha Wildner [Wed, 5 Aug 2009 22:05:23 +0000 (00:05 +0200)]
Remove some devices.conf(5) and MAKEDEV(8) related stuff.

devices.conf(5) functionality will likely be replaced by running
devfsctl on startup.

14 years agomount_devfs/devfsctl: Until we have manpages, don't install wrong ones.
Sascha Wildner [Wed, 5 Aug 2009 21:28:50 +0000 (23:28 +0200)]
mount_devfs/devfsctl: Until we have manpages, don't install wrong ones.

14 years agoDEVFS - Adjust the vkernel to use if_tap's autocloning feature.
Matthew Dillon [Wed, 5 Aug 2009 19:42:52 +0000 (12:42 -0700)]
DEVFS - Adjust the vkernel to use if_tap's autocloning feature.

14 years agoDEVFS - Fix the TAP device. Auto-cloning and old-style iteration both work now.
Matthew Dillon [Wed, 5 Aug 2009 19:42:23 +0000 (12:42 -0700)]
DEVFS - Fix the TAP device.  Auto-cloning and old-style iteration both work now.

14 years agoDEVFS - Fix bug in devfs_clone_bitmap_set() (xor -> &= ~)
Matthew Dillon [Wed, 5 Aug 2009 19:34:06 +0000 (12:34 -0700)]
DEVFS - Fix bug in devfs_clone_bitmap_set() (xor -> &= ~)

14 years agoDEVFS - add make_autoclone_dev to take of clone initializing for devs
Alex Hornung [Wed, 5 Aug 2009 19:25:42 +0000 (20:25 +0100)]
DEVFS - add make_autoclone_dev to take of clone initializing for devs

by creating the device with the right miinor, initing the clone bitmap
and registering the clone handler. Also fix up all users of cloning
to use this new API.

14 years agoDEVFS - change the rdev allocator to consider minor
Alex Hornung [Wed, 5 Aug 2009 18:29:45 +0000 (19:29 +0100)]
DEVFS - change the rdev allocator to consider minor

Add a unique id to each dev ops in use and use this one and the minor
to construct the rdev.

14 years agomount_devfs(8): Clean up C++ comments and comment out an unused variable.
Sascha Wildner [Wed, 5 Aug 2009 19:18:05 +0000 (21:18 +0200)]
mount_devfs(8): Clean up C++ comments and comment out an unused variable.

14 years agoBump __DragonFly_version after devfs import
Alex Hornung [Wed, 5 Aug 2009 14:48:44 +0000 (15:48 +0100)]
Bump __DragonFly_version after devfs import

Requested-by: Hasso Tepper
14 years agodevfsctl - Default to debug build; add to buildworld
Alex Hornung [Wed, 5 Aug 2009 11:38:09 +0000 (12:38 +0100)]
devfsctl - Default to debug build; add to buildworld

Added devfsctl as a subdir for usr.sbin during buildworld.
Enable DEBUG_FLAGS by default when building devfsctl so
it is easier to debug when a problem arises.

14 years agodevfsctl - Cleanup of usage() and its callers
Alex Hornung [Wed, 5 Aug 2009 11:20:04 +0000 (12:20 +0100)]
devfsctl - Cleanup of usage() and its callers

Check if any action was performed, and if not, show  a usage message
to point the user in the right direction of how to use this.
Also remove one indentation tab to make messages easier to read.
Also fix some usage printf issues (missing spaces)

14 years agoDEVFS - Avoid showing devfs aliases to hidden nodes
Alex Hornung [Wed, 5 Aug 2009 11:17:10 +0000 (12:17 +0100)]
DEVFS - Avoid showing devfs aliases to hidden nodes

Aliases (auto-links) that point to a hidden devfs_node won't be
shown in the directory listing.

14 years agodevfsctl - Add userfriendliness; correct #include
Alex Hornung [Wed, 5 Aug 2009 10:50:06 +0000 (11:50 +0100)]
devfsctl - Add userfriendliness; correct #include

Include path was incorrect and required manual mangling. Added
some userfriendliness by printing a more or less useful usage
message.

14 years agoDEVFS - Avoid hiding of /dev/devfs
Alex Hornung [Wed, 5 Aug 2009 02:27:58 +0000 (03:27 +0100)]
DEVFS - Avoid hiding of /dev/devfs

Avoid applying a HIDE rule on /dev/devfs so that one can always
add/clear/reset/apply rules, even after a "* HIDE" rule.

14 years agodevfsctl - Sync up to devfs_rule changes (dynamic memory for strings)
Alex Hornung [Wed, 5 Aug 2009 01:41:48 +0000 (02:41 +0100)]
devfsctl - Sync up to devfs_rule changes (dynamic memory for strings)

Update devfsctl to match the changes in the kernel related to the switch
to dynamically allocated memory for strings in devfs_rule.

14 years agoDEVFS - Cleanup of dead functions/comments; various fixes
Alex Hornung [Wed, 5 Aug 2009 01:10:20 +0000 (02:10 +0100)]
DEVFS - Cleanup of dead functions/comments; various fixes

Cleanup of dead functions and structures and cleanup of C++-style
comments.
Fixes include:
- function devfs_node_is_accessible, which checks if the node is valid
and if it isn't a hidden node.
- calls to devfs_node_is_accessible from most vnops to ensure validity
of the devfs_node they operate on.
- Change of devfs_rule struct to use dynamically allocated memory
instead of using pre-sized buffers. This way we avoid wasting a lot
of memory for each devfs_rule.

14 years agoDEVFS - Cleanup of C++-style comments in subr_diskslice
Alex Hornung [Wed, 5 Aug 2009 01:08:42 +0000 (02:08 +0100)]
DEVFS - Cleanup of C++-style comments in subr_diskslice

Remove or replace all C++-style comments (//) by standard C-style
comments (/* */)

14 years agovcons - Cleanup of leftover kprintfs in vconsole driver
Alex Hornung [Wed, 5 Aug 2009 01:07:23 +0000 (02:07 +0100)]
vcons - Cleanup of leftover kprintfs in vconsole driver

These kprintfs were introduced during initial stages of devfs development
and are now obsolete.

14 years agoDEVFS - Add serial number links for all CAM and NATA attachments.
Matthew Dillon [Wed, 5 Aug 2009 01:36:02 +0000 (18:36 -0700)]
DEVFS - Add serial number links for all CAM and NATA attachments.

All CAM-probed drives and NATA probed drives which have a serial number
will now show up in DEVFS under /dev/serno, in addition to showing up
as da/cd/ad*.  This will ultimately tie into /etc/devtab.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 5 Aug 2009 00:01:11 +0000 (17:01 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agokernel module loader - fix load dependencies from preload modules by kernel
Matthew Dillon [Tue, 4 Aug 2009 23:58:09 +0000 (16:58 -0700)]
kernel module loader - fix load dependencies from preload modules by kernel

The boot loader is supposed to load module dependencies but it misses
a few when e.g. 'snd_hda' is specified in loader.conf.  This resulted
in the kernel itself trying to load the missing dependencies, but the
kernel was running the sysinits for those dependencies immediately during
the preload stage instead of registering them.

Pass a flag to the loader chain to register the sysinits instead of
running them if a dependency is loaded during the preload stage.  This
fixes the problem.  And also, by the way, the loader does not need to
load dependencies any more (though it still does).

Reported-by: corecode, swildner
14 years agoMerge branch 'master' of ssh://alexh@crater.dragonflybsd.org/repository/git/dragonfly
Alex Hornung [Tue, 4 Aug 2009 21:50:27 +0000 (22:50 +0100)]
Merge branch 'master' of ssh://alexh@crater.dragonflybsd.org/repository/git/dragonfly

14 years agoMerge branch 'devfs' of ssh://alexh@leaf.dragonflybsd.org/~/git/dragonfly
Alex Hornung [Tue, 4 Aug 2009 21:45:52 +0000 (22:45 +0100)]
Merge branch 'devfs' of ssh://alexh@leaf.dragonflybsd.org/~/git/dragonfly

14 years agotest commit
Alex Hornung [Tue, 4 Aug 2009 21:10:52 +0000 (22:10 +0100)]
test commit

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 4 Aug 2009 20:17:22 +0000 (13:17 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agogzip - Fix stack underflow, exit on path too long
Matthew Dillon [Tue, 4 Aug 2009 20:16:22 +0000 (13:16 -0700)]
gzip - Fix stack underflow, exit on path too long

* Fix a stack underflow issue (from Xin LI <delphij@delphij.net>)

* errx if the path is too long for gzip to properly add or remove a suffix,
  instead of truncating the path.

14 years agoMOUNTCTL - Adjust the hammer and null filesystems to work with the new mountctl
Matthew Dillon [Tue, 4 Aug 2009 20:05:14 +0000 (13:05 -0700)]
MOUNTCTL - Adjust the hammer and null filesystems to work with the new mountctl

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 4 Aug 2009 19:56:29 +0000 (12:56 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoMOUNTCTL - Add MOUNTCTL_MOUNTFLAGS, create vop_stdmountctl() as default.
Matthew Dillon [Tue, 4 Aug 2009 19:55:00 +0000 (12:55 -0700)]
MOUNTCTL - Add MOUNTCTL_MOUNTFLAGS, create vop_stdmountctl() as default.

Submitted-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
14 years agoMerge commit 'crater/master' into devfs
Matthew Dillon [Tue, 4 Aug 2009 17:47:36 +0000 (10:47 -0700)]
Merge commit 'crater/master' into devfs

14 years agoDEVFS - Add required call to devfs_tracer_orphan_count() back in
Matthew Dillon [Tue, 4 Aug 2009 17:46:54 +0000 (10:46 -0700)]
DEVFS - Add required call to devfs_tracer_orphan_count() back in

14 years agoDEVFS - Remove debugging
Matthew Dillon [Tue, 4 Aug 2009 17:39:22 +0000 (10:39 -0700)]
DEVFS - Remove debugging

14 years agoDEVFS - Fix NULL ptr deref when reclaiming unlinked devfs_node.
Matthew Dillon [Tue, 4 Aug 2009 17:38:04 +0000 (10:38 -0700)]
DEVFS - Fix NULL ptr deref when reclaiming unlinked devfs_node.

14 years agoDEVFS - Remove /dev/MAKEDEV* when upgrading.
Matthew Dillon [Tue, 4 Aug 2009 17:19:48 +0000 (10:19 -0700)]
DEVFS - Remove /dev/MAKEDEV* when upgrading.

14 years agoDEVFS - change /dev/pci0 to just /dev/pci (fixes X)
Matthew Dillon [Tue, 4 Aug 2009 17:08:10 +0000 (10:08 -0700)]
DEVFS - change /dev/pci0 to just /dev/pci (fixes X)

14 years agoDEVFS - Fix a bug in devfsctl and devfs_rules
Alex Hornung [Tue, 4 Aug 2009 12:30:03 +0000 (12:30 +0000)]
DEVFS - Fix a bug in devfsctl and devfs_rules

in devfs_rules, a double-lock (lockmgr against lockmgr) lock
occured when adding a link, as the rule would be checked again
from inside the rule check.
Also in devfs_rules, apply brackets to ensure priority as
intended for operators.
in devfsctl, the strlen() of the wrong variable was used.

14 years agoDEVFS - rollup - Userland, nrelease, and installer
Matthew Dillon [Tue, 4 Aug 2009 04:44:57 +0000 (21:44 -0700)]
DEVFS - rollup - Userland, nrelease, and installer

* Remove MAKEDEV and MAKEDEV use in the build system.

* Add a new libc function fdevname() taking a file descriptor and
  returning the device name.

* Remove the MFS /dev for the CD and adjust the nrelease build system
  to use devfs.

* Installer adjustments:  PFI search path, remove device node maker
  (it is non-applicable with devfs).

* Add mount_devfs to the build Makefile.

* Change dhclient to use an auto-cloning bpf.

* The VN device now uses labels by default, and no longer supports
  non-label configurations (though you can of course ignore the label
  area and just r/w the raw device anyway).

Submitted-by: Alex Hornung <ahornung@gmail.com>, and Matthew Dillon
14 years agoDEVFS - rollup - all kernel devices
Matthew Dillon [Tue, 4 Aug 2009 04:42:54 +0000 (21:42 -0700)]
DEVFS - rollup - all kernel devices

* Make changes needed to kernel devices to use devfs.

* Also pre-generate some devices (usually 4) to support system utilities
  which do not yet deal with the auto-cloning device support.

* Adjust the spec_vnops for various filesystems to vector to dummy
  code for read and write, for VBLK/VCHR nodes in old filesystems
  which are no longer supported.

Submitted-by: Alex Hornung <ahornung@gmail.com>
14 years agoDEVS - rollup - kernel core
Matthew Dillon [Tue, 4 Aug 2009 04:38:47 +0000 (21:38 -0700)]
DEVS - rollup - kernel core

* Remove dead code.

* Reference count adjustments for devfs.

* DEVFS integration into kernel core, including automatic probe/reprobe.

* Dummy vnops support for deprecated VCHR and VBLK devices in filesystems.

* Silence MBR warnings for VN with DSO_MBRQUIET flag.

* Change rootdevnames for CD boot.  DEVFS provides e.g. "cd0", "cd0s0".
  The old compatibility-slice partition "c" names are no longer generated
  and have been removed.

Submitted-by: Alex Hornung <ahornung@gmail.com>, and Matthew Dillon
14 years agoDEVFS - rollup, namecache invalidation
Matthew Dillon [Tue, 4 Aug 2009 04:34:12 +0000 (21:34 -0700)]
DEVFS - rollup, namecache invalidation

* Add convenient way to clean out negative namecache entries by simply
  incrementing a generation number in the mount structure.  Used by DEVFS.

14 years agoDEVFS - Remove specfs from the build proper.
Matthew Dillon [Tue, 4 Aug 2009 04:31:17 +0000 (21:31 -0700)]
DEVFS - Remove specfs from the build proper.

14 years agoDEVFS - Rollup
Matthew Dillon [Tue, 4 Aug 2009 04:23:30 +0000 (21:23 -0700)]
DEVFS - Rollup

* Use a dynamically sized dirent structure for devfs_nodes, saving a lot
  of memory.

* Fix m_* lexical space overloading issues.

* Fix issues with numerous uninitialized fields.

* Completely initialize the devfs_node before making it visible to
  userland.

* Properly invalidate negative entries in the namecache when adding new
  devfs nodes.  Also properly recycle disconnected vnodes.

* Properly disassociate a devfs node from its vnode when freeing the
  devfs node.

* Clarify device reference counts and fix a bug or two.

* Get reprobes working.  Sniff writes and automatically reprobe the
  whole disk or a particular slice on close() if the MBR or label area
  is modified.

* Fix memory leak when mounting/umounting devfs.

Submitted-by: Alex Hornung <ahornung@gmail.com>
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 4 Aug 2009 04:18:44 +0000 (21:18 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoGCC-4.4: Fix improper object placement in (potentially read-only) src.
Matthew Dillon [Tue, 4 Aug 2009 01:14:10 +0000 (18:14 -0700)]
GCC-4.4: Fix improper object placement in (potentially read-only) src.

14 years agoCorrect RETURN VALUES in mountctl(2)
Antonio Huete [Tue, 21 Jul 2009 20:16:42 +0000 (22:16 +0200)]
Correct RETURN VALUES in mountctl(2)

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 3 Aug 2009 16:34:20 +0000 (09:34 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoAHCI - fix hint.ahci_* -> hint.ahci.*
Matthew Dillon [Mon, 3 Aug 2009 16:33:48 +0000 (09:33 -0700)]
AHCI - fix hint.ahci_* -> hint.ahci.*

The hint variable name was described incorrectly.

14 years agogcc44: properly pass and report target machine and version
Simon Schubert [Mon, 3 Aug 2009 13:00:56 +0000 (15:00 +0200)]
gcc44: properly pass and report target machine and version

Reported-by: hasso@
14 years agogcc34/gcc41: always set library search path
Simon Schubert [Mon, 3 Aug 2009 08:31:22 +0000 (10:31 +0200)]
gcc34/gcc41: always set library search path

Even if -nostdlib or -nodefaultlibs is specified we should pass the
correct library search to ld, so that the user can then properly link
against the right libs, like libc or libgcc.

14 years agogcc44: add patch files necessary for build
Simon Schubert [Mon, 3 Aug 2009 00:43:17 +0000 (02:43 +0200)]
gcc44: add patch files necessary for build

These files were not added because .gitignore contains an entry for
*.patch...

14 years agogcc44: add missing Makefile
Simon Schubert [Mon, 3 Aug 2009 00:14:28 +0000 (02:14 +0200)]
gcc44: add missing Makefile

Reported-by: swildner@
14 years agoMerge branch 'gcc441'
Simon Schubert [Sun, 2 Aug 2009 23:40:04 +0000 (01:40 +0200)]
Merge branch 'gcc441'

14 years agogcc44: hook to the build
Simon Schubert [Sun, 2 Aug 2009 17:16:14 +0000 (19:16 +0200)]
gcc44: hook to the build

14 years agogcc44: import build infrastructure
Simon Schubert [Sun, 2 Aug 2009 17:13:55 +0000 (19:13 +0200)]
gcc44: import build infrastructure

This is based on the gcc41 infrastructure, but heavily modified and
streamlined.  Where possible, whole chunks of the original gcc Makefiles
were copied.

gcc44 now needs gmp and mpfr, so add their infrastructure as well. They
are built as internal (static) libs.

14 years agogcc44: add local changes
Simon Schubert [Sun, 2 Aug 2009 23:35:32 +0000 (01:35 +0200)]
gcc44: add local changes

Changes ported from gcc-4.1.

14 years agompfr: add our READMEs
Simon Schubert [Sun, 2 Aug 2009 18:21:29 +0000 (20:21 +0200)]
mpfr: add our READMEs

14 years agoMerge branch 'vendor/MPFR' into gcc441
Simon Schubert [Sun, 2 Aug 2009 18:21:22 +0000 (20:21 +0200)]
Merge branch 'vendor/MPFR' into gcc441

14 years agogmp: add our READMEs
Simon Schubert [Sun, 2 Aug 2009 18:21:00 +0000 (20:21 +0200)]
gmp: add our READMEs

14 years agoMerge branch 'vendor/GMP' into gcc441
Simon Schubert [Sun, 2 Aug 2009 18:20:50 +0000 (20:20 +0200)]
Merge branch 'vendor/GMP' into gcc441

14 years agogcc44: add our READMEs
Simon Schubert [Sun, 2 Aug 2009 18:20:36 +0000 (20:20 +0200)]
gcc44: add our READMEs

14 years agoMerge branch 'vendor/GCC44' into gcc441
Simon Schubert [Sun, 2 Aug 2009 18:05:15 +0000 (20:05 +0200)]
Merge branch 'vendor/GCC44' into gcc441

14 years agoImport mpfr-2.4.1
Simon Schubert [Sun, 2 Aug 2009 18:03:10 +0000 (20:03 +0200)]
Import mpfr-2.4.1

14 years agoImport gcc-4.4.1
Simon Schubert [Sun, 2 Aug 2009 17:50:58 +0000 (19:50 +0200)]
Import gcc-4.4.1

14 years agoImport gmp-4.3.1
Simon Schubert [Sun, 2 Aug 2009 17:53:02 +0000 (19:53 +0200)]
Import gmp-4.3.1

14 years agoranlib: specify .c instead of .o as SRCS
Simon Schubert [Sat, 1 Aug 2009 16:27:28 +0000 (18:27 +0200)]
ranlib: specify .c instead of .o as SRCS

14 years agolibc: link with -nodefaultlibs -lgcc instead of -nolibc
Simon Schubert [Thu, 30 Jul 2009 08:58:55 +0000 (10:58 +0200)]
libc: link with -nodefaultlibs -lgcc instead of -nolibc

The -nolibc flag is a proprietary DragonFly construct, which is only
used by libc.  It is unnecessary, because the same behavior can be
achieved by specifying -nodefaultslibs -lgcc for linking.

14 years agobsd.cpu.gcc41.mk: don't set CFLAGS directly
Simon Schubert [Sat, 1 Aug 2009 16:24:53 +0000 (18:24 +0200)]
bsd.cpu.gcc41.mk: don't set CFLAGS directly

bsd.cpu.mk already sets CFLAGS from _CPUFLAGS, so don't do it from
bsd.cpu.gcc41.mk.

14 years agobsd.*.mk: allow the setting of separate compile flags for files
Simon Schubert [Sun, 2 Aug 2009 17:13:08 +0000 (19:13 +0200)]
bsd.*.mk: allow the setting of separate compile flags for files

Our makefile infrastructure assumed that all compile flags for all files
are the same.  Now you can specify compile flags for file groups, much
like for FILES and INCS.

This does not support files with pathname components yet.  For this to
work, we'd need support in make to retrieve the full seached path of a
file.

14 years agoDEVFS - remove dev_ops_add(), dev_ops_get(), and get_dev()
Matthew Dillon [Sat, 1 Aug 2009 18:26:48 +0000 (11:26 -0700)]
DEVFS - remove dev_ops_add(), dev_ops_get(), and get_dev()

14 years agofdopendir(3): remove file offset limitation
Nicolas Thery [Sat, 1 Aug 2009 17:46:30 +0000 (19:46 +0200)]
fdopendir(3): remove file offset limitation

It is now possible to pass to fdopendir() a fd with a non-zero file
offset.  This offset determines the initial entry returned by
readdir(3).

14 years agonrelease: Read the # of CPUs when it is actually needed and not generally.
Sascha Wildner [Sat, 1 Aug 2009 20:48:12 +0000 (22:48 +0200)]
nrelease: Read the # of CPUs when it is actually needed and not generally.

This silences some warnings when nrelease/ was entered by {build,quick}world
where it hasn't sysctl(8) in the path.

Suggested-by: corecode
14 years agoDEVFS - Bring in Alex's GSOC kernel adjustments.
Matthew Dillon [Sat, 1 Aug 2009 17:12:57 +0000 (10:12 -0700)]
DEVFS - Bring in Alex's GSOC kernel adjustments.

This is a rollup commit bringing in Alex Hornung's GSOC adjustments
to the main kernel codebase for DEVFS.

Submitted-by: Alex Hornung <ahornung@gmail.com>
14 years agoDEVFS - Bring Alex's GSOC mount_devfs.
Matthew Dillon [Sat, 1 Aug 2009 17:00:18 +0000 (10:00 -0700)]
DEVFS - Bring Alex's GSOC mount_devfs.

This is a rollup commit bringing in Alex Hornung's GSOC mount_devfs
in for DEVFS.

Submitted-by: Alex Hornung <ahornung@gmail.com>