dragonfly.git
14 years agousbd - Do not start moused by default when a usb mouse is connected
Matthew Dillon [Sun, 16 Aug 2009 23:31:27 +0000 (16:31 -0700)]
usbd - Do not start moused by default when a usb mouse is connected

* Because it interferes with X.  Better for X to just attach directly
  to the usb mouse.

14 years agoHAMMER - Add vfs.hammer.yield_check, yield on cpu intensive loops
Matthew Dillon [Sun, 16 Aug 2009 23:18:11 +0000 (16:18 -0700)]
HAMMER - Add vfs.hammer.yield_check, yield on cpu intensive loops

* When running in the kernel HAMMER can wind up cpu-bound.  This code
  allows it to yield to other processes during these periods.  This is
  a bit of a hack and may undergo further development.

* Default check for yield every 16 B-tree iterations.

14 years agoKernel - Instrumentation for experimentation, interrupt threads
Matthew Dillon [Sun, 16 Aug 2009 23:15:32 +0000 (16:15 -0700)]
Kernel - Instrumentation for experimentation, interrupt threads

* Add kern.intr_migrate (default off).  If set to 1 interrupt threads
  will chase the big giant lock around the cpu space instead of waiting
  for another cpu to release it.

* Add lwkt.bgl_yield, default 10 (uS).  Set the polling delay when
  yielding the BGL to another thread.

14 years agokernel - Fix bug in usched_set()
Matthew Dillon [Sun, 16 Aug 2009 23:12:50 +0000 (16:12 -0700)]
kernel - Fix bug in usched_set()

* usched_set() was returning EINVAL after successfully removing a cpu
  from the set of allowed cpus.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 16 Aug 2009 18:19:39 +0000 (11:19 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agodisk/fd - fix panics
Matthew Dillon [Sun, 16 Aug 2009 18:18:17 +0000 (11:18 -0700)]
disk/fd - fix panics

* Call disk_setdiskinfo() on startup.

* Adjust kernel to not panic if a disk device is opened before
  disk_setdiskinfo() has been called.

14 years agoACPICA-UNIX: Fix usr.sbin/acpi warning by properly define ACPI_THREAD_ID
Sepherosa Ziehau [Sun, 16 Aug 2009 11:45:01 +0000 (19:45 +0800)]
ACPICA-UNIX: Fix usr.sbin/acpi warning by properly define ACPI_THREAD_ID

Note, for kernel code, ACPI_THREAD_ID is left undefined in platform specific
header; default integer type in acpica-unix is taken instead.

Reported-by: swildner@
14 years agompt(4): Hook the module into the build.
Sascha Wildner [Sun, 16 Aug 2009 10:02:47 +0000 (12:02 +0200)]
mpt(4): Hook the module into the build.

14 years agompt.4: Update manual page.
Sascha Wildner [Sun, 16 Aug 2009 10:05:02 +0000 (12:05 +0200)]
mpt.4: Update manual page.

Submitted-by: Alexander Polakov <polachok@gmail.com>
14 years agoSync family tree with FreeBSD.
Sascha Wildner [Sat, 15 Aug 2009 23:36:27 +0000 (01:36 +0200)]
Sync family tree with FreeBSD.

14 years agosh(1): Expand $LINENO to the current line number.
Stathis Kamperis [Fri, 14 Aug 2009 19:10:28 +0000 (22:10 +0300)]
sh(1): Expand $LINENO to the current line number.

This is required by SUSv3's "User Portability Utilities" option.

Obtained-from: FreeBSD (SVN Revision 179022 by stefanf@)
Obtained-from: FreeBSD (SVN Revision 179387 by stefanf@)

14 years agoPIPE - Fix a blocking race.
Matthew Dillon [Sun, 16 Aug 2009 03:56:04 +0000 (20:56 -0700)]
PIPE - Fix a blocking race.

* A pipe can get stuck in "pipewr" due to a race caused by a selwakeup()
  before a tsleep().  Fix the race.

14 years agoMPI Driver update - additional merge work.
Matthew Dillon [Sun, 16 Aug 2009 02:12:31 +0000 (19:12 -0700)]
MPI Driver update - additional merge work.

Ported-from: FreeBSD
Submitted-by: Alexander Polakov <polachok@gmail.com>
14 years agoMPT - fix all compiler warnings
Matthew Dillon [Sun, 16 Aug 2009 02:10:58 +0000 (19:10 -0700)]
MPT - fix all compiler warnings

14 years agoMPI Driver update - additional merge work.
Matthew Dillon [Sun, 16 Aug 2009 01:57:23 +0000 (18:57 -0700)]
MPI Driver update - additional merge work.

Ported-from: FreeBSD
Submitted-by: Alexander Polakov <polachok@gmail.com>
14 years agoMPI Driver update
Matthew Dillon [Sat, 15 Aug 2009 22:30:10 +0000 (15:30 -0700)]
MPI Driver update

Ported-from: FreeBSD
Submitted-by: Alexander Polakov <polachok@gmail.com>
14 years agopcidevs - Add entry for SYMBIOS SAS1068
Matthew Dillon [Sat, 15 Aug 2009 22:24:34 +0000 (15:24 -0700)]
pcidevs - Add entry for SYMBIOS SAS1068

Submitted-by: Alexander Polakov <polachok@gmail.com>
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 15 Aug 2009 20:07:57 +0000 (13:07 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoBIO - Do not try to redirty a bp on error unless it has a vnode association.
Matthew Dillon [Sat, 15 Aug 2009 20:06:39 +0000 (13:06 -0700)]
BIO - Do not try to redirty a bp on error unless it has a vnode association.

* vinum buffers may not have a b_vp association.  bdirty() and friends
  requires b_vp to be present.  Simply do not try to re-dirty buffers
  after a failed write unless they have a b_vp association.

  Note that only vinum constructs these manually-kmalloc()'d buffers
  and has this behavior.

14 years agoVINUM - Support geometries > 2TB
Matthew Dillon [Sat, 15 Aug 2009 20:03:23 +0000 (13:03 -0700)]
VINUM - Support geometries > 2TB

* Convert remaining 32 bit block number calculations to 64 bit calculations.

14 years agoRevert "installer: use cmd_name()"
Sascha Wildner [Sat, 15 Aug 2009 19:52:48 +0000 (21:52 +0200)]
Revert "installer: use cmd_name()"

This reverts commit 2ec8237911ca1750232f8b1ae48263329acdf931.

The change actually broke cmd_name() completely. :)

14 years agoVINUM - correct deadlock, correct 32 bit truncation, cleanup string copies
Matthew Dillon [Sat, 15 Aug 2009 19:42:27 +0000 (12:42 -0700)]
VINUM - correct deadlock, correct 32 bit truncation, cleanup string copies

* Correct a deadlock when reading a configuration from disk via
  the command line.

* Correct numerous 32 bit truncations due to the use of min/max.

* Cleanup string copies, use ksnprintf() when possible.

14 years agoAdd umax, umin, i64max, i64min, u64max, u64min.
Matthew Dillon [Sat, 15 Aug 2009 19:23:22 +0000 (12:23 -0700)]
Add umax, umin, i64max, i64min, u64max, u64min.

14 years agoVINUM - Fix reinitialization bug
Matthew Dillon [Sat, 15 Aug 2009 17:33:02 +0000 (10:33 -0700)]
VINUM - Fix reinitialization bug

* If the vinum config is destroyed vinum_conf is zerod, which
  unfortunately wipes out the pbuf counter.

  Generally refactor the vinum_conf init code into its own procedure.

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

14 years agoAdd more intel stuff to pcidevs.
Matthew Dillon [Sat, 15 Aug 2009 17:13:51 +0000 (10:13 -0700)]
Add more intel stuff to pcidevs.

14 years agoDEVFS - Add sync_devs()
Matthew Dillon [Sat, 15 Aug 2009 17:12:45 +0000 (10:12 -0700)]
DEVFS - Add sync_devs()

* Add a function called sync_devs() which synchronizes the disk
  and devfs subsystems.  Call the function where appropriate.

14 years agoDEVFS - Refactor vinum to operate with devfs
Matthew Dillon [Sat, 15 Aug 2009 17:09:44 +0000 (10:09 -0700)]
DEVFS - Refactor vinum to operate with devfs

* vinum now accepts devtab labels and device paths (such as serial numbers)
  in drive specifications.  Note that devtab labels will be convreted to
  device serial numbers in the on-disk configuration.

* vinum now creates and destroys its own devices via DEVFS.

* Fix some buf/bio issues related to recent buf/bio work.  bio_done is
  required for ad-hoc buffers such as the kind vinum uses, and also
  required for any synchronous IO.

* Remove adhoc device associations.  Instead store the device returned
  by make_dev() in appropriate internal structures.

14 years agoDEVTAG - Add devtab suppor for disklabel, disklabel64, and fdisk
Matthew Dillon [Sat, 15 Aug 2009 16:59:39 +0000 (09:59 -0700)]
DEVTAG - Add devtab suppor for disklabel, disklabel64, and fdisk

14 years agoVINUM - Fix 64 bit compiler warnings
Matthew Dillon [Sat, 15 Aug 2009 05:12:30 +0000 (22:12 -0700)]
VINUM - Fix 64 bit compiler warnings

14 years agoVINUM - header file syntax cleanup
Matthew Dillon [Sat, 15 Aug 2009 05:08:16 +0000 (22:08 -0700)]
VINUM - header file syntax cleanup

14 years agodevfsctl.8: Fix some references.
Sascha Wildner [Fri, 14 Aug 2009 21:52:23 +0000 (23:52 +0200)]
devfsctl.8: Fix some references.

14 years agomount_devfs(8): Add a manual page.
Sascha Wildner [Fri, 14 Aug 2009 19:07:21 +0000 (21:07 +0200)]
mount_devfs(8): Add a manual page.

14 years agoNFS - Do not allow rsize/wsize or the socket proto to be changed on mount -u
Matthew Dillon [Fri, 14 Aug 2009 15:45:23 +0000 (08:45 -0700)]
NFS - Do not allow rsize/wsize or the socket proto to be changed on mount -u

* Changing these fields can interfere with already-instantiated buffer
  cache buffers and cause an assertion panic.

Reported-by: Matthias Schmidt
14 years agoDEVFS - Fix xterm pty allocation, permanently fix pty permissions & ownership
Matthew Dillon [Fri, 14 Aug 2009 03:25:43 +0000 (20:25 -0700)]
DEVFS - Fix xterm pty allocation, permanently fix pty permissions & ownership

* Remove the hack that was put in place to support sshd and other remote
  terminal programs.

* Add an override mechanic (SI_OVERRIDE) that allows the cdev to take
  over uid, gid, and perms management from the devfs_node.

* Use the override mechanic in the pty code to formally set ownership and
  permissions for the pty/tty pair.

14 years agoAMD64 - Fix file descriptor passing.
Matthew Dillon [Thu, 13 Aug 2009 23:07:55 +0000 (16:07 -0700)]
AMD64 - Fix file descriptor passing.

* The kernel was improperly assuming that the cmsghdr structure is
  aligned.  It is not on 64-bit architectures.

Reported-by: Antonio Huete <ahuete.devel@gmail.com>
14 years agoAMD64 - Properly detect kernel thread register frames.
Matthew Dillon [Thu, 13 Aug 2009 20:41:59 +0000 (13:41 -0700)]
AMD64 - Properly detect kernel thread register frames.

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

14 years agoAMD64 - Fix kgdb for kernel core files.
Matthew Dillon [Thu, 13 Aug 2009 20:26:37 +0000 (13:26 -0700)]
AMD64 - Fix kgdb for kernel core files.

* Add a dummy sniffer to set the osabi, as the kernel binary may not
  have an ABI tag.

14 years agodevfsctl.8: Add a description of the rule syntax.
Sascha Wildner [Thu, 13 Aug 2009 19:20:55 +0000 (21:20 +0200)]
devfsctl.8: Add a description of the rule syntax.

Submitted-by: alexh
14 years agoAMD64 - Use Elf_Word for note alignment
Matthew Dillon [Thu, 13 Aug 2009 17:00:24 +0000 (10:00 -0700)]
AMD64 - Use Elf_Word for note alignment

* gnu utilities such as objdump and gdb appear to assume that notes
  are 4-byte aligned.

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

14 years agoGDB - Fix register layout for 64-bit builds.
Matthew Dillon [Thu, 13 Aug 2009 16:58:56 +0000 (09:58 -0700)]
GDB - Fix register layout for 64-bit builds.

* Our register layout has changed radically since the last time we
  synced this up.

* The size of the register structure has changed as well.

14 years agoAMD64 - Enable TSC functions.
Matthew Dillon [Thu, 13 Aug 2009 16:39:53 +0000 (09:39 -0700)]
AMD64 - Enable TSC functions.

14 years agoDEVTAB - dumpon now supports devtab
Matthew Dillon [Thu, 13 Aug 2009 15:19:08 +0000 (08:19 -0700)]
DEVTAB - dumpon now supports devtab

14 years agoAdd support for radeon RS880 IGP chips to drm.
Hasso Tepper [Thu, 13 Aug 2009 09:32:23 +0000 (12:32 +0300)]
Add support for radeon RS880 IGP chips to drm.

Obtained-from: FreeBSD

14 years agoAdd some additional radeon pci ids to drm.
Hasso Tepper [Thu, 13 Aug 2009 09:31:37 +0000 (12:31 +0300)]
Add some additional radeon pci ids to drm.

Obtained-from: FreeBSD

14 years agodevtab - swapon now supports /etc/devtab
Matthew Dillon [Wed, 12 Aug 2009 23:27:45 +0000 (16:27 -0700)]
devtab - swapon now supports /etc/devtab

14 years agoFix swaponvp prototype.
Matthew Dillon [Wed, 12 Aug 2009 22:21:05 +0000 (15:21 -0700)]
Fix swaponvp prototype.

Reported-by: Rumko
14 years agoDEVFS - change leak_count from size_t to long and use the correct atomic op.
Matthew Dillon [Wed, 12 Aug 2009 21:41:13 +0000 (14:41 -0700)]
DEVFS - change leak_count from size_t to long and use the correct atomic op.

14 years agoAMD64 - Change VM_SWZONE_SIZE_MAX from 32M to 512M
Matthew Dillon [Wed, 12 Aug 2009 21:38:50 +0000 (14:38 -0700)]
AMD64 - Change VM_SWZONE_SIZE_MAX from 32M to 512M

* Increase the KVM reservation for the swap zone structure on amd64.
  Space is reserved for enough swzone structures to cover around
  512G of swap.

14 years agoAMD64 - Fix bugs in pmap_growkernel()
Matthew Dillon [Wed, 12 Aug 2009 18:02:40 +0000 (11:02 -0700)]
AMD64 - Fix bugs in pmap_growkernel()

* The iterator was not being iterated when allocating a PDPE.

* pmap_zero_page() was being called with a vm_page_t instead of a physical
  address.  (FreeBSD's version uses a vm_page_t, ours uses a physical
  address).

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

14 years agoAMD64 - Fix bug in pmap_prefault, adjust vn kprintfs to conform to amd64.
Matthew Dillon [Wed, 12 Aug 2009 16:56:03 +0000 (09:56 -0700)]
AMD64 - Fix bug in pmap_prefault, adjust vn kprintfs to conform to amd64.

* The pde was being indirected without first checking to see if it was NULL.

* Fix kprintf()'s in the VN device to build without warning on amd64.

14 years agoswap, amd64 - increase maximum swap space to 1TB x 4
Matthew Dillon [Wed, 12 Aug 2009 16:52:29 +0000 (09:52 -0700)]
swap, amd64 - increase maximum swap space to 1TB x 4

* The radix can overflow a 32 bit integer even if swblk_t fits in 32 bits.
  Expand the radix to 64 bits and thus allow the subr_blist code to operate
  up to 2 billion blocks (8TB total).

* Shortcut the common single-swap-device case.  We do not have to scan
  the radix tree to get available space in the single-device case.

* Change maxswzone and maxbcache to longs and add TUNABLE_LONG_FETCH().

* All the TUNEABLE_*_FETCH() calls and kgetenv_*() calls for integers
  call kgetenv_quad().

  Adjust kgetenv_quad() to accept a suffix for kilobytes, megabytes,
  gigabytes, and terrabytes.

14 years agodevfsctl(8): Add a manual page.
Sascha Wildner [Wed, 12 Aug 2009 10:49:48 +0000 (12:49 +0200)]
devfsctl(8): Add a manual page.

Submitted-by: alexh
14 years agoDisable telnet autologin by default.
Hasso Tepper [Wed, 12 Aug 2009 09:45:51 +0000 (12:45 +0300)]
Disable telnet autologin by default.

I doubt that anyone really uses it nowadayas, but it confuses a lot
a vendor "C" equipment making it to complain about missing kerberos
configuration.

14 years agoRemove historic _physadr and label_t typedefs.
Hasso Tepper [Wed, 12 Aug 2009 09:30:59 +0000 (12:30 +0300)]
Remove historic _physadr and label_t typedefs.

These were never used in DragonFly and conflict with some thirdparty
software.

14 years agoNFS - Implement statvfs to take advantage of 64-bit fields
Alex Hornung [Tue, 11 Aug 2009 22:33:20 +0000 (23:33 +0100)]
NFS - Implement statvfs to take advantage of 64-bit fields

* Implement statvfs vfsop to take advantage of statvfs' 64-bit fields
  instead of statfs 32-bit fields.
  This also solves an issue which caused incorrect display of space
  for large NFS mounts.

Dragonfly-Bug: http://bugs.dragonflybsd.org/issue1401
Reported-By: Simon "corecode" Schubert
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 12 Aug 2009 04:53:45 +0000 (21:53 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoAMD64 - Sync additional modifications to amd64 test Makefile
Matthew Dillon [Wed, 12 Aug 2009 04:52:58 +0000 (21:52 -0700)]
AMD64 - Sync additional modifications to amd64 test Makefile

* ad1 becomes ad0 in the qemu-run amd64 kernel.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into...
Matthew Dillon [Wed, 12 Aug 2009 04:48:04 +0000 (21:48 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into amd64

14 years agoAMD64 - Sync additional modifications so amd64 kernel & world builds on i386.
Matthew Dillon [Wed, 12 Aug 2009 04:45:26 +0000 (21:45 -0700)]
AMD64 - Sync additional modifications so amd64 kernel & world builds on i386.

14 years agoAMD64 - Sync machine-dependent bits from smtms.
Matthew Dillon [Wed, 12 Aug 2009 04:43:23 +0000 (21:43 -0700)]
AMD64 - Sync machine-dependent bits from smtms.

Submitted-by: Jordan Gordeev <jgordeev@dir.bg>
14 years agoAMD64 - Sync machine-independant bits from smtms.
Matthew Dillon [Wed, 12 Aug 2009 04:41:31 +0000 (21:41 -0700)]
AMD64 - Sync machine-independant bits from smtms.

Submitted-by: Jordan Gordeev <jgordeev@dir.bg>
14 years agoCISS - Fake up SYNCHRONIZE_CACHE by default.
Matthew Dillon [Wed, 12 Aug 2009 00:36:53 +0000 (17:36 -0700)]
CISS - Fake up SYNCHRONIZE_CACHE by default.

Reported-by: =?ISO-8859-1?Q?Gy=F6rgy_Vilmos?= <vilmos.gyorgy@gmail.com>
14 years agomount - Finish refactoring mount -v and MOUNTCTL_MOUNTFLAGS
Matthew Dillon [Wed, 12 Aug 2009 00:09:59 +0000 (17:09 -0700)]
mount - Finish refactoring mount -v and MOUNTCTL_MOUNTFLAGS

* mount -v now uses MOUNTCTL_MOUNTFLAGS to retrieve the mount flags

* The kernel MOUNTCTL_MOUNTFLAGS implementation now makes it easy for
  a VFS (like HAMMER) to append its own flags.

Submitted-by: Antonio Huete
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 11 Aug 2009 17:07:49 +0000 (10:07 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agodisklabel* - Make disk and filesystem types case insensitive.
Matthew Dillon [Tue, 11 Aug 2009 17:06:01 +0000 (10:06 -0700)]
disklabel* - Make disk and filesystem types case insensitive.

* e.g. allow 'hammer' or 'HAMMER' to be specified when configuring a
  filesystem type for a partition.  When displayed the proper case will be
  used.

  This reduces confusion for people trying to partition a disk manually.

14 years agoDEVFS - fix probing of label for MBR compat slice; cleanup whitespaces
Alex Hornung [Tue, 11 Aug 2009 16:04:33 +0000 (17:04 +0100)]
DEVFS - fix probing of label for MBR compat slice; cleanup whitespaces

* Also probe for labels if no real mbr but only a compat slice was
  "found" by subr_diskmbr. This avoided probing of the compat slice
  as for example described in vkernel(7)

* Clean up whitespaces

Reported-By: YONETANI Tomokazu
14 years agodevfsctl - Completely rewrite the parser;separate rule representation
Alex Hornung [Tue, 11 Aug 2009 14:05:16 +0000 (15:05 +0100)]
devfsctl - Completely rewrite the parser;separate rule representation

* Take over Simon "corecode" Schubert's changes to separate the rule
  representation in userland from the kernel representation, adapting
  it to the new parser.

* Completely rewrite the parser to be more maintainable, support a
  clearer and better rule format and give better warnings/errors.

14 years agocompilers.conf(5): Kick gcc44 from the config, now that it's in base.
Sascha Wildner [Tue, 11 Aug 2009 14:45:35 +0000 (16:45 +0200)]
compilers.conf(5): Kick gcc44 from the config, now that it's in base.

14 years agoboot2: prevent use of DEBUG_FLAGS
Sascha Wildner [Tue, 11 Aug 2009 14:28:35 +0000 (16:28 +0200)]
boot2: prevent use of DEBUG_FLAGS

When compiling with -g, gcc44 embeds debugging data into the boot2
binary which can not be stripped by objcopy. This results in boot2
being too large to fit into the boot sector.

Generally prevent changes to the fragile boot2 build by ignoring
DEBUG_FLAGS completely.

14 years agoAdd some documentation for fdevname() and fdevname_r() (thanks, alexh).
Sascha Wildner [Tue, 11 Aug 2009 13:38:11 +0000 (15:38 +0200)]
Add some documentation for fdevname() and fdevname_r() (thanks, alexh).

14 years agostdlib.h: Adjust indentation a bit.
Sascha Wildner [Tue, 11 Aug 2009 13:37:16 +0000 (15:37 +0200)]
stdlib.h: Adjust indentation a bit.

14 years agottyname(3) - Return EBADF if the fd passed is invalid
Alex Hornung [Tue, 11 Aug 2009 11:07:16 +0000 (12:07 +0100)]
ttyname(3) - Return EBADF if the fd passed is invalid

* Return EBADF instead of ENOTTY if the passed file descriptor is not
  valid to conform with standard.

14 years agofdevname - Set errno if fdevname_r call fails; don't prepend /dev
Alex Hornung [Tue, 11 Aug 2009 09:29:45 +0000 (10:29 +0100)]
fdevname - Set errno if fdevname_r call fails; don't prepend /dev

* Return EINVAL if the fd does not belong to a character device and
  return EBADF if the fd is not valid.

* If fdevname_r returns non-null when called from fdevname, set errno
  in fdevname to whatever *_r returned.

* Don't prepend "/dev/" string to the returned buffer, just put in
  the device name itself, without absolute path.

Reported-By: Sascha Wildner
14 years agottyname(3) - Set errno if ttyname_r call fails
Alex Hornung [Tue, 11 Aug 2009 09:19:57 +0000 (10:19 +0100)]
ttyname(3) - Set errno if ttyname_r call fails

* If ttyname_r returns non-null when called from ttyname, set errno
  in ttyname to whatever *_r returned.
  This also makes our ttyname comply with the standard.

Reported-By: Sascha Wildner
14 years agoinstaller: GC some dead code.
Sascha Wildner [Tue, 11 Aug 2009 09:01:31 +0000 (11:01 +0200)]
installer: GC some dead code.

14 years agoinstaller: use cmd_name()
Sascha Wildner [Tue, 11 Aug 2009 09:00:36 +0000 (11:00 +0200)]
installer: use cmd_name()

14 years agoDEVFS - Modification of clone behaviour; general cleanup; xtime
Alex Hornung [Mon, 10 Aug 2009 19:18:03 +0000 (20:18 +0100)]
DEVFS - Modification of clone behaviour; general cleanup; xtime

* Use default_dev_ops by default for make_autoclone_dev so that opens
  and other operations on it fail when it fails as a clone handler.

* Accept NULL as argument for bimtap for make_autoclone_dev, so that
  there's no explicit need for a clone bitmap to use this function.

* Add destroy_autoclone_dev as a counterpart to make_autoclone_dev.

* Const-ify a bunch of char *

* Use kstrdup instead of kmalloc + memcpy magic at a few places where
  this makes sense.

* Rework atime/mtime/ctime as advised by Simon Schubert on IRC.

* Clean up devfs_clone by getting rid of old code and return NULL
  if cloning fails, else return the cloned device.

* Sync up all pending devfs operations just before calling into the
  clone handler, so that issues with device deletion/creation are
  dealt with appropriately.

* Change cloning in devfs_spec_open to match devfs_clone changes and
  also check the return value of devfs_create_device_node, as it can
  return NULL. If cloning fails, the cloning device will be opened,
  which will have the default_ops and hence will fail returning
  ENODEV.

* Cosmetic changes

Suggested-By: Simon "corecode" Schubert
14 years ago'options DEVFS' isn't anymore, so remove useless VKERNEL_DEVFS config.
Sascha Wildner [Tue, 11 Aug 2009 08:12:40 +0000 (10:12 +0200)]
'options DEVFS' isn't anymore, so remove useless VKERNEL_DEVFS config.

14 years agoList NO_GCC44 in make.conf and add some lines to the manpage for it.
Sascha Wildner [Tue, 11 Aug 2009 02:19:14 +0000 (04:19 +0200)]
List NO_GCC44 in make.conf and add some lines to the manpage for it.

14 years agovkd(4): Comment out an unused variable (just like the code).
Sascha Wildner [Tue, 11 Aug 2009 01:59:10 +0000 (03:59 +0200)]
vkd(4): Comment out an unused variable (just like the code).

14 years agoi4b(4): Remove a declaration which is no longer needed.
Sascha Wildner [Tue, 11 Aug 2009 01:58:20 +0000 (03:58 +0200)]
i4b(4): Remove a declaration which is no longer needed.

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

14 years agonrelease - adjust usb disk-key image generator
Matthew Dillon [Tue, 11 Aug 2009 02:11:35 +0000 (19:11 -0700)]
nrelease - adjust usb disk-key image generator

* Add an explicit vfs.root.mountfrom line in loader.conf to point
  the boot loader at da8.

* Makefile cleanup.  Remove the one-huge-sh line and properly dismount and
  unconfigure any left over VN from previous attempts.

14 years agocrget(): use M_ZERO instead of bzero()
Nicolas Thery [Mon, 10 Aug 2009 21:29:52 +0000 (23:29 +0200)]
crget(): use M_ZERO instead of bzero()

14 years agogcc44: fix buildworld on amd64
Thomas E. Spanjaard [Mon, 10 Aug 2009 20:20:51 +0000 (20:20 +0000)]
gcc44: fix buildworld on amd64

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

14 years agoUSB - Clean up address setting and softc allocations
Matthew Dillon [Mon, 10 Aug 2009 16:30:27 +0000 (09:30 -0700)]
USB - Clean up address setting and softc allocations

* Zero out the softc structure being allocated for ehci and ohci.

* When establishing a new connection and allocating an address for
  further communications, disconnect and reconnect the default pipe
  instead of just ripping up the underlying address.

Research-done-by: Rumko <rumcic@gmail.com>
Partially-taken-from: FreeBSD

14 years agoEHCI - Fix early probing problems.
Matthew Dillon [Mon, 10 Aug 2009 16:27:42 +0000 (09:27 -0700)]
EHCI - Fix early probing problems.

* When polling is used an actual interrupt will clear pending status to
  prevent an interrupt livelock.  However, if this occurs the polling code
  can wind up believing that no status change has occured.

  Add the cleared pending status to sc->sc_dintrs and then reincorporate
  into the status check when polling or running a normal interrupt.

* Code cleanup: NULL out some fields on termination.

14 years agoshlock(1): Remove a wrong free() of a stack variable.
Sascha Wildner [Mon, 10 Aug 2009 14:17:48 +0000 (16:17 +0200)]
shlock(1): Remove a wrong free() of a stack variable.

14 years agoahci.4: Oops forgot one .Nm
Sascha Wildner [Mon, 10 Aug 2009 14:15:02 +0000 (16:15 +0200)]
ahci.4: Oops forgot one .Nm

14 years agodevelopment.7: Improve markup a bit, bump .Dd.
Sascha Wildner [Mon, 10 Aug 2009 14:08:26 +0000 (16:08 +0200)]
development.7: Improve markup a bit, bump .Dd.

14 years agoahci.4: Improve markup, begin sentences on a new line, bump .Dd.
Sascha Wildner [Mon, 10 Aug 2009 14:07:38 +0000 (16:07 +0200)]
ahci.4: Improve markup, begin sentences on a new line, bump .Dd.

14 years agochmod.2/mountctl.2: Remove trailing whitespace.
Sascha Wildner [Mon, 10 Aug 2009 14:05:14 +0000 (16:05 +0200)]
chmod.2/mountctl.2: Remove trailing whitespace.

14 years agohexdump: always stat input when skipping
Sascha Wildner [Mon, 10 Aug 2009 08:30:20 +0000 (10:30 +0200)]
hexdump: always stat input when skipping

The previous code would not fstat(2) the input, if operating on stdin.
Still, it would use the uninitialized struct stat to decide whether to
seek in the input or not.  This could either lead to hexdump reading the
skipped input, instead of directly seeking, or, worse, trying a seek
even though this not being possible.

Fix this issue by always fstat()ing the input.

Submitted-by: corecode
14 years agoee(1): Fix some wrong usage of NULL.
Sascha Wildner [Mon, 10 Aug 2009 08:23:04 +0000 (10:23 +0200)]
ee(1): Fix some wrong usage of NULL.

14 years agoNFS - Cleanly unmount NFS on halt/shutdown/reboot
Matthew Dillon [Mon, 10 Aug 2009 06:17:32 +0000 (23:17 -0700)]
NFS - Cleanly unmount NFS on halt/shutdown/reboot

* Abort any in-transit RPCs, disallow new RPCs, and disconnect the
  socket (aka if TCP) when doing a forced NFS unmount.

  This fixes left over TCP sockets when doing a normal halt/shutdown/reboot.

* Related user processes will also unblock, but the unmount code will
  still block trying to look up the path and this commit does not quite
  solve that problem.