]> Zhao Yanbai Git Server - minix.git/log
minix.git
7 years agoPM/libsys: extend getepinfo, add getsockcred(3) 27/3427/1
David van Moolenbroek [Tue, 12 Jul 2016 14:46:27 +0000 (14:46 +0000)]
PM/libsys: extend getepinfo, add getsockcred(3)

The service-only getepinfo(2) PM call returns information about a
given endpoint.  This patch extends that call so that it returns
enough information to allow correctly filling a sockcred structure.
A new getsockcred(3) function is added to libsys to fill an actual
sockcred structure with the obtained information.  However, for the
caller's convenience, the groups list is kept separate.

Change-Id: I9f1a6d1a221c77eabaa3498ff4ec9a5fb922e4fd

7 years agolibsys: retire getnucred in favor of getepinfo 26/3426/1
David van Moolenbroek [Wed, 27 Jan 2016 23:24:56 +0000 (23:24 +0000)]
libsys: retire getnucred in favor of getepinfo

The getnucred() function was used by UDS to obtain credentials of user
processes in a form used in the UDS API, namely the ucred structure.
Since the NetBSD merge, this structure has changed drastically (aside
from being renamed to "uucred"), and it is no longer in UDS's best
interest to use this structure internally.  Therefore, getnucred() is
no longer a useful API either, and instead we directly use the
previously private getepinfo() function to obtain credentials.

Change-Id: I80bc809de716ec0a9b7497cb109d2f2708a629d5

7 years agoUDS: prepare for socket file creation in bind(2) 25/3425/1
David van Moolenbroek [Sun, 27 Dec 2015 19:35:12 +0000 (19:35 +0000)]
UDS: prepare for socket file creation in bind(2)

This patch prepares for moving of the creation of socket files on the
file system from the libc bind(2) stub into the UDS service.  This
change is necessary for the socket type agnostic libc implementation.
The change is not yet activated - the code that is not yet used is
enclosed in "#if NOT_YET" blocks.  The activation needs to be atomic
with UDS's switch to libsockdriver; otherwise, user applications may
break.

As part of the change, various UDS bind(2) semantics are changed to
match the POSIX standard and other operating systems.  In
implementation terms, the service-only VFS API checkperms(2) is
renamed to socketpath(2), and extended with a new subcall which
creates a new socket file.  An extension to test56 checks the new
bind(2) semantics of UDS, although most new tests are still disabled
until activation as well.

Finally, as further preparation for a more structural redesign of the
UDS service, also return the <device,inode> number pair for the
created or checked file name, and make returning the canonized path
name optional.

Change-Id: I892d04b3301d4b911bdc571632ddde65fb747a8a

7 years agoAdd libsockevent: a socket event dispatching library 24/3424/1
David van Moolenbroek [Thu, 21 Jul 2016 20:59:26 +0000 (20:59 +0000)]
Add libsockevent: a socket event dispatching library

This library provides an event-based abstraction model and dispatching
facility for socket drivers.  Its main goal is to eliminate any and
all need for socket drivers to keep track of pending socket calls.
Additionally, this library takes over responsibility of a number of
other tasks that would otherwise be duplicated between socket drivers,
but in such a way that individual socket drivers retain a large degree
of freedom in terms of API behavior.  The library's main features are:

- suspension, resumption, and cancellation of socket calls;
- an abstraction layer for select(2);
- state tracking of shutdown(2);
- pending (asynchronous) errors and the SO_ERROR socket option;
- listening-socket tracking and the SO_ACCEPTCONN socket option;
- generation of SIGPIPE signals; SO_NOSIGPIPE, MSG_NOSIGNAL;
- send and receive low-watermark tracking, SO_SNDLOWAT, SO_RCVLOWAT;
- send and receive timeout support and SO_SNDTIMEO, SO_RCVTIMEO;
- an abstraction layer for the SO_LINGER socket option;
- tracking of various on/off socket options as well as SO_TYPE;
- a range of pre-checks on socket calls that are required POSIX.

In order to track per-socket state, the library manages an opaque
"sock" object for each socket.  The allocation of such objects is left
entirely to the socket driver.  Each sock object has an associated
callback table for calls from libsockevent to the socket driver.  The
socket driver can raise events on the sock object in order to flag
that any previously suspended operations of a particular type should
be resumed.  The library may defer processing such raised events if
immediate processing could interfere with internal consistency.

The sockevent library is layered on top of libsockdriver, and should
be used by all socket driver implementations if at all possible.

Change-Id: I3eb2c80602a63ef13035f646473360293607ab76

7 years agoAdd libsockdriver: a library for socket drivers 23/3423/1
David van Moolenbroek [Sun, 21 Feb 2016 22:15:35 +0000 (22:15 +0000)]
Add libsockdriver: a library for socket drivers

This library provides abstractions for socket drivers, and should be
used as the basis for all socket driver implementations.  It provides
the following functionality:

  - a function call table abstraction, hiding the details of the
    socket driver protocol with simple parameters and presenting the
    socket driver with callback functions very similar to the BSD
    socket API calls made from userland;
  - abstracting data structures and helper functions for suspending
    and resuming blocking calls;
  - abstracting data structures and helper functions for copying data
    from and to the caller.

Overall, the library is similar to lib{block,char,fs,input,net}driver
in concept.  Some of the abstractions provided here should in fact be
applied to libchardriver as well.  As always, for the case that the
provided message loop is too restrictive, a set of more low-level
message processing functions is provided.

Change-Id: I79ec215f5e195c3b0197e223636f987d3755fb13

7 years agoVFS: support close-on-exec flag for copyfd(2) 22/3422/1
David van Moolenbroek [Wed, 20 Jul 2016 13:03:03 +0000 (13:03 +0000)]
VFS: support close-on-exec flag for copyfd(2)

The flag is supported only when copying out file descriptors (i.e.
COPYFD_TO).  It will be used by UDS to support MSG_CMSG_CLOEXEC.

Change-Id: I46bfd04b5f28e22ec48938e43e42f78d3931220d

7 years agoVFS: deny copying sockets to owning socket driver 21/3421/1
David van Moolenbroek [Wed, 20 Jul 2016 12:47:34 +0000 (12:47 +0000)]
VFS: deny copying sockets to owning socket driver

This patch stops a socket driver from using copyfd(2) to copy in a
file descriptor that is a reference to a socket owned by that socket
driver, returning EDEADLK instead.  In effect, this will stop deadlock
and resource exhaustion issues with UDS once it has been converted to
a socket driver.  See the comment in the patch for details.

Change-Id: I5728a405eabda207725618231a6ff7be2d517146

7 years agoVFS: support for suspending close(2) for sockets 20/3420/1
David van Moolenbroek [Mon, 25 Jul 2016 11:11:37 +0000 (11:11 +0000)]
VFS: support for suspending close(2) for sockets

This change effectively adds the VFS side of support for the SO_LINGER
socket option, by allowing file descriptor close operations to be
suspended (and later resumed) by socket drivers.  Currently, support
is limited to the close(2) system call--in all other cases where file
descriptors are closed (dup2, close-on-exec, process exit..), the
close operation still completes instantly.  As a general policy, the
close(2) return value will always indicate that the file descriptor
has been closed: either 0, or -1 with errno set to EINPROGRESS.  The
latter error may be thrown only when a suspended close is interrupted
by a signal.

As necessary for UDS, this change also introduces a closenb(2) system
call extension, allowing the caller to bypass blocking SO_LINGER close
behavior.  This extension allows UDS to avoid blocking on closing the
last reference to an in-flight file descriptor, in an atomic fashion.
The extension is currently part of libsys, but there is no reason why
userland would not be allowed to make this call, so it is deliberately
not protected from use by userland.

Change-Id: Iec77d6665232110346180017fc1300b1614910b7

7 years agoVFS: change select(2) semantics for closed filps 19/3419/1
David van Moolenbroek [Thu, 2 Feb 2017 16:20:33 +0000 (16:20 +0000)]
VFS: change select(2) semantics for closed filps

If a select(2) call was issued on a file descriptor for which the file
pointer was closed due to invalidation (FILP_CLOSED), typically as the
result of a character/socket driver dying, the call would previously
return with an error: EINTR upon call entry or EIO on invalidation at
at a later time.  Especially the former could severely confuse
applications, which would assume the call was interrupted by a signal,
restart the select call and immediately get EINTR again, ad infinitum.

This patch changes the select(2) semantics such that for closed filps,
the file descriptor is returned as readable and/or writable (depending
on the requested operations), as such letting the entire select call
finish successfully.  Applications will then typically attempt to read
from and/or write to the file descriptor, resulting in an I/O error
that they should generally be better equipped to handle.

This patch also fixes a potential problem with returning early from a
select(2) call if a bad file descriptor is given: previously, in such
cases not all actions taken so far would be undone; now they are.

Change-Id: Ia6581f8789473a8a6c200852fccf552691a17025

7 years agoVFS: add BSD socket API, socket driver support 18/3418/1
David van Moolenbroek [Sun, 21 Feb 2016 19:28:24 +0000 (19:28 +0000)]
VFS: add BSD socket API, socket driver support

This patch adds the implementation of the BSD socket system calls
which have been introduced in an earlier patch.  At the same time, it
adds support for communication with socket drivers, using a new
"socket device" (SDEV_) protocol.  These two parts, implemented in
socket.c and sdev.c respectively, form the upper and lower halves of
the new BSD socket support in VFS.  New mapping functionality for
socket domains and drivers is added as well, implemented in smap.c.

The rest of the changes mainly facilitate the separation of character
and socket driver calls, and do not make any fundamental alterations.
For example, while this patch changes VFS's select.c rather heavily,
the new select logic for socket drivers is the exact same as for
character drivers; the changes mainly separate the driver type
specific parts from the generic select logic further than before.

Change-Id: I2f13084dd3c8d3a68bfc69da0621120c8291f707

7 years agoRS: add infrastructure for mapping socket drivers 17/3417/1
David van Moolenbroek [Sun, 21 Feb 2016 18:43:17 +0000 (18:43 +0000)]
RS: add infrastructure for mapping socket drivers

This patch introduces the first piece of support for the concept of
"socket drivers": services that implement one or more socket protocol
families.  The latter are also known as "domains", as per the first
parameter of the socket(2) API.  More specifically, this patch adds
the basic infrastructure for specifying that a particular service is
the socket driver for a set of domains.

Unlike major number mappings for block and character drivers, socket
domain mappings are static.  For that reason, they are specified in
system.conf files, using the "domain" keyword.  Such a keyword is to
be followed by one or more protocol families, without their "PF_"
prefix.  For example, a service with the line "domain INET INET6;"
will be mapped as the socket driver responsible for the AF_INET and
AF_INET6 protocol families.

This patch implements only the infrastructure for creating such
mappings; the actual mapping will be implemented in VFS in a later
patch.  The infrastructure is implemented in service(8), RS, and VFS.

For now there is a hardcoded limit of eight domains per socket driver.
This may sound like a lot, but the upcoming new LWIP service will
already use four of those.  Also, it is allowed for a service to be
both a block/character driver and a socket driver at the same time,
which is a requirement for the new LWIP service.

Change-Id: I93352d488fc6c481e7079248082895d388c39f2d

7 years agolibc: switch to NetBSD getifaddrs(3) 16/3416/1
David van Moolenbroek [Fri, 17 Jun 2016 14:11:47 +0000 (14:11 +0000)]
libc: switch to NetBSD getifaddrs(3)

Change-Id: I698f7cef84506ebd7beed6974a232eb75ab853c3

7 years agoImport NetBSD getent(1) 15/3415/1
David van Moolenbroek [Thu, 9 Mar 2017 18:58:26 +0000 (18:58 +0000)]
Import NetBSD getent(1)

Disable RPC support for now.

Change-Id: I5ccb435220bf20cd9089cdd7aacb7d126f62f119

7 years agoFix two mistakes in IP1000 driver 14/3414/1
Jia-Ju Bai [Thu, 9 Mar 2017 07:26:42 +0000 (07:26 +0000)]
Fix two mistakes in IP1000 driver

Change-Id: Iafdfc7496c0ed45727f414c35350cf86b644413b

7 years agoisofs: fix reported st_blocks stat(2) field 13/3413/1
David van Moolenbroek [Sun, 26 Feb 2017 22:18:21 +0000 (22:18 +0000)]
isofs: fix reported st_blocks stat(2) field

The st_blocks field should count 512-byte units, not file system
block units.  The previous computation would cause utilities such
as du(1), when used on isofs, to be off by a factor four.

Change-Id: If47c234079d19bd5b41f35a97780667efd822509

7 years agoetc: replace one more "service" with minix-service 12/3412/1
David van Moolenbroek [Sat, 25 Feb 2017 23:59:13 +0000 (23:59 +0000)]
etc: replace one more "service" with minix-service

This omission would cause the test set to hang, at least, if the
old /bin/service was indeed deleted.

Change-Id: I9423ecc77a4bf778973de81a49300748ce8c3dfd

7 years agoramdisk: clean up CD boot output 11/3411/1
David van Moolenbroek [Fri, 24 Feb 2017 18:18:16 +0000 (18:18 +0000)]
ramdisk: clean up CD boot output

In particular, remove a stray '1'.

Change-Id: If82689060a92a4af318b01325492627944fba07f

7 years agoshare: also install other existing manpages 10/3410/1
David van Moolenbroek [Thu, 23 Feb 2017 13:35:03 +0000 (13:35 +0000)]
share: also install other existing manpages

A pair of manual pages were already present in /usr/share/man, but
not yet installed.  Install them as well.  Lots and lots more from
NetBSD's set of manual pages should be imported, though.

Change-Id: Ie2e8946967afcb2e71de563f06fa331586dcb31d

7 years agoImport NetBSD service(8) 09/3409/1
David van Moolenbroek [Thu, 23 Feb 2017 11:40:08 +0000 (11:40 +0000)]
Import NetBSD service(8)

Change-Id: I48a4958424ebcdbd279b11e5425a6cd1b4a73121

7 years agoNo longer auto-start pkgsrc packages 08/3408/1
David van Moolenbroek [Thu, 23 Feb 2017 11:34:42 +0000 (11:34 +0000)]
No longer auto-start pkgsrc packages

In order to comply with the pkgsrc standards, pkgsrc packages are no
longer auto-started.  Instead, we require that users follow the common
pkgsrc procedure: to start a pkgsrc package as part of system startup,
copy its startup script from /usr/pkg/etc/rc.d to /etc/rc.d, and make
the appropriate changes to /etc/rc.conf.

This change affects in particular the openssh package, of which its
ssh daemon is no longer auto-started.  However, installing this
package also no longer causes all kinds of Kerberos-related warnings
to be reported at boot time now.

Also remove a leftover reference to the defunct ddekit usb package.

Change-Id: I4d42f6ca1ab5e3bc2ec296bc7c0e3056964ae451

7 years agoInitial import of NetBSD rc system 07/3407/1
David van Moolenbroek [Mon, 13 Feb 2017 13:35:23 +0000 (13:35 +0000)]
Initial import of NetBSD rc system

IMPORTANT: this change has a docs/UPDATING entry!

This patch performs an initial import of the infrastructure and a
subset of the NetBSD set of rc startup and shutdown scripts.  The
"initial" refers to the fact that this is not yet a full switch to the
NetBSD rc system: the MINIX ramdisk rc script, which (typically) runs
as the first thing, is kept as is.  After mounting the root file
system, the ramdisk rc script will start the NetBSD rc infrastructure
by invoking /etc/rc, however.  The regular MINIX startup-and-shutdown
script has been moved from /etc/rc to /etc/rc.minix, and is now
invoked as part of the NetBSD rc infrastructure through a bridge rc
script /etc/rc.d/minixrc.  /etc/rc.minix invokes /usr/etc/rc as before.

Switching over the ramdisk to the NetBSD system and decomposing the
MINIX rc.minix script into smaller components are left to future work.
Also, the current pkgsrc etc/rc.d auto-start functionality is left as
is, even though it should be removed (see the etc/usr/rc comment).

Change-Id: Ia96cae7c426e94b85c67978dc1307dacc4b09fc5

7 years agoVM: fix race condition communicating with VM 06/3406/1
David van Moolenbroek [Thu, 23 Feb 2017 11:20:33 +0000 (11:20 +0000)]
VM: fix race condition communicating with VM

After processing certain asynchronous requests from VFS, VM would send
an asynchronous reply without supplying the AMF_NOREPLY flag.  As a
result, this asynchronous reply could be taken as the result of an
ipc_sendrec() call, causing the entire VM/VFS communication to become
desynchronized.  The end result was a deadlock-induced panic during a
later request.

This bug was exposed because of the higher-than-usual concurrency
level in the NetBSD rc scripts.  The fix consists of properly setting
the AMF_NOREPLY flag for asynchronous replies.

Change-Id: Iafafe2fdd67f212ecbf27a53862cefba2e4cf7e8

7 years agoVBOX: update current time immediately at startup 05/3405/1
David van Moolenbroek [Mon, 20 Feb 2017 19:13:04 +0000 (19:13 +0000)]
VBOX: update current time immediately at startup

Performing the update at any later time may cause rc scripts to work
with a wrong date, which may have side effects, such as databse files
getting regenerated on every boot.

Change-Id: Idfdbf67ad285300c982d95769007dc88c522b908

7 years agoImport NetBSD services_mkdb(8) 04/3404/1
David van Moolenbroek [Mon, 20 Feb 2017 14:23:24 +0000 (14:23 +0000)]
Import NetBSD services_mkdb(8)

Change-Id: Ia3fc2479d2abb2dbe9afd1b60e0ffbaf377bcf5a

7 years agoImport NetBSD fmt(1) 03/3403/1
David van Moolenbroek [Mon, 20 Feb 2017 15:56:15 +0000 (15:56 +0000)]
Import NetBSD fmt(1)

This requires importing a few files from mail(1) already.  Importing
the rest of mail(1) is left to future work.

Change-Id: If96513a306245cd7fb64660758d0dbd29a36e87c

7 years agoImport NetBSD rcorder(8) 02/3402/1
David van Moolenbroek [Mon, 20 Feb 2017 14:43:53 +0000 (14:43 +0000)]
Import NetBSD rcorder(8)

Change-Id: Id2ed4959f8089189929fc56401d1c70add5ad323

7 years agoRename MINIX service(8) to minix-service(8) 01/3401/1
David van Moolenbroek [Wed, 22 Feb 2017 15:23:10 +0000 (15:23 +0000)]
Rename MINIX service(8) to minix-service(8)

IMPORTANT: this change has a docs/UPDATING entry!

This rename is unfortunately necessary because NetBSD has decided to
create its own service(8) utility, and we will want to import theirs
as well.  The two can obviously not coexist.

Also move ours from /bin to /sbin, as it is a superuser-only utility.

Change-Id: Ic6e46ffb3a84b4747d2fdcb0d74e62dbea065039

7 years agodistrib: more minor fixes 00/3400/1
David van Moolenbroek [Wed, 22 Feb 2017 13:57:23 +0000 (13:57 +0000)]
distrib: more minor fixes

- unbreak MKDEBUGLIB=yes builds
- please do not delete my .exrc file :(

Change-Id: Ib1d40e6894062bd881e50c712da88e7a604f2ad7

7 years agoetc: synchronize master.password, group to NetBSD 99/3399/2
David van Moolenbroek [Fri, 17 Feb 2017 01:30:41 +0000 (01:30 +0000)]
etc: synchronize master.password, group to NetBSD

IMPORTANT: this change has a docs/UPDATING entry!

This change is a long overdue switch-over from the old MINIX set of
user and group accounts to the NetBSD set.  This switch-over is
increasingly important now that we are importing more and more
utilities from NetBSD, several of which expect various user accounts
to exist.  By switching over in one go, we save ourselves various
headaches in the long run, even if the switch-over itself is a bit
painful for existing MINIX users.

The newly imported master.passwd and group files have three exceptions
compared to their NetBSD originals:

1. There is a custom "service" account for MINIX 3 services.  This
   account is used to limit run-time privileges of various system
   services, and is not used for any files on disk.  Its user ID may
   be changed later, but should always correspond to whatever the
   SERVICE_UID definition is set to.
2. The user "bin" has its shell set to /bin/sh, instead of NetBSD's
   /sbin/nologin.  The reason for this is that the test set in
   /usr/tests/minix-posix will not be able to run otherwise.
3. The group "operator" has been set to group ID 0, to match its old
   value.  This tweak is purely for transitioning purposes: as of
   writing, pkgsrc packages are still using root:operator as owner and
   group for most installed files.  Sometime later, we can change back
   "operator" to group ID 5 without breaking anything, because it does
   not appear that this group name is used for anything important.

Change-Id: I689bcfff4cf7ba85c27d1ae579057fa3f8019c68

7 years agodistrib: fix entries that are off 98/3398/1
David van Moolenbroek [Sat, 18 Feb 2017 12:37:22 +0000 (12:37 +0000)]
distrib: fix entries that are off

This small change makes it easier to do sorts without having to deal
with these entries over and over again.

Change-Id: Id5077a17733fa4b535cdc9881109286335d3cb17

7 years agoprintconfig(8): print PCI sub-VID/DID when set 97/3397/1
David van Moolenbroek [Mon, 16 Jan 2017 14:05:45 +0000 (14:05 +0000)]
printconfig(8): print PCI sub-VID/DID when set

In order to allow for proper matching of available drivers to system
hardware, the output of this utility should reflect the full details
of the input from configuration files.  In particular, that includes
sub-IDs of PCI devices when those have been specified.

Change-Id: Iea24d72795cd714268dbdb95df998eb74de8f2bd

7 years agoRetire env.h 96/3396/1
David van Moolenbroek [Sun, 15 Jan 2017 19:14:00 +0000 (19:14 +0000)]
Retire env.h

This was a MINIX3-specific header file placed outside of the minix/
header subdirectory, with its definitions duplicated in the more
standard minix/sysutil.h header.

Also make env_prefix(3) take constant pointers.

Change-Id: I243c38eb38e24eb98f0c0dddf7f340e7fec255f4

7 years agotrace(1): print sin6_scope_id when relevant 95/3395/1
David van Moolenbroek [Mon, 13 Feb 2017 13:41:19 +0000 (13:41 +0000)]
trace(1): print sin6_scope_id when relevant

Site-local addresses are out, as they are RFC-deprecated and not
supported on MINIX 3 at all.  Interface-local and link-local multicast
addresses are in, because they are relevant in the context of a
particular zone ID only.

Change-Id: I64a9ecb472946f717f27a72c4073d78aa1120508

7 years agolibc: more poll(3) wrapper fixes 94/3394/1
David van Moolenbroek [Wed, 15 Feb 2017 19:13:43 +0000 (19:13 +0000)]
libc: more poll(3) wrapper fixes

- POLLRDBAND is reported by select(2) as errorfd, not readfd;
- POLLERR is not the same as errorfd of select(2);
- flags that are not requested should not be returned.

Change-Id: I9cb3c2c260ead5a2852a2fbbc10280c2b5b0dff9

7 years agoAdded Hungarian keyboard layout 93/3393/1
FeZoli [Mon, 6 Feb 2017 06:46:15 +0000 (07:46 +0100)]
Added Hungarian keyboard layout

Change-Id: Ib52ad3723ba6679506128813be962fd68f8998c5

7 years agoVT6105: Restructure the code and correct function order in initialization 92/3392/1
Jia-Ju Bai [Sun, 15 Jan 2017 03:31:13 +0000 (03:31 +0000)]
VT6105: Restructure the code and correct function order in initialization

Change-Id: Ibbc8f835174349501e74dde7163c234effb34bc8

7 years agoIP1000: Restructure the code and correct function order in initialization 91/3391/1
Jia-Ju Bai [Sun, 15 Jan 2017 03:20:36 +0000 (03:20 +0000)]
IP1000: Restructure the code and correct function order in initialization

Change-Id: I7c887a777205ea0ae38b4ef1830535d035c5a976

7 years agoImport NetBSD's passwd.conf 90/3390/2
Jean-Baptiste Boric [Sun, 22 Jan 2017 15:18:49 +0000 (16:18 +0100)]
Import NetBSD's passwd.conf

Without this file, the NetBSD userland will fall back by default to the
old, insecure classic UNIX password hashing algorithm.

This is a big security issue. Please check docs/UPDATING for details.

Change-Id: Ib85646ee4678f91384bab238426ee55ff26da011

7 years agoAdd the driver for Trident 4DWAVE-DX sound card 88/3388/1
Jia-Ju Bai [Wed, 4 Jan 2017 14:00:44 +0000 (14:00 +0000)]
Add the driver for Trident 4DWAVE-DX sound card

Change-Id: I6a4f5427915032a6a4c0246fed35c10397df3e07

7 years agoAdd the driver for CS4281 sound card 87/3387/1
Jia-Ju Bai [Wed, 4 Jan 2017 13:55:10 +0000 (13:55 +0000)]
Add the driver for CS4281 sound card

Change-Id: Ifc1b7c129578c5efa5e328664d10d07ee5df786b

7 years agoAdd the driver for ALS4000 sound card 86/3386/1
Jia-Ju Bai [Wed, 4 Jan 2017 12:46:52 +0000 (12:46 +0000)]
Add the driver for ALS4000 sound card

Change-Id: I2ad08e8479b743ec235d1c9e541faa2fa6a29fcc

7 years agoAdd the driver for CMI8738 sound card 85/3385/1
Jia-Ju Bai [Wed, 4 Jan 2017 12:37:31 +0000 (12:37 +0000)]
Add the driver for CMI8738 sound card

Change-Id: I5a53e3b8652a014e105ca7c77c42a730f6824307

7 years agolibaudiodriver: buffer accounting bugfix 84/3384/1 196/head
David van Moolenbroek [Wed, 28 Dec 2016 13:12:15 +0000 (13:12 +0000)]
libaudiodriver: buffer accounting bugfix

This fixes #191.

Change-Id: I93752161e466b2d03bbcb0838705aab9619c05c8

7 years agolibaudiodriver: readd callback to drv_int_sum() 83/3383/1
David van Moolenbroek [Wed, 28 Dec 2016 13:08:23 +0000 (13:08 +0000)]
libaudiodriver: readd callback to drv_int_sum()

The callback, which was dropped in commit git-842c4ed, allows drivers
to fetch the interrupt status once and save it locally for subsequent
calls to drv_int().

This fixes #190 .

Change-Id: I83918656f637e716f60e9f4c19f1498f761d3b52

7 years agotrace(1): add basic support for timestamps 82/3382/1
David van Moolenbroek [Thu, 15 Dec 2016 18:05:51 +0000 (18:05 +0000)]
trace(1): add basic support for timestamps

This patch adds strace-like support for a -t command line option,
which causes a timestamp to be printed at the beginning of each line.
If the option is given more than once, the output will also include
microseconds.

Change-Id: I8cda581651859448c154b01815cc49d915b7b354

7 years agolibc: make posix_spawn(3) clean up child on failure 81/3381/1
David van Moolenbroek [Tue, 20 Dec 2016 14:46:42 +0000 (14:46 +0000)]
libc: make posix_spawn(3) clean up child on failure

Change-Id: I39a321f23326485fca789e5792a57532d1036716

7 years agotest74: allow to be run from source directory 80/3380/1
David van Moolenbroek [Wed, 28 Dec 2016 12:53:10 +0000 (12:53 +0000)]
test74: allow to be run from source directory

A small fix to allow this test to be run from its original source
directory location, in addition to its installed location.

Change-Id: I4b7afed14ba02b1bea8d9c5f65bc96698a279188

7 years agoFix the process for GNU tools on MINIX 79/3379/1
Antoine Leca [Fri, 4 Nov 2016 18:19:14 +0000 (19:19 +0100)]
Fix the process for GNU tools on MINIX

This is a fix over commit a150b26ee803b20080
On a MINIX station, the tools are not usually built and
on a first-time building of the tree, the fetching script
of texinfo was not triggered in some cases. Let force it.
Reported on minix3 googlegroup by Chris Card.

Change-Id: I8beafdeaec66bb1f1f3250bd64c1e14c0023e9d0

7 years agoFix OPSYS constant in pkg_install tools 78/3378/1
Lionel Sambuc [Wed, 30 Nov 2016 08:31:27 +0000 (08:31 +0000)]
Fix OPSYS constant in pkg_install tools

Change-Id: I84c1596e4ca9b5a016b628deb75c8133d51a6a75

7 years agoAdd the driver for IC Plus 1000A Ethernet card 77/3377/1
Jia-Ju Bai [Wed, 2 Nov 2016 13:18:48 +0000 (13:18 +0000)]
Add the driver for IC Plus 1000A Ethernet card

Change-Id: I9ac119c6285bc63a8b795b44d9ab7d245d9a8832

7 years agoUpdate vt6105 76/3376/1
Jia-Ju Bai [Thu, 24 Nov 2016 16:10:49 +0000 (17:10 +0100)]
Update vt6105

Change-Id: I8136a17eb47f626141bb20b9d6a30f82117425b7

7 years agointroducing libacpi 75/3375/2
rlfnb [Thu, 8 Sep 2016 18:03:12 +0000 (20:03 +0200)]
introducing libacpi

Change-Id: I0808545fefaefc9a8fc8d1101bd85b676467fea0

7 years agoAdded vendor- and device id for Via Rhine III 73/3373/1
rlfnb [Fri, 21 Oct 2016 10:47:39 +0000 (12:47 +0200)]
Added vendor- and device id for Via Rhine III

The device id added is used by ALIX boards.

Change-Id: I78d1ce9f2fa0ee121e68d2c84818f669eeab3092

7 years agovt6105: add a README file 72/3372/1
Jia-Ju Bai [Fri, 21 Oct 2016 02:15:50 +0000 (02:15 +0000)]
vt6105: add a README file

Change-Id: I8dbb122afc130f2f2504743fa4fcbada5c97dff5

7 years agoPM: fix alarm signal delivery 71/3371/1
David van Moolenbroek [Sat, 22 Oct 2016 11:46:28 +0000 (11:46 +0000)]
PM: fix alarm signal delivery

As of change git-87c599d, when processing CLOCK notifications, PM no
longer set the current process pointer 'mp'.  That pointer is however
used when delivering signals through check_sig(), to see whether the
current process may deliver a signal to the target process.  As a
result, delivering SIGALARM signals used a previous pointer in these
checks, causing alarm signals not to be delivered in some cases.
This patch ensures that alarm signals are again delivered with PM as
current process.

Change-Id: I94ccbe8b71289df0e1d6d67928e55297bbc28360

7 years agolibc: remove MINIX3 restrictions from getnameinfo(3) 70/3370/1
David van Moolenbroek [Fri, 21 Oct 2016 23:42:31 +0000 (23:42 +0000)]
libc: remove MINIX3 restrictions from getnameinfo(3)

Change-Id: I4679f6804f229520d6399a06a5da0655f2bfd899

7 years agoRMIB: add support for vector copy-out 69/3369/1
David van Moolenbroek [Thu, 20 Oct 2016 11:07:25 +0000 (11:07 +0000)]
RMIB: add support for vector copy-out

Change-Id: I9e9b4b8d6eed39fdb511c6bd2a375ddf898064a5

7 years agoFix grammar errors in a comment 68/3368/1
io12 [Wed, 19 Oct 2016 21:37:53 +0000 (17:37 -0400)]
Fix grammar errors in a comment

Change-Id: I0ad2b6a28afb44e42d1830f1b0944579dc032261

7 years agoAdd the driver for VIA Technology 6105/6106S Ethernet card 67/3367/1
Jia-Ju Bai [Wed, 19 Oct 2016 10:11:26 +0000 (10:11 +0000)]
Add the driver for VIA Technology 6105/6106S Ethernet card

Change-Id: I690c34f0a37bcbb20a5b7748e3dd315707460caf

7 years agofixed git checkout and updated latest known changeset working for grub 66/3366/1
rlfnb [Fri, 14 Oct 2016 07:24:15 +0000 (09:24 +0200)]
fixed git checkout and updated latest known changeset working for grub

Change-Id: If4a1e8bfb42a20cf50d847105cc8f96c3cf1cd00

7 years agoVFS: Convert K&R C -> ANSI C 65/3365/1
Richard Sailer [Mon, 3 Oct 2016 22:27:02 +0000 (00:27 +0200)]
VFS: Convert K&R C -> ANSI C

Aditionally this removes all trailing whitespaces
using: sed -i 's/[[:space:]]*$//' *.c

Change-Id: I88451fdb6f6e79e61f8aae5bd5a7f2e3538f9944

7 years agois: Convert K&R C -> ANSI C 64/3364/1
Richard Sailer [Mon, 3 Oct 2016 22:18:35 +0000 (00:18 +0200)]
is: Convert K&R C -> ANSI C

Aditionally this removes all trailing whitespaces
using: sed -i 's/[[:space:]]*$//' *.c

Change-Id: I274fccee9ec320e474ac26fbe19f3bd50bec271a

7 years agolibc: bugfixes for minix's poll(3) wrapper 63/3363/1
David van Moolenbroek [Wed, 5 Oct 2016 17:37:56 +0000 (17:37 +0000)]
libc: bugfixes for minix's poll(3) wrapper

- clear "revents" fields even when the call times out;
- do not call FD_ISSET with a negative file descriptor number.

Change-Id: I7aeaae79e73e39aed127a75495ea08256b18c182

7 years agoAdd LLVM GCOV coverage support 62/3362/1
David van Moolenbroek [Sat, 24 Sep 2016 15:20:54 +0000 (15:20 +0000)]
Add LLVM GCOV coverage support

With this patch, it is now possible to generate coverage information
for MINIX3 system services with LLVM.  In particular, the system can
be built with MKCOVERAGE=yes, either with a native "make build" or
with crosscompilation.  Either way, MKCOVERAGE=yes will build the
MINIX3 system services with coverage profiling support, generating a
.gcno file for each source module.  After a reboot it is possible to
obtain runtime coverage data (.gcda files) for individual system
services using gcov-pull(8).  The combination of the .gcno and .gcda
files can then be inspected with llvm-cov(1).

For reasons documented in minix.gcov.mk, only system service program
modules are supported for now; system service libraries (libsys etc.)
are not included.  Userland programs are not affected by MKCOVERAGE.

The heart of this patch is the libsys code that writes data generated
by the LLVM coverage hooks into a serialized format using the routines
we already had for GCC GCOV.  Unfortunately, the new llvm_gcov.c code
is LLVM ABI dependent, and may therefore have to be updated later when
we upgrade LLVM.  The current implementation should support all LLVM
versions 3.x with x >= 4.

The rest of this patch is mostly a light cleanup of our existing GCOV
infrastructure, with as most visible change that gcov-pull(8) now
takes a service label string rather than a PID number.

Change-Id: I6de055359d3d2b3f53e426f3fffb17af7877261f

8 years agoRemoved redundant ifdef 61/3361/1
rlfnb [Wed, 7 Sep 2016 14:13:38 +0000 (16:13 +0200)]
Removed redundant ifdef

Change-Id: Ifb7df30591d658700d6293632f5f944c32376fdf

8 years ago[boot-i386] Reduce differences with NetBSD 60/3360/1
Antoine Leca [Fri, 2 Sep 2016 18:28:47 +0000 (20:28 +0200)]
[boot-i386] Reduce differences with NetBSD

Change-Id: I50c183d283858a098f0766cf3053fa6e78ce06ad

8 years agoAdjust .gitignore for MINIX file system 59/3359/1
Antoine Leca [Fri, 15 Jul 2016 15:27:36 +0000 (17:27 +0200)]
Adjust .gitignore for MINIX file system

Some files in LLVM have more than Minix-maximum of 60 characters.
Also drop some obsolete stuff, and add obj which are symlinks added
to every directory when using /usr/obj as OBJDIR (hinted in wiki.)

Change-Id: Iac82bb064f68689f247a2ee1b1d2f365344ab793

8 years agoEnable building with MKDEBUG and MKDEBUGLIB 58/3358/2
Jean-Baptiste Boric [Fri, 26 Aug 2016 18:59:32 +0000 (20:59 +0200)]
Enable building with MKDEBUG and MKDEBUGLIB

The way these options work is by creating files that contain debugging
symbols and stashing them in a dedicated set. The minix-debug set has
been created for this purpose, but it will probably have to be refined
since it has been tested only with the default options with an i386
cross-build.

LSC: Amended to support many combination of MKDEBUG, MKDEBUGLIB, with
     and without X11, for both intel and arm.

Change-Id: I2901952e8229938f9ac79c8656484acf704ccd9b

8 years agoImprove the process for GNU tools 55/3355/3
Antoine Leca [Mon, 29 Aug 2016 11:48:31 +0000 (13:48 +0200)]
Improve the process for GNU tools

Split the process to fetch GNU tools (until now embedded
within tools/Makefile.gnuhost) into a new Makefile.fetchgnu,
MINIX-specific hence relocated, which is to be also used
to fetch sources even when not building the tools.
Use it for binutils too.
Improve documentation.

Also do not run configure on each run when MKUPDATE=yes
The .WAIT serialization instruction between fetching and other
configure sources was raising a new run of configure at each
compilation. Avoid it by using two rules.

Change-Id: Ie24950ccbb5c5067f3c1ea57b7bd8294e4c9445e

8 years agoObey HAVE_GOLD=no to no intent to build gold 56/3356/2
Antoine Leca [Mon, 29 Aug 2016 12:12:06 +0000 (14:12 +0200)]
Obey HAVE_GOLD=no to no intent to build gold

This is useful when the host C++ compiler is broken or not compliant.

Change-Id: I09933e81ae07e95e5696b177cd4670cab33ce6c1

8 years agoKyua framework does not build up with /usr/obj 57/3357/1
Antoine Leca [Fri, 19 Aug 2016 16:58:32 +0000 (18:58 +0200)]
Kyua framework does not build up with /usr/obj

Reported to NetBSD as PR/51389, fix by dholland
http://gnats.netbsd.org/51389

Change-Id: Ib31662000255a62261fb461fcab2d931faa47f70

8 years agoAllow repartition(8) subpartitions above 4G 54/3354/1
Antoine Leca [Fri, 5 Aug 2016 18:03:38 +0000 (20:03 +0200)]
Allow repartition(8) subpartitions above 4G

Change-Id: I058ab3b58b2e7822b59365b1ce222c5588f442cd

8 years agomade PAE enabled by accident and fixed libmagicrt.h 53/3353/1
rlfnb [Fri, 5 Aug 2016 14:41:30 +0000 (16:41 +0200)]
made PAE enabled by accident and fixed libmagicrt.h

Change-Id: Ia09d8b9a68aa2e1522d66ed93453de9d7d802cb2

8 years agoResolve a number of GCC-generated warnings 52/3352/1
David van Moolenbroek [Fri, 5 Aug 2016 12:28:41 +0000 (14:28 +0200)]
Resolve a number of GCC-generated warnings

The warnings in test47 seem to be a symptom of a larger problem,
i.e., not an issue with the test set code but rather with the GCC
configuration.  Hopefully the switch to LLVM will resolve those.

Change-Id: Ic9fa3b8bc9b728947c993f2e1ed49d9a3b731344

8 years agosystem.conf: clean up the last sys_int86 remnants 51/3351/1
David van Moolenbroek [Fri, 5 Aug 2016 10:34:28 +0000 (10:34 +0000)]
system.conf: clean up the last sys_int86 remnants

The remaining entries produced warnings at startup.

Change-Id: I076f73a813f7c3ecb208cc458939afc6c4fe3066

8 years agotests: fix bug in sys_vumap test 50/3350/1
David van Moolenbroek [Fri, 5 Aug 2016 10:32:04 +0000 (10:32 +0000)]
tests: fix bug in sys_vumap test

Ever since a VM allocation strategy change, this test is fully
dysfunctional.  It should be repaired and added to the regular
test set, but that will require some work.

For now, keep it in reasonable shape.

Reported by dcb314.

This closes #153.

Change-Id: Ia57bdfdf6a3fc8d47cae76a0be9881fb4d796f6d

8 years agolibmthread: resolve memory leaks on exception path 49/3349/1
David van Moolenbroek [Fri, 5 Aug 2016 10:26:36 +0000 (10:26 +0000)]
libmthread: resolve memory leaks on exception path

If libmthread runs into a memory allocation failure while attempting
to enlarge its thread pool, it does not free up any preliminary
allocations made so far.

Reported by dcb314.

This closes #152.

Change-Id: Ib882a4544e4802a0eb0a53446b43997876cde633

8 years agocommands: fix various small issues 48/3348/1
David van Moolenbroek [Fri, 5 Aug 2016 10:17:31 +0000 (10:17 +0000)]
commands: fix various small issues

Reported by dcb314.  Recommendations adopted as is.

This closes #137, closes #138, closes #139, and hopefully I got that
right this time.

Change-Id: I79774f4c398495dba19dec43fbc3f79afd186843

8 years agolibsys: fix format specifier in RMIB code 47/3347/1
David van Moolenbroek [Fri, 5 Aug 2016 10:12:06 +0000 (10:12 +0000)]
libsys: fix format specifier in RMIB code

Reported by dcb314.

This closes #141.

Change-Id: I26011870891f5ba22844c335af6081ee9f05c12c

8 years agoVFS: split block, character device handling 46/3346/1
David van Moolenbroek [Mon, 11 Jan 2016 18:33:53 +0000 (18:33 +0000)]
VFS: split block, character device handling

All functions prefixed with bdev_ are moved into bdev.c, and those
prefixed with cdev_ are now in cdev.c.  The code in both files are
converted to KNF.  The little (IOCTL-related) code left in device.c
is also cleaned up but should probably be moved into other existing
source files.  This is left to a future patch.  In general, VFS is
long overdue for a source code rebalancing, and the patch here is
only a step in the right direction.

Change-Id: I2fb25734b5778b44f2ff6d2ce331a8e2146e20b0

8 years agoVFS: store process suspension state as union 45/3345/1
David van Moolenbroek [Mon, 4 Jan 2016 18:42:13 +0000 (18:42 +0000)]
VFS: store process suspension state as union

Previously, VFS would use various subsets of a number of fproc
structure fields to store state when the process is blocked
(suspended) for various reasons.  As a result, there was a fair
amount of abuse of fields, hidden state, and confusion as to
which fields were used with which suspension states.

Instead, the suspension state is now split into per-state
structures, which are then stored in a union.  Each of the union's
structures should be accessed only right before, during, and right
after the fp_blocked_on field is set to the corresponding blocking
type.  As a result, it is now very clear which fields are in use
at which times, and we even save a bit of memory as a side effect.

Change-Id: I5c24e353b6cb0c32eb41c70f89c5cfb23f6c93df

8 years agoVFS: disallow opening files of unsupported types 44/3344/1
David van Moolenbroek [Sun, 27 Dec 2015 22:44:34 +0000 (22:44 +0000)]
VFS: disallow opening files of unsupported types

Any attempt to use open(2) to open a socket file now fails with
EOPNOTSUPP, as is common and in the process of being standardized.
The behavior and error code is now tested in test56.

Any attempt to open a file of which the type is not known to VFS
(e.g., as a result of bogus file system contents) now fails with EIO.
For now, this is a safety feature, to prevent VFS tripping over such
types in unchecked cases.  In the future, a proper VFS code audit
should determine whether we can lift this restriction again, although
it does not seem particularly useful to be able to open files of
unknown types anyway.  Another error code may be assigned to this case
later, too.

Change-Id: Ib4cb4341eec954f0448fe469ecf28bd78edebde2

8 years agoVFS: add debug dump for select 43/3343/1
David van Moolenbroek [Thu, 4 Aug 2016 16:12:54 +0000 (16:12 +0000)]
VFS: add debug dump for select

By now it has become clear that the VFS select code has an unusually
high concentration of bugs, and there is no indication that any form
of convergence to a bug-free state is in sight.  Thus, for now, it
may be helpful to be able to dump the contents of the select tables
in order to track down any bugs in the future.  Hopefully that will
allow the next bugs to be resolved slightly after than before.

The debug dump can be triggered with "svrctl vfs get print_select".

Change-Id: Ia826746dce0f065d7f3b46aa9047945067b8263d

8 years agoVFS: fix race condition in select(2) 42/3342/1
David van Moolenbroek [Thu, 4 Aug 2016 16:17:09 +0000 (16:17 +0000)]
VFS: fix race condition in select(2)

A select query could deadlock if..

- it was querying a character or socket device that, at the start of
  the select query, was not known to be ready for the requested
  operations;
- this device could not be checked immediately, due to another ongoing
  query to the same character or socket driver;
- the select query had a timer that triggered before the device could
  be checked, thereby changing the select query to non-blocking.

In this situation, a missing flag check would cause the select code to
conclude erroneously that the operations which it flagged for later,
were satisfied.  At the same time, the same flag remained set, so that
the select query would continue to wait for that device.  This
resulted in a deadlock.  The same bug could most likely be triggered
through other scenarios that were even less likely to occur.

This patch fixes the race condition and puts in a hopefully slightly
more informative comment for the affected block of code.

In practice, the bug could be triggered fairly reliably by generating
lots of output in tmux.

Change-Id: I1c909255dcf552e6c7cef08b0cf5cbc41294b99c

8 years agoVFS: forbid mknod(2) on symlinks 41/3341/1
David van Moolenbroek [Fri, 15 Jul 2016 14:29:16 +0000 (14:29 +0000)]
VFS: forbid mknod(2) on symlinks

As imposed by POSIX.

Extend a random test to verify this behavior.

Change-Id: Ib70550cefaeb9efd54e22312425263a5606fb5e8

8 years agoVarious timer improvements 40/3340/1
David van Moolenbroek [Thu, 21 Jul 2016 15:31:27 +0000 (15:31 +0000)]
Various timer improvements

Now that clock_t is an unsigned value, we can also allow the system
uptime to wrap.  Essentially, instead of using (a <= b) to see if time
a occurs no later than time b, we use (b - a <= CLOCK_MAX / 2).  The
latter value does not exist, so instead we add TMRDIFF_MAX for that
purpose.

We must therefore also avoid using values like 0 and LONG_MAX as
special values for absolute times.  This patch extends the libtimers
interface so that it no longer uses 0 to indicate "no timeout".
Similarly, TMR_NEVER is now used as special value only when
otherwise a relative time difference would be used.  A minix_timer
structure is now considered in use when it has a watchdog function set,
rather than when the absolute expiry time is not TMR_NEVER.  A few new
macros in <minix/timers.h> help with timer comparison and obtaining
properties from a minix_timer structure.

This patch also eliminates the union of timer arguments, instead using
the only union element that is only used (the integer).  This prevents
potential problems with e.g. live update.  The watchdog function
prototype is changed to pass in the argument value rather than a
pointer to the timer structure, since obtaining the argument value was
the only current use of the timer structure anyway.  The result is a
somewhat friendlier timers API.

The VFS select code required a few more invasive changes to restrict
the timer value to the new maximum, effectively matching the timer
code in PM.  As a side effect, select(2) has been changed to reject
invalid timeout values.  That required a change to the test set, which
relied on the previous, erroneous behavior.

Finally, while we're rewriting significant chunks of the timer code
anyway, also covert it to KNF and add a few more explanatory comments.

Change-Id: Id43165c3fbb140b32b90be2cca7f68dd646ea72e

8 years agoPreparations for PAE support 39/3339/1
rlfnb [Tue, 12 Jul 2016 15:20:41 +0000 (17:20 +0200)]
Preparations for PAE support

Change-Id: I9a7c9ed9f803e2e26d745d14149a8aec64ab0c75

8 years agoAdapt MINIX-specific part of tools/installboot 38/3338/1
Antoine Leca [Tue, 2 Aug 2016 21:07:15 +0000 (23:07 +0200)]
Adapt MINIX-specific part of tools/installboot

This is necessary to enable correct compilation of the tools version
of installboot_nbsd(8)when cross-compiling on a system close enough
to MINIX, like NetBSD 7.0.1 for example.

Change-Id: I7a12614518293e05d64d7cc189c62651fdc64734

8 years agoClean up traces from long-gone sys_int86 interface 37/3337/1
Antoine Leca [Wed, 20 Jul 2016 15:43:35 +0000 (17:43 +0200)]
Clean up traces from long-gone sys_int86 interface

Change-Id: I773ab67342be852cc74f76b4fcbb338c9cb11f7e

8 years agoDrop obsolete postinstall script 36/3336/1
Antoine Leca [Wed, 20 Jul 2016 10:13:26 +0000 (12:13 +0200)]
Drop obsolete postinstall script

Conflicts with NetBSD /usr/sbin/postinstall(8)

Change-Id: Iaefe4494b95b46d1134f4a477798765bbcc66c70

8 years agoRemove long-obsolete pwdauth(8) command (in usr/lib) 35/3335/1
Antoine Leca [Wed, 20 Jul 2016 09:50:25 +0000 (11:50 +0200)]
Remove long-obsolete pwdauth(8) command (in usr/lib)

Change-Id: I454d506199ce1d5d48295bca86b590ce0701dcc2

8 years agoAllow part(8) to make subpartitions above 4G 34/3334/1
Antoine Leca [Thu, 14 Jul 2016 12:09:14 +0000 (14:09 +0200)]
Allow part(8) to make subpartitions above 4G

Change-Id: I3fd2c5de7cbb190b857eb34f16463f67a30118a3

8 years agoImport locale tools and ressource files 33/3333/1
Lionel Sambuc [Mon, 20 Jun 2016 16:30:51 +0000 (18:30 +0200)]
Import locale tools and ressource files

This commit requires special steps, please checkout docs/UPDATING.

Tools:
 - gencat
 - locale
 - mkcsmapper
 - mkesdb
 - mklocale

Libs:
 - i18n_module
 - libintl

Ressources:
 - i18n
 - locale

Change-Id: I559d0399d8e98bcee15225cab786e43f31506207

8 years agokernel/cpulocals.h: Simplify macros 32/3332/1
Lionel Sambuc [Sat, 18 Jun 2016 08:00:40 +0000 (10:00 +0200)]
kernel/cpulocals.h: Simplify macros

Change-Id: Ice845fb0743ff686398293cef2620f5ac9c902ad

8 years agognu/texinfo: Disable -Werror for clang 31/3331/1
Lionel Sambuc [Sat, 2 Jul 2016 12:07:35 +0000 (14:07 +0200)]
gnu/texinfo: Disable -Werror for clang

Change-Id: Ib5053044c03503942f9626703f086ee2bbb518ac

8 years agoPM: Convert K&R C -> ANSI C 30/3330/1
Richard Sailer [Fri, 8 Jul 2016 13:17:14 +0000 (15:17 +0200)]
PM: Convert K&R C -> ANSI C

Aditionally this removes all trailing whitespaces in pm server code
using: sed -i 's/[[:space:]]*$//' *.c

Change-Id: Ie44162fd56cd7042f4f0cc7bd7314b17ea128761

8 years agomade minix3 bootable via EFI 29/3329/1
Ralf Neeb [Sat, 2 Jul 2016 11:28:02 +0000 (13:28 +0200)]
made minix3 bootable via EFI

Change-Id: I61d995e240deb6ebb3027d3ab07e6e3759e52b01

8 years agoTypo in hardfloat command-line fixup/replacement 28/3328/1
Mark Pauley [Fri, 15 Apr 2016 20:39:48 +0000 (13:39 -0700)]
Typo in hardfloat command-line fixup/replacement

- Added two missing '%' characters to replacement strings.

Change-Id: I139d432f5cf2651642284fa39112b66f478dadce

8 years agoINET/LWIP: minimal net.route sysctl support 27/3327/1
David van Moolenbroek [Fri, 17 Jun 2016 14:03:27 +0000 (14:03 +0000)]
INET/LWIP: minimal net.route sysctl support

At a point not too far in the future, we will be switching from the
hardcoded MINIX3 implementation of the getifaddrs(3) libc routine to
the proper NetBSD implementation.  The latter uses the
net.route.rtable sysctl functionality to obtain its information.  In
order make the transition as painless as possible, this patch adds
basic support for that net.route.rtable functionality to INET and
LWIP, using the remote MIB (RMIB) facility.

Change-Id: I54f5cea7985f6606e317c73a5e6be3a5d07bc7dc

8 years agoIPC: use RMIB to handle kern.ipc sysctl subtree 26/3326/1
David van Moolenbroek [Tue, 14 Jun 2016 08:03:51 +0000 (08:03 +0000)]
IPC: use RMIB to handle kern.ipc sysctl subtree

With this patch, the IPC service is changed to use the new RMIB
facility to register and handle the "kern.ipc" sysctl subtree itself.
The subtree was previously handled by the MIB service directly.  This
change improves locality of handling: especially the
kern.ipc.sysvipc_info node has some peculiarities specific to the IPC
service and is therefore better handled there.  Also, since the IPC
service is essentially optional to the system, this rearrangement
yields a cleaner situation when the IPC service is not running: in
that case, the MIB service will expose a few basic kern.ipc nodes
indicating that no SysV IPC facilities are present.  Those nodes will
be overridden through RMIB when the IPC service is running.

It should be easier to add the remaining (from NetBSD) kern.ipc nodes
as well now.

Test88 is extended with a new subtest that verifies that sysctl-based
information retrieval for semaphore sets works as expected.

Change-Id: I6b7730e85305b64cfd8418c0cc56bde64b22c584