]> Zhao Yanbai Git Server - minix.git/log
minix.git
10 years agonetbsd dirent.h, import sys/sys *.h, mfs cleanup
Ben Gras [Mon, 16 Sep 2013 20:52:36 +0000 (22:52 +0200)]
netbsd dirent.h, import sys/sys *.h, mfs cleanup

. add all sys/sys headers not already present to help compiling
. take netbsd dirent.h and struct dirent; main result is
  introducing d_type and d_namlen that have to be set by getdents()
  in all FS code implementing it
. d_off is gone
. alignment of the struct has become 8 bytes instead of 4
. remove _MAX_BLOCK_SIZE, _MIN_BLOCK_SIZE, _STATIC_BLOCK_SIZE
. libminlib: cleanup unused yet duplicate code
. mfs: throw out the long-broken v1, v2 support
. new test for dirent contents filled by getdents()

Change-Id: I1459755c7ba5e5d1c9396d3a587ce6e63ddc283e

10 years agoVFS: further cleanup of device code
David van Moolenbroek [Sun, 6 Oct 2013 13:58:54 +0000 (15:58 +0200)]
VFS: further cleanup of device code

- all TTY-related exceptions have now been merged into the regular
  code paths, allowing non-TTY drivers to expose TTY-like devices;
- as part of this, CTTY_MAJOR is now fully managed by VFS instead of
  being an ugly stepchild of the TTY driver;
- device styles have become completely obsolete, support for them has
  been removed throughout the system; same for device flags, which had
  already become useless a while ago;
- device map open/close and I/O function pointers have lost their use,
  thus finally making the VFS device code actually readable;
- the device-unrelated pm_setsid has been moved to misc.c;
- some other small cleanup-related changes.

Change-Id: If90b10d1818e98a12139da3e94a15d250c9933da

10 years agoIS: dump number of in-use FDs for VFS
David van Moolenbroek [Sat, 5 Oct 2013 12:59:59 +0000 (14:59 +0200)]
IS: dump number of in-use FDs for VFS

Change-Id: If0e2092d5a8c384c31b1f44cc0591bb119c6d8de

10 years agoTTY: fix earlier PTY select "improvement"
David van Moolenbroek [Fri, 4 Oct 2013 23:40:58 +0000 (01:40 +0200)]
TTY: fix earlier PTY select "improvement"

It was just plain wrong.

Change-Id: Ieab4b4f01d9461e05e0d0ba6427a99d863d6b98d

10 years agoExtend dupfrom(2) into copyfd(2)
David van Moolenbroek [Sat, 5 Oct 2013 14:31:35 +0000 (16:31 +0200)]
Extend dupfrom(2) into copyfd(2)

This single function allows copying file descriptors from and to
processes, and closing a previously copied remote file descriptor.
This function replaces the five FD-related UDS backcalls. While it
limits the total number of in-flight file descriptors to OPEN_MAX,
this change greatly improves crash recovery support of UDS, since all
in-flight file descriptors will be closed instead of keeping them
open indefinitely (causing VFS to crash on system shutdown). With the
new copyfd call, UDS becomes simpler, and the concept of filps is no
longer exposed outside of VFS.

This patch also moves the checkperms(2) stub into libminlib, thus
fully abstracting away message details of VFS communication from UDS.

Change-Id: Idd32ad390a566143c8ef66955e5ae2c221cff966

10 years agoVFS: better dupfrom(2) deadlock detection
David van Moolenbroek [Sat, 5 Oct 2013 10:50:44 +0000 (12:50 +0200)]
VFS: better dupfrom(2) deadlock detection

Change-Id: I29f00075698888c7c8ca60b47ab82fba8c606f4e

10 years agoUDS: sendmsg/recvmsg fixes
David van Moolenbroek [Fri, 4 Oct 2013 19:10:01 +0000 (21:10 +0200)]
UDS: sendmsg/recvmsg fixes

- sendmsg: the accumulation of multiple in-flight file descriptors was
  already described in the comments; now the code actually does what
  the comments say :) -- also, added robustness in case of a failure;
- recvmsg: only create a socket rights message if there are file
  descriptors pending at all;
- recvmsg: copy back the control message length;
- recvmsg: use CMSG_SPACE instead of CMSG_LEN to compute sizes.

Not sure if all of this is now working according to specification,
but at least tmux seems to be happy with it.

Change-Id: I8d076c14c3ff3220b7fea730e0f08f4b4254ede5

10 years agoUDS: add support for FIONREAD
David van Moolenbroek [Fri, 4 Oct 2013 16:41:21 +0000 (18:41 +0200)]
UDS: add support for FIONREAD

Change-Id: I50030012b408242a86f8c55017429acdadff49d1

10 years agoUDS: align struct sockaddr_un with NetBSD
David van Moolenbroek [Fri, 4 Oct 2013 16:00:42 +0000 (18:00 +0200)]
UDS: align struct sockaddr_un with NetBSD

Well, make a start, anyway. Our copy was missing a legacy field from
the structure, that could very well cause applications to fail trying
to set, clear, or check it. As a consequence, SUN_LEN now yields the
same result as on NetBSD.

Change-Id: I80f6aff7769be402b3bd3959f64d314509ed138c

10 years agoUDS: support for nonblocking sockets
David van Moolenbroek [Fri, 4 Oct 2013 15:57:42 +0000 (17:57 +0200)]
UDS: support for nonblocking sockets

This patch includes several other fixes, which are now tested in the
test56 test set.

Change-Id: I9535d5a6c072abf966252838522c5f65b353c6c2

10 years agoUDS: clean up source code
David van Moolenbroek [Fri, 4 Oct 2013 14:46:18 +0000 (16:46 +0200)]
UDS: clean up source code

- move VFS calls to a separate source file;
- solve a few subtle bugs, mostly in error handling;
- simplify debug reporting code;
- make a few definitions more independent;
- restyle to something closer to KNF.

Change-Id: I7b0537adfccac8b92b5cc3e78dac9f5ce3c79f03

10 years agoUDS: split off from PFS
David van Moolenbroek [Fri, 4 Oct 2013 14:29:40 +0000 (16:29 +0200)]
UDS: split off from PFS

Change-Id: I769cbd64aa6e5e85a797caf0f8bbb4c20e145263

10 years agoat_wini: PCI-only now; one controller per instance
David van Moolenbroek [Wed, 2 Oct 2013 17:37:00 +0000 (19:37 +0200)]
at_wini: PCI-only now; one controller per instance

- remove non-PCI support, since all supported platforms with at_wini
  devices also have PCI support by now;
- correspondingly, stop using information from the BIOS altogether;
- limit each driver instance to one controller, to be in line with
  the general MINIX3 one-instance-per-controller driver model; this
  limits the number of disks per at_wini instance to four;
- go through the controllers by the order of their occurrence in the
  PCI table, thus removing the exception for compatibility devices;
- let the second at_wini instance shut down silently if there is only
  one IDE controller;
- clean up some extra code we don't need anymore, and resolve some
  WARNS=5 level warnings.

Overall, these changes should simplify automatic loading of the right
disk drivers at boot time in the future.

Change-Id: Ia64d08cfbeb9916abd68c9c2941baeb87d02a806

10 years agosystem.conf: subsystem VID/DID matching support
David van Moolenbroek [Mon, 30 Sep 2013 22:42:41 +0000 (00:42 +0200)]
system.conf: subsystem VID/DID matching support

- change "vid/did" to "vid:did", old form still supported for now;
- allow "vid:did/subvid:subdid" specification in system.conf, in
  which case a device will be visible to a driver if the subsystem
  VID/DID also match.

Change-Id: I7aef54da1b0bc81e24b5d98f1a28416f38f8b266

10 years agoUpdating saved configure line in gcc
Lionel Sambuc [Mon, 14 Oct 2013 11:19:37 +0000 (13:19 +0200)]
Updating saved configure line in gcc

GCC embeddeds in a string the configuration used when building itself,
this patches just updates that string to match the configuration
actually used.

Change-Id: Ife8f61570b94eb17ce5808b5b58cc5e75e9dc64f

10 years agousr.bin/man: Update
Lionel Sambuc [Tue, 8 Oct 2013 17:00:16 +0000 (19:00 +0200)]
usr.bin/man: Update

Change-Id: I0c5d2115ba384687032f7b2af50d99dedc323b7a

10 years agoexternal/bsd/mdocml: Update
Lionel Sambuc [Tue, 8 Oct 2013 16:05:29 +0000 (18:05 +0200)]
external/bsd/mdocml: Update

Change-Id: I17b54e52e8322676d83ed4386f586f8ef3029f72

10 years agoRemove obsolete compatibility links
Lionel Sambuc [Fri, 4 Oct 2013 13:41:18 +0000 (15:41 +0200)]
Remove obsolete compatibility links

 * /usr/bin/strip would be replaced by a link, even when compiling
    binutils.
 * Updated minix-spec.h to use the correct dynamic linker, and removed
    the previously used symlinks.
 * Removed the patch to the builtin PATH of ld.elf_so.

Change-Id: I4dc8a7fb77a11638f5105a4e15b6c9be5add750e

10 years agoSplitting commands/cd/cd.sh
Lionel Sambuc [Thu, 3 Oct 2013 20:39:47 +0000 (22:39 +0200)]
Splitting commands/cd/cd.sh

As the situation is right now, importing one of the commands the
script replaces, requires a doc/UPDATING step.

By moving the script to a shared folder, and symlinking it once per
command, this allows for separatly installed files on the system,
instead of one file being symlinked multiple times.

Change-Id: I0dae96982bca5168b852ed70fff61442441b929f

10 years agoAdapting build system to call MAKEDEV for /dev 13/1013/3
Lionel Sambuc [Thu, 3 Oct 2013 16:26:21 +0000 (18:26 +0200)]
Adapting build system to call MAKEDEV for /dev

 * Remove static proto.dev
 * Update releasetools/*image.sh not to use proto.dev, as well as
   minor comments cleanup
 * Add TOOL_TOPROTO

Change-Id: If7dc16d4ebb3b0c4e859786fad25d4af000c999f

10 years agoMAKEDEV: Add mtree output, and ramdisk set.
Lionel Sambuc [Thu, 3 Oct 2013 11:54:24 +0000 (13:54 +0200)]
MAKEDEV: Add mtree output, and ramdisk set.

Change-Id: I36cb7e9451960189a33a04a5c2e3ddb19c7be75e

10 years agokeymaps: improve keypad slash support
David van Moolenbroek [Wed, 2 Oct 2013 11:37:49 +0000 (13:37 +0200)]
keymaps: improve keypad slash support

Now that the keymaps can distinguish between the regular slash key
and the slash key on the numeric keypad, we can avoid localization
of the latter.

Change-Id: I20ead7d26a9baa82f5a522562524fd75d44efb42

10 years agoNorwegian keymap
Mikal Villa [Wed, 2 Oct 2013 10:30:03 +0000 (12:30 +0200)]
Norwegian keymap

Change-Id: I181234afc8f1a058e92af6c1fe88979463aaff45

10 years agoInput infrastructure, INPUT server, PCKBD driver
David van Moolenbroek [Sat, 28 Sep 2013 12:46:21 +0000 (14:46 +0200)]
Input infrastructure, INPUT server, PCKBD driver

This commit separates the low-level keyboard driver from TTY, putting
it in a separate driver (PCKBD). The commit also separates management
of raw input devices from TTY, and puts it in a separate server
(INPUT). All keyboard and mouse input from hardware is sent by drivers
to the INPUT server, which either sends it to a process that has
opened a raw input device, or otherwise forwards it to TTY for
standard processing.

Design by Dirk Vogt. Prototype by Uli Kastlunger.

Additional changes made to the prototype:

- the event communication is now based on USB HID codes; all input
  drivers have to use USB codes to describe events;
- all TTY keymaps have been converted to USB format, with the effect
  that a single keymap covers all keys; there is no (static) escaped
  keymap anymore;
- further keymap tweaks now allow remapping of literally all keys;
- input device renumbering and protocol rewrite;
- INPUT server rewrite, with added support for cancel and select;
- PCKBD reimplementation, including PC/AT-to-USB translation;
- support for manipulating keyboard LEDs has been added;
- keyboard and mouse multiplexer devices have been added to INPUT,
  primarily so that an X server need only open two devices;
- a new "libinputdriver" library abstracts away protocol details from
  input drivers, and should be used by all future input drivers;
- both INPUT and PCKBD can be restarted;
- TTY is now scheduled by KERNEL, so that it won't be punished for
  running a lot; without this, simply running "yes" on the console
  kills the system;
- the KIOCBELL IOCTL has been moved to /dev/console;
- support for the SCANCODES termios setting has been removed;
- obsolete keymap compression has been removed;
- the obsolete Olivetti M24 keymap has been removed.

Change-Id: I3a672fb8c4fd566734e4b46d3994b4b7fc96d578

10 years agoTTY: allow selecting on translated minors 98/998/2
David van Moolenbroek [Fri, 27 Sep 2013 11:56:29 +0000 (11:56 +0000)]
TTY: allow selecting on translated minors

Due to the existence of /dev/console and /dev/log, and the new
"console=" setting, it is now possible that a single non-PTY object
(e.g. serial) is accessible through two different minor numbers.  This
poses a problem when sending late select replies (CDEV_SEL2_REPLY),
because the object's minor number can not be used to identify the
device.  Since selecting on such objects through translated minor
numbers is actually required, we now save the minor number used to
initiate the select query in order to send a late reply.

The solution is suboptimal, as it is not possible to use two different
minors to select on the same object at once.  In the future, there
should be at least one select record for each minor that can be used
with each object.

Change-Id: I4d39681d2ffd68b4047daf933d45b7bafe3c885e

10 years agoEnable sys-root support in the native binutils 97/997/2
Lionel Sambuc [Thu, 26 Sep 2013 09:52:57 +0000 (11:52 +0200)]
Enable sys-root support in the native binutils

sysroot support was enabled only for cross versions of the binutils
tools.

This patch also activate it for the native tools which are installed
on the target system.

Change-Id: Ica5de7e20719a63f3b695477b767c30d0a93490c

10 years agoImporting usr.bin/uname 96/996/2
Thomas Cort [Sat, 7 Sep 2013 01:40:42 +0000 (21:40 -0400)]
Importing usr.bin/uname

Change-Id: I4c316221e288edd839e26a2af4cb59f28bf722c1

10 years agouname: normalize release and version 95/995/2
Thomas Cort [Sat, 7 Sep 2013 01:40:31 +0000 (21:40 -0400)]
uname: normalize release and version

Most systems provide the full version number in the
'release' field and the kernel version in 'version'.
Minix used to split the full version number between
release and version which caused problems for pkgsrc
and other applications. This patch brings Minix's
uname in line with other systems such as NetBSD.
It also brings the getty banner in line with NetBSD.

Old Minix uname:
sysname->Minix
nodename->10.0.2.15
release->3
version->2.1
machine->i686

New Minix uname:
sysname->Minix
nodename->10.0.2.15
release->3.2.1
version->Minix 3.2.1 (GENERIC)
machine->i686

Change-Id: I966633dfdcf2f9485966bb0d0d042afc45bbeb7d

10 years agoTake LOG out of the boot image 94/994/2
David van Moolenbroek [Sat, 21 Sep 2013 15:35:15 +0000 (17:35 +0200)]
Take LOG out of the boot image

Change-Id: Id2629776b53aae46629b04a42c15cbbacac9b949

10 years agoKernel: make SIGKMESS target process list dynamic 93/993/2
David van Moolenbroek [Sat, 21 Sep 2013 13:03:20 +0000 (15:03 +0200)]
Kernel: make SIGKMESS target process list dynamic

The set of processes to which a SIGKMESS signal is sent whenever new
diagnostics messages are added to the kernel's message buffer, is now
no longer hardcoded. Instead, processes can (un)register themselves
to receive such notifications, by means of sys_diagctl().

Change-Id: I9d6ac006a5d9bbfad2757587a068fc1ec3cc083e

10 years agoRename SYSCTL kernel call to DIAGCTL 92/992/2
David van Moolenbroek [Fri, 20 Sep 2013 22:58:46 +0000 (00:58 +0200)]
Rename SYSCTL kernel call to DIAGCTL

Change-Id: I1b17373f01808d887dcbeab493838946fbef4ef6

10 years agoReplacing timer_t by netbsd's timer_t 91/991/2
Lionel Sambuc [Thu, 19 Sep 2013 08:57:10 +0000 (10:57 +0200)]
Replacing timer_t by netbsd's timer_t

 * Renamed struct timer to struct minix_timer
 * Renamed timer_t to minix_timer_t
 * Ensured all the code uses the minix_timer_t typedef
 * Removed ifdef around _BSD_TIMER_T
 * Removed include/timers.h and merged it into include/minix/timers.h
 * Resolved prototype conflict by renaming kernel's (re)set_timer
   to (re)set_kernel_timer.

Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5

10 years agoAdd testvnd.sh test script 90/990/2
David van Moolenbroek [Wed, 18 Sep 2013 12:09:47 +0000 (14:09 +0200)]
Add testvnd.sh test script

As part of this, change the "run" script to allow certain scripts to
be run as root only.

Change-Id: I846e41037f9d4f6c7fc0b5ea8250303a7bd72f5d

10 years agoImport NetBSD vndconfig(8) 89/989/2
David van Moolenbroek [Wed, 18 Sep 2013 12:06:46 +0000 (14:06 +0200)]
Import NetBSD vndconfig(8)

The tool has been changed heavily to match our VND driver model.

NetBSD is in the process of renaming it from vnconfig(8) to
vndconfig(8). To keep things in sync, we have to play along.

Change-Id: Ie86df184f03ab00573ea76b43c9caa0412e8321d

10 years agoAdd VND driver, providing loopback devices 88/988/2
David van Moolenbroek [Wed, 18 Sep 2013 12:02:17 +0000 (14:02 +0200)]
Add VND driver, providing loopback devices

Change-Id: I40fa695e28c67477a75383e6f1550e451afcab41

10 years agoVFS: add dupfrom(2) call 87/987/2
David van Moolenbroek [Wed, 18 Sep 2013 11:55:15 +0000 (13:55 +0200)]
VFS: add dupfrom(2) call

This call copies a file descriptor from a remote process into the
calling process. The call is for the VND driver only, and in the
future, ACLs will prevent any other process from using this call.

Change-Id: Ib16fdd1f1a12cb38a70d7e441dad91bc86898f6d

10 years agotests: do not skip installed shell tests 86/986/2
David van Moolenbroek [Wed, 18 Sep 2013 09:46:08 +0000 (11:46 +0200)]
tests: do not skip installed shell tests

When installed, the test scripts lose their ".sh" suffix, causing them
to be skipped by the "run" script. With this patch, the tests are no
longer specified with ".sh" suffix in the run script, and the suffix
is added automatically as necessary.

LSC: Minor adaptation to keep track of history. As this patch has been
     forward ported into mainline, a simple rebase would loose this
     commit (cf commit 1f317d315c8140c2bcdbff1953a6f645f4f6ef04).

Change-Id: I0b72312e79992b9818559c6546a0e52cd95184c2

10 years agoblocktest: prepare to be run as part of tests 85/985/2
David van Moolenbroek [Wed, 18 Sep 2013 11:41:56 +0000 (13:41 +0200)]
blocktest: prepare to be run as part of tests

- fail SEF initialization if any of the subtests failed, so that the
  party invoking the "service up" can tell whether the test succeeded;
- add "nocontig" option, because VM isn't particularly good at
  allocating contiguous memory;
- add "silent" option, because it floods the console otherwise;
- allow the device size to be smaller than the maximum transfer size;
- install files to installed test directory.

Change-Id: I45c818f817c11d90c5f94ae26a2fc49e36e6761e

10 years agoEnable devname(3) 84/984/2
David van Moolenbroek [Wed, 18 Sep 2013 11:38:36 +0000 (13:38 +0200)]
Enable devname(3)

There is no support for a device name database yet, so this call is
expected to be fairly slow.

Change-Id: I73aa5f267e2b6921b7d3bbdcc4beac463931132c

10 years agolibbdev: be less noisy about clean driver restarts 83/983/2
David van Moolenbroek [Sun, 15 Sep 2013 11:09:00 +0000 (13:09 +0200)]
libbdev: be less noisy about clean driver restarts

Change-Id: Ie02a459c9b544d361ab00bac431ef99de53b0c5f

10 years agoStraighten ioctl.h 82/982/2
David van Moolenbroek [Sat, 14 Sep 2013 12:43:53 +0000 (14:43 +0200)]
Straighten ioctl.h

- include all ioctl subheaders, properly listing all letters;
- change FBD's ioctl calls to use 'B' instead of 'F', in
  preparation of the VND driver.

Change-Id: Ia718979568cc057f47cf505a89238d5b3b6695d4

10 years agoVM: readd support for forgetting cached FS blocks 81/981/2
David van Moolenbroek [Sun, 15 Sep 2013 16:55:42 +0000 (18:55 +0200)]
VM: readd support for forgetting cached FS blocks

Not all services involved in block I/O go through VM to access the
blocks they need.  As a result, the blocks in VM may become stale,
possibly causing corruption when the stale copy is restored by a
service that does go through VM later on.  This patch restores support
for forgetting cached blocks that belong to a particular device, and
makes the relevant file systems use this functionality 1) when
requested by VFS through REQ_FLUSH, and 2) upon unmount.

Change-Id: I0758c5ed8fe4b5ba81d432595d2113175776aff8

10 years agofilter: use libblockdriver 80/980/2
David van Moolenbroek [Wed, 11 Sep 2013 12:50:18 +0000 (14:50 +0200)]
filter: use libblockdriver

Also work around clock_t now being unsigned.

Change-Id: Ifbca2482e996ddca58036d45f557165e636fb3fa

10 years agoRewrite character driver protocol 79/979/2
David van Moolenbroek [Tue, 10 Sep 2013 18:25:01 +0000 (20:25 +0200)]
Rewrite character driver protocol

As a side effect, remove the clone style, as the normal device style
supports device cloning now.

Change-Id: Ie82d1ef0385514a04a8faa139129a617895780b5

10 years agoRemove support for reopening character devices 78/978/2
David van Moolenbroek [Tue, 10 Sep 2013 14:06:37 +0000 (16:06 +0200)]
Remove support for reopening character devices

Previously, VFS would reopen a character device after a driver crash
if the associated file descriptor was opened with the O_REOPEN flag.
This patch removes support for this feature. The code was complex,
full of uncovered corner cases, and hard to test. Moreover, it did not
actually hide the crash from user applications: they would get an
error code to indicate that something went wrong, and have to decide
based on the nature of the underlying device how to continue.

- remove support for O_REOPEN, and make playwave(1) reopen its device;
- remove support for the DEV_REOPEN protocol message;
- remove all code in VFS related to reopening character devices;
- no longer change VFS filp reference count and FD bitmap upon filp
  invalidation; instead, make get_filp* fail all calls on invalidated
  FDs except when obtained with the locktype VNODE_OPCL which is used
  by close_fd only;
- remove the VFS fproc file descriptor bitmap entirely, returning to
  the situation that a FD is in use if its slot points to a filp; use
  FILP_CLOSED as single means of marking a filp as invalidated.

Change-Id: I34f6bc69a036b3a8fc667c1f80435ff3af56558f

10 years agoVFS: rework device code 77/977/2
David van Moolenbroek [Tue, 10 Sep 2013 10:19:08 +0000 (12:19 +0200)]
VFS: rework device code

- block the calling thread on character device close;
- fully separate block and character open/close routines;
- reuse generic open/close code for the cloning case;
- zero all messages to drivers before filling them;
- use appropriate types for major/minor device numbers.

Change-Id: Ia90e6fe5688f212f835c5ee1bfca831cb249cf51

10 years agoMake PFS backcalls regular VFS calls 76/976/2
David van Moolenbroek [Sun, 8 Sep 2013 22:04:12 +0000 (00:04 +0200)]
Make PFS backcalls regular VFS calls

- prefix them with VFS_ as they are going to VFS;
- give these calls normal call numbers;
- give them their own set of message field aliases;
- also make do_mapdriver a regular call.

Change-Id: I2140439f288b06d699a1f65438bd8306509b259e

10 years agoARM serial driver: Comment termios_baud_rate.
Lionel Sambuc [Wed, 2 Oct 2013 08:56:24 +0000 (10:56 +0200)]
ARM serial driver: Comment termios_baud_rate.

The B0-B115200 defines are flags, and not the actual speed they
represent.

This fixes an incoherency for B0 handling, and documents why it is
required to call the function again after changing the speed flag.

DFL_BAUD is set to one of the flag, so to translate it to an actual
speed, the function calls itself again, which will always be able to
finish without inducing another recursive call.

Change-Id: I04ebfaefee31a88d05f0b726352d1581a966147b

10 years agoTTY: skip /dev/log checks if console is serial
David van Moolenbroek [Tue, 1 Oct 2013 21:25:01 +0000 (23:25 +0200)]
TTY: skip /dev/log checks if console is serial

It is unclear why /dev/log has its own open/close rules, but those
rules conflict with serial console redirection.  This does not solve
the root of the problem, but it puts back in place more or less the
same workaround that was already in place before the TTY overhaul.

Change-Id: Ib53abbc28a76c1f2b0befc8448aeed0173bc96a5

10 years agoTTY: use libchardriver; clean up 67/867/3
David van Moolenbroek [Wed, 11 Sep 2013 10:48:10 +0000 (12:48 +0200)]
TTY: use libchardriver; clean up

- writing to a PTY master side blocks if there is not already a
  blocked reader on the slave side, and select now reflects this;
- internally, TTY now uses a test based on "caller != NONE" rather
  than "grant != GRANT_INVALID" to identify whether a call is
  currently ongoing;
- "offset" fields have been removed as they equal the corresponding
  "cum" fields;
- improved variable typing and function naming here and there;
- various other small fixes.

Change-Id: I6b51452888942e864b4e034e8c8490576184a23e

10 years agoVFS: select(2) fixes 75/975/2
David van Moolenbroek [Tue, 10 Sep 2013 23:13:59 +0000 (01:13 +0200)]
VFS: select(2) fixes

- check each file descriptor's open access mode (filp_mode);
- treat an error returned by a character driver as a select error;
- check all filps in each set before finishing select;
- do not copy back file descriptor sets if an error occurred;
- remove the hardcoded list of supported character major devices,
  since all drivers should now be capable of responding properly;
- add tests to test40 and fix its error count aggregation.

Change-Id: I57ef58d3afb82640fc50b59c859ee4b25f02db17

10 years agoRetire EBADIOCTL in favor of ENOTTY 74/974/2
David van Moolenbroek [Tue, 10 Sep 2013 23:07:28 +0000 (01:07 +0200)]
Retire EBADIOCTL in favor of ENOTTY

Change-Id: I6bd0e301d21ab7f2336e350e7e6e15d238c2c93d

10 years agolibnetsock: use libchardriver 73/973/2
David van Moolenbroek [Wed, 4 Sep 2013 15:42:36 +0000 (15:42 +0000)]
libnetsock: use libchardriver

Change-Id: Ia5b780cad0b0c636db9bd866c7223da0d38ef6ea

10 years agoLWIP: move chardev message parsing into libnetsock 72/972/2
David van Moolenbroek [Tue, 10 Sep 2013 22:50:36 +0000 (00:50 +0200)]
LWIP: move chardev message parsing into libnetsock

Change-Id: Ie23fd003c9fa35811548f388c8e9b55e8d9de8d7

10 years agoINET: use libchardriver 71/971/2
David van Moolenbroek [Mon, 9 Sep 2013 14:53:28 +0000 (14:53 +0000)]
INET: use libchardriver

Change-Id: Icf8a1a5769ce0aede1cc28da99b9daf7d328182c

10 years agoPFS: use libchardriver; clean up 70/970/2
David van Moolenbroek [Tue, 3 Sep 2013 00:00:20 +0000 (02:00 +0200)]
PFS: use libchardriver; clean up

- simplify and repair UDS request handling state machine;
- simplify interface used between internal modules;
- implement missing support for nonblocking I/O;
- fix select implementation;
- clean up global variables.

Change-Id: Ia82c5c6f05cc3f0a498efc9a26de14b1cde6eace

10 years agolibaudiodriver: use libchardriver 69/969/2
David van Moolenbroek [Mon, 2 Sep 2013 23:59:20 +0000 (01:59 +0200)]
libaudiodriver: use libchardriver

Change-Id: I299d58d110ad14b69076276ba46c4325875c34ca

10 years agoprinter: use libchardriver 68/968/2
David van Moolenbroek [Mon, 2 Sep 2013 23:57:41 +0000 (01:57 +0200)]
printer: use libchardriver

Change-Id: Ifa3cabeada74c32df2613b8279c00f86e831c775

10 years agolibchardriver: full API rewrite 67/967/2
David van Moolenbroek [Mon, 2 Sep 2013 23:49:38 +0000 (01:49 +0200)]
libchardriver: full API rewrite

The new API now covers the entire character driver protocol, while
hiding all the message details. It should therefore be used by all
new character drivers. All existing drivers that already made use of
libchardriver have been changed to use the new API.

As one of the most important API changes, support for scatter and
gather transfers has been removed, as several key drivers already
did not support this, and it could be supported at the safecopy
level instead (for a future readv/writev).

Additional changes include:

- respond to block device open requests to avoid hanging VFS threads;
- add support for sef_cancel.

Change-Id: I1bab6c1cb66916c71b87aeb1db54a9bdf171fe6b

10 years agoblocktest: add support for no alignment
David van Moolenbroek [Thu, 1 Aug 2013 16:20:33 +0000 (18:20 +0200)]
blocktest: add support for no alignment

Some block drivers do not impose any alignment requirements, and this
patch allows such block drivers to pass the test set. As a side effect,
minimal support for min_write is added, but this part of blocktest is
in need of further improvement.

Change-Id: I9ea81433a6fe1177742020e6a584f876043d7e9a

10 years agolibutil: let opendisk(3) try /dev
David van Moolenbroek [Tue, 17 Apr 2012 22:04:28 +0000 (00:04 +0200)]
libutil: let opendisk(3) try /dev

If a device node is given without path, and opening the node fails
initially, prepend "/dev/" to the node name and try opening again.
This is more in line with NetBSD behavior.

Change-Id: Ib544aec52abe43132510f0e4b173b00fb3dbaab8

10 years agoBlock drivers: make IOCTL request unsigned long 66/966/2
David van Moolenbroek [Tue, 10 Sep 2013 21:57:32 +0000 (23:57 +0200)]
Block drivers: make IOCTL request unsigned long

The block driver protocol and libblockdriver's bdr_ioctl hook are
changed, as well as the users of this hook. Other parts of the system
are expected to change accordingly eventually, since the ioctl(2)
prototype has been aligned with NetBSD's.

Change-Id: Ide46245b22cfa89ed267a38088fb0ab7696eba92

10 years agoBlock protocol: add user endpoint to IOCTL request 65/965/2
David van Moolenbroek [Fri, 26 Jul 2013 22:49:49 +0000 (00:49 +0200)]
Block protocol: add user endpoint to IOCTL request

I/O control requests now come with the endpoint of the user process
that initiated the ioctl(2) call. It is stored in a new BDEV_USER
field, which is an alias for BDEV_FLAGS. The contents of this field
are to be used only in highly specific situations. It should be
preserved (not replaced!) by services that forward IOCTL requests,
and may be set to NONE for service-initiated IOCTL requests.

Change-Id: I68a01b9ce43eca00e61b985a9cf87f55ba683de4

10 years agoBlock protocol: use own [RW]_BIT definitions 64/964/2
David van Moolenbroek [Fri, 26 Jul 2013 22:49:49 +0000 (00:49 +0200)]
Block protocol: use own [RW]_BIT definitions

The original R_BIT and W_BIT definitions have nothing to do with the
way these bits are used. Their distinct usage is more apparent when
they have different names.

Change-Id: Ia984457f900078b2e3502ceed565fead4e5bb965

10 years agolibblockdriver: expose BLOCKDRIVER_MAX_DEVICES 63/963/2
David van Moolenbroek [Tue, 10 Sep 2013 21:35:15 +0000 (23:35 +0200)]
libblockdriver: expose BLOCKDRIVER_MAX_DEVICES

This constant determines the range of valid device_id_t values that
a block driver can return from the bdr_device hook: a value between
0 and (BLOCKDRIVER_MAX_DEVICES - 1) inclusive.

Change-Id: I80fac469e88ac13d4b869007e6f2c2f7569da433

10 years agolibblockdriver: various updates 62/962/2
David van Moolenbroek [Wed, 11 Sep 2013 11:33:00 +0000 (13:33 +0200)]
libblockdriver: various updates

- internal structure rearrangement;
- respond to char device open requests to avoid hanging VFS threads;
- make drivers use designated initializers;
- use devminor_t for all minor device numbers;
- change bdr_other hook to take ipc_status and return nothing;
- fix default geometry computation;
- add support for sef_cancel.

Change-Id: Ia063a136a3ddb2b78de36180feda870605753d70

10 years agoBlock drivers: reply ENOTTY to unknown IOCTLs 61/961/2
David van Moolenbroek [Sun, 1 Sep 2013 12:34:17 +0000 (14:34 +0200)]
Block drivers: reply ENOTTY to unknown IOCTLs

Change-Id: Ie2e82d2491d546f4dd73b009100646e249a147b5

10 years agoMove SUB_PER_DRIVE definition into minix/drvlib.h
David van Moolenbroek [Sun, 28 Jul 2013 12:03:07 +0000 (14:03 +0200)]
Move SUB_PER_DRIVE definition into minix/drvlib.h

Change-Id: Id25761085ce1868955da34d8e530e170448ea154

10 years agoVFS: update filp_pos on chardev I/O (workaround) 60/960/2
David van Moolenbroek [Mon, 2 Sep 2013 15:34:44 +0000 (17:34 +0200)]
VFS: update filp_pos on chardev I/O (workaround)

Previously, reading from or writing to a character device would not
update the file position on the corresponding filp object.  Performing
this update correctly is not trivial: during and after the I/O
operation, the filp object must not be locked.  Ideally, read/write
requests on a filp that is already involved in a read/write operation,
should be queued.  For now, we optimistically update the file position
at the start of the I/O; this works under the assumptions listed in
the corresponding comment.

Change-Id: I172a61781850423709924390ae3df1f2d1f94707

10 years agoI2C: change BUSC_I2C_xxx to use own protocol 59/959/2
David van Moolenbroek [Mon, 2 Sep 2013 11:45:02 +0000 (13:45 +0200)]
I2C: change BUSC_I2C_xxx to use own protocol

Previously it would use bits of the character driver protocol, which
will change heavily.  In the new situation, the BUSC_I2C_xxx requests
use a protocol more in line with the PCI protocol, with the reply code
in m_type.

Change-Id: I51597b3f191078c8178ce17372de123031f7a4c4

10 years agotests: add test77 for opening/closing PTYs 58/958/2
David van Moolenbroek [Sat, 31 Aug 2013 14:13:37 +0000 (16:13 +0200)]
tests: add test77 for opening/closing PTYs

Change-Id: I30e3418f75137aa08037fa6581ff3d4cce32a114

10 years agoTTY: fix for PTY open/close logic 57/957/2
David van Moolenbroek [Sat, 31 Aug 2013 14:08:25 +0000 (16:08 +0200)]
TTY: fix for PTY open/close logic

Opening and closing the master side of a pseudo terminal without
opening the slave side would result in the pseudo terminal becoming
permanently unavailable.  In addition, reopening the slave side
would be possible but not allow for I/O.  Finally, attempting to
open an in-use master would wipe its I/O state.  These issues have
been resolved.

Change-Id: I9235e3d9aba321803f9280b86b6b5e3646ad5ef3

10 years agotests: remove select subdirectory 56/956/2
David van Moolenbroek [Fri, 30 Aug 2013 16:48:56 +0000 (18:48 +0200)]
tests: remove select subdirectory

This test set has been obsoleted by test40.

Change-Id: I55439152824906778ad07d409dfb327ac10bea70

10 years agotests: add test76 for interrupting VFS operations 55/955/2
David van Moolenbroek [Fri, 30 Aug 2013 16:43:23 +0000 (18:43 +0200)]
tests: add test76 for interrupting VFS operations

Change-Id: Ic436cac61de8c42e0c7ee2d442c647528654cde9

10 years agoVFS: fix interruption of blocking pipe operations 54/954/2
David van Moolenbroek [Wed, 28 Aug 2013 11:08:16 +0000 (13:08 +0200)]
VFS: fix interruption of blocking pipe operations

POSIX states that when interrupted, partially successful pipe
operations should return the partial result rather than EINTR. VFS
previously wouldn't look at the partial result, and not clear it
either, which would result in a panic upon the next pipe operation.

Change-Id: Ia1eb72b4b77394051444e63a1390d49bb315eb04

10 years agolibmthread: do not dump stack for free threads 53/953/2
David van Moolenbroek [Thu, 29 Aug 2013 22:57:16 +0000 (00:57 +0200)]
libmthread: do not dump stack for free threads

Change-Id: Ic438a252f5bddaf1513f554c71173e6fffb0c674

10 years agoVFS: worker thread model overhaul 52/952/2
David van Moolenbroek [Fri, 30 Aug 2013 12:00:50 +0000 (14:00 +0200)]
VFS: worker thread model overhaul

The main purpose of this patch is to fix handling of unpause calls
from PM while another call is ongoing. The solution to this problem
sparked a full revision of the threading model, consisting of a large
number of related changes:

- all active worker threads are now always associated with a process,
  and every process has at most one active thread working for it;
- the process lock is always held by a process's worker thread;
- a process can now have both normal work and postponed PM work
  associated to it;
- timer expiry and non-postponed PM work is done from the main thread;
- filp garbage collection is done from a thread associated with VFS;
- reboot calls from PM are now done from a thread associated with PM;
- the DS events handler is protected from starting multiple threads;
- support for a system worker thread has been removed;
- the deadlock recovery thread has been replaced by a parameter to the
  worker_start() function; the number of worker threads has
  consequently been increased by one;
- saving and restoring of global but per-thread variables is now
  centralized in worker_suspend() and worker_resume(); err_code is now
  saved and restored in all cases;
- the concept of jobs has been removed, and job_m_in now points to a
  message stored in the worker thread structure instead;
- the PM lock has been removed;
- the separate exec lock has been replaced by a lock on the VM
  process, which was already being locked for exec calls anyway;
- PM_UNPAUSE is now processed as a postponed PM request, from a thread
  associated with the target process;
- the FP_DROP_WORK flag has been removed, since it is no longer more
  than just an optimization and only applied to processes operating on
  a pipe when getting killed;
- assignment to "fp" now takes place only when obtaining new work in
  the main thread or a worker thread, when resuming execution of a
  thread, and in the special case of exiting processes during reboot;
- there are no longer special cases where the yield() call is used to
  force a thread to run.

Change-Id: I7a97b9b95c2450454a9b5318dfa0e6150d4e6858

10 years agoRetire ptrace(T_DUMPCORE), dumpcore(1), gcore(1) 51/951/2
David van Moolenbroek [Wed, 28 Aug 2013 13:58:30 +0000 (15:58 +0200)]
Retire ptrace(T_DUMPCORE), dumpcore(1), gcore(1)

The T_DUMPCORE implementation was not only broken - it would currently
produce a coredump of the tracer process rather than the traced
process - but also deeply flawed, and fixing it would require serious
alteration of PM's internal state machine. It should be possible to
implement the same functionality in userland, and that is now the
suggested way forward. For now, also remove the (identical) utilities
using T_DUMPCORE: dumpcore(1) and gcore(1).

Change-Id: I1d51be19c739362b8a5833de949b76382a1edbcc

10 years agoVFS: process char driver replies from main thread 50/950/2
David van Moolenbroek [Fri, 30 Aug 2013 11:42:51 +0000 (13:42 +0200)]
VFS: process char driver replies from main thread

Previously, processing of some replies coming from character drivers
could block on locks, and therefore, such processing was done from
threads that were associated to the character driver process. The
hidden consequence of this was that if all threads were in use, VFS
could drop replies coming from the driver. This patch returns VFS to
a situation where the replies from character drivers are processed
instantly from the main thread, by removing the situations that may
cause VFS to block while handling those replies.

- change the locking model for select, so that it will never block
  on any processing that happens after the select call has been set
  up, in particular processing of character driver select replies;
- clearly mark all select routines that may never block;
- protect against race conditions in do_select as result of the
  locking that still does happen there (as is required for pipes);
- also handle select timers from the main thread;
- move processing of character driver replies into device.c.

Change-Id: I4dc8e69f265cbd178de0fbf321d35f58f067cc57

10 years agoVFS: properly cancel select queries on unpause 49/949/2
David van Moolenbroek [Sat, 24 Aug 2013 22:26:38 +0000 (00:26 +0200)]
VFS: properly cancel select queries on unpause

Change-Id: I16e71db3f5c1bcc7ba6045bc9f02b13d71dc31eb

10 years agoVFS: remove support for sync char driver protocol 48/948/2
David van Moolenbroek [Fri, 30 Aug 2013 11:33:56 +0000 (13:33 +0200)]
VFS: remove support for sync char driver protocol

Change-Id: I57cc870a053b813b3a3fc45da46606ea84fe4cb1

10 years agoVFS: remove FP_BLOCKED_ON_DOPEN 47/947/2
David van Moolenbroek [Fri, 30 Aug 2013 11:00:44 +0000 (13:00 +0200)]
VFS: remove FP_BLOCKED_ON_DOPEN

These days, DEV_OPEN calls to character drivers block the calling
thread until completion or failure, and thus never return SUSPEND to
the caller. The same already applied to BDEV_OPEN calls to block
drivers. It has thus become impossible for a process to enter a state
of being blocked on a device open call.

There is currently no support for restarting device open calls to
restarted character drivers. This support was present in the _DOPEN
logic, but was already no longer triggering. In the future, this case
should be handled by the thread performing the open request.

Change-Id: I6cc1e7b4c9ed116c6ce160b315e6e060124dce00

10 years agoPFS: remember request information for IOCTLs 46/946/2
David van Moolenbroek [Fri, 30 Aug 2013 10:18:27 +0000 (12:18 +0200)]
PFS: remember request information for IOCTLs

Not doing so caused PFS to commit protocol violations by relying on
stale information when sending replies. This stale information always
happened to be correct, which is why the problem went unnoticed.
Change-Id: Ia42ca670718d6e731193cd2c34a3ff455f8a94d3

10 years agoRetire the synchronous character driver protocol 45/945/2
David van Moolenbroek [Fri, 30 Aug 2013 09:14:03 +0000 (11:14 +0200)]
Retire the synchronous character driver protocol

- change all sync char drivers into async drivers;
- retire support for the sync protocol in libchardev;
- remove async dev style, as this is now the default;
- remove dev_status from VFS;
- clean up now-unused protocol messages.

Change-Id: I6aacff712292f6b29f2ccd51bc1e7d7003723e87

10 years agoSync char protocol: add nonblocking transfer flag 44/944/2
David van Moolenbroek [Fri, 30 Aug 2013 08:48:34 +0000 (10:48 +0200)]
Sync char protocol: add nonblocking transfer flag

The async char protocol already has this, so this patch closes the
gap between the two protocols a bit. Support for this flag has been
added to all sync char drivers that support CANCEL at all.

The LOG driver was already using the asynchronous protocol, but it
did not support the nonblocking transfer flag. This has been fixed
as well.

Change-Id: Ia55432c9f102765b59ad3feb45a8bd47a782c93f

10 years agoVFS: set w_drv_sendrec only when needed 43/943/2
David van Moolenbroek [Sat, 24 Aug 2013 10:29:39 +0000 (12:29 +0200)]
VFS: set w_drv_sendrec only when needed

As with w_task, this ensures that the field remains cleared if it is
not used. Without this, worker_stop could mistakenly identify a thread
as talking to a device driver rather than a (crashed) file server.

Change-Id: I7d3ebed3efc3cd4f5c891f61c67a6463109b6376

10 years agoVFS: set w_task only when needed 42/942/2
Thomas Veerman [Sat, 24 Aug 2013 10:23:41 +0000 (12:23 +0200)]
VFS: set w_task only when needed

It was always set, but not always cleared, when talking to asynchronous
drivers. This could cause erratic behavior upon a driver crash.

Normally, a worker thread's w_task field is set when it's about to
communicate with a driver or FS. Then upon receiving a reply we can
do sanity checks (that the thread we want to wake up was actually
waiting for a reply). Also, when a driver/FS crashes, we can identify
which worker threads were talking to the crashed endpoint and handle
the error gracefully.

Asynchronous drivers are a bit special, though. In most cases, the
sender of the request is not interested in the reply (the sender was
suspended and only wants to know whether the request was successfully
caried out or not). However, the open request is special, as the reply
carries information needed by the sender. This is the only request
where a worker thread actually yields and waits for the result. This is
also the only case where we're interested in setting w_task for
asynchronous drivers.

Change-Id: Ia1ce2747937df376122b5e13b6a069de27fcc379

10 years agoRemoving CSU patches 41/941/2
Lionel Sambuc [Fri, 13 Sep 2013 18:12:22 +0000 (20:12 +0200)]
Removing CSU patches

 * Removed startup code patches in lib/csu regarding kernel to userland
   ABI.

 * Aligned stack layout on NetBSD stack layout.

 * Generate valid stack pointers instead of offsets by taking into account
   _minix_kerninfo->kinfo->user_sp.

 * Refactored stack generation, by moving part of execve in two
   functions {minix_stack_params(), minix_stack_fill()} and using them
   in execve(), rs and vm.

 * Changed load offset of rtld (ld.so) to:
      execi.args.stack_high - execi.args.stack_size - 0xa00000
   which is 10MB below the main executable stack.

Change-Id: I839daf3de43321cded44105634102d419cb36cec

10 years agoSet M3_STRING to M3_LONG_STRING (ABI break) 40/940/2
David van Moolenbroek [Sun, 1 Sep 2013 08:29:57 +0000 (10:29 +0200)]
Set M3_STRING to M3_LONG_STRING (ABI break)

Change-Id: Id48bbd4ba3000acf8a891445b4c890b1b42bd72f

10 years agoRemove support for obsolete 3.2.1 ABI 39/939/2
David van Moolenbroek [Sat, 31 Aug 2013 21:11:34 +0000 (23:11 +0200)]
Remove support for obsolete 3.2.1 ABI

Change-Id: I76b4960bda41f55d9c42f8c99c5beae3424ca851

10 years agoFix various file system warnings 38/938/2
David van Moolenbroek [Sat, 31 Aug 2013 20:59:44 +0000 (22:59 +0200)]
Fix various file system warnings

Change-Id: Ied10498c3ae14f9f2fd06914f23239df330fa296

10 years agoVFS/FS: replace protocol version with flag field 37/937/2
David van Moolenbroek [Sat, 31 Aug 2013 19:48:15 +0000 (21:48 +0200)]
VFS/FS: replace protocol version with flag field

The main motivation for this change is that only Loris supports
multithreading, and Loris supports dynamic thread allocation, so the
number of supported threads can be implemented as a bit flag (i.e.,
either 1 or "at least as many as VFS has"). The ABI break obviates the
need to support file system versioning at this time, and several
other aspects are better implemented as flags as well. Other changes:

- replace peek/bpeek test upon mount with FS flag as well;
- mark libsffs as 64-bit file size capable;
- remove old (3.2.1) getdents support.

Change-Id: I313eace9c50ed816656c31cd47d969033d952a03

10 years agoImport NetBSD df(1) 36/936/2
David van Moolenbroek [Mon, 19 Aug 2013 18:34:15 +0000 (20:34 +0200)]
Import NetBSD df(1)

Change-Id: I7a99e335da666a15b43b9daeb59dbfee516f0118

10 years agoEnable getmntinfo(3) 35/935/2
David van Moolenbroek [Mon, 19 Aug 2013 23:33:43 +0000 (01:33 +0200)]
Enable getmntinfo(3)

Change-Id: Ida9b0660471bb9fde3cdca6c9b9fd9e94341e02f

10 years agotest55: add tests for getvfsstat(2) 34/934/2
David van Moolenbroek [Mon, 19 Aug 2013 22:49:07 +0000 (00:49 +0200)]
test55: add tests for getvfsstat(2)

Change-Id: Idc3da4137494db836590c71414017832f15a2628

10 years agoImplement support for [f]statvfs1(2) 33/933/2
David van Moolenbroek [Mon, 19 Aug 2013 23:28:23 +0000 (01:28 +0200)]
Implement support for [f]statvfs1(2)

The [f]statvfs(3) calls now use [f]statvfs1(2).

Change-Id: I949c177fc14abf976e45165c342f897f4ec988ee

10 years agoImplement support for getvfsstat(2) 32/932/2
David van Moolenbroek [Mon, 19 Aug 2013 23:39:47 +0000 (01:39 +0200)]
Implement support for getvfsstat(2)

Change-Id: I99b697919d411c57105de561105beefc7d1d309a

10 years agoRedo mount(2)/umount(2) ABI 31/931/2
David van Moolenbroek [Mon, 19 Aug 2013 23:37:18 +0000 (01:37 +0200)]
Redo mount(2)/umount(2) ABI

- pass in file system type through mount(2), and return this type in
  statvfs structures as generated by [f]statvfs(2);
- align mount flags field with NetBSD's, splitting out service flags
  which are not to be passed to VFS;
- remove limitation of mount ABI to 16-byte labels, so that labels
  can be made larger in the future;
- introduce new m11 message union type for mount(2) as side effect.

Change-Id: I88b7710e297e00a5e4582ada5243d3d5c2801fd9

10 years agoAlign "struct statvfs" with NetBSD 30/930/2
David van Moolenbroek [Mon, 19 Aug 2013 23:35:35 +0000 (01:35 +0200)]
Align "struct statvfs" with NetBSD

This is a requirement for implementing calls such as getmntinfo(3).
VFS is now responsible for filling in some of the structure's fields.

Change-Id: I0c1fa78019587efefd2949b3be38cd9a7ddc2ced

10 years agoVFS/FS: remove fstatfs(2) and REQ_FSTATFS 29/929/2
David van Moolenbroek [Mon, 19 Aug 2013 22:55:49 +0000 (00:55 +0200)]
VFS/FS: remove fstatfs(2) and REQ_FSTATFS

The fstatfs(3) call now uses fstatvfs(2).

Change-Id: I3fa5d31f078457b4d80418c23060bb2c148cb460