]> Zhao Yanbai Git Server - minix.git/log
minix.git
10 years agoMessage type for VFS_IOCTL
Lionel Sambuc [Mon, 12 May 2014 10:46:59 +0000 (12:46 +0200)]
Message type for VFS_IOCTL

Change-Id: Ibea0fd2f443c1332bf1c9d138840d838bfc81d81

10 years agoMessage type for VFS_UMOUNT
Lionel Sambuc [Mon, 12 May 2014 10:44:59 +0000 (12:44 +0200)]
Message type for VFS_UMOUNT

Change-Id: Ia3b8e818b45a31178215cad77fa0fa3e5325f18a

10 years agoMessage type for VFS_MOUNT
Lionel Sambuc [Mon, 12 May 2014 10:00:38 +0000 (12:00 +0200)]
Message type for VFS_MOUNT

Change-Id: I4114f5a1aa4f9efe49a12996722499b695c17230

10 years agoMessage type for VFS_{,F}STATVFS1
Lionel Sambuc [Mon, 12 May 2014 09:49:08 +0000 (11:49 +0200)]
Message type for VFS_{,F}STATVFS1

Change-Id: Iaf71cdddb48f64d84773029da2c0666f5462f198

10 years agoMessage type for VFS_GETVFSSTAT
Lionel Sambuc [Mon, 12 May 2014 09:34:18 +0000 (11:34 +0200)]
Message type for VFS_GETVFSSTAT

Change-Id: I27f1f6dc37832ee4adb9854c7306ce6153e31567

10 years agoMessage type for VFS_SELECT
Lionel Sambuc [Mon, 12 May 2014 09:21:52 +0000 (11:21 +0200)]
Message type for VFS_SELECT

Change-Id: Ifd6cb7082dd528f1698a0ca070de447aad85ba60

10 years agoSome cleanup in IPC headers and documentation.
Lionel Sambuc [Thu, 1 May 2014 13:07:57 +0000 (15:07 +0200)]
Some cleanup in IPC headers and documentation.

 - Cleanup of unused macros for VFS - FS protocols
 - Update servers/vfs/README to reflect the new requests names.
 - Alphabetically re-order the message union, as well as minor
   formatting, for readability.

Change-Id: Ief7c38489e93bcf5f795dccbf3a8e10b44b95af4

10 years agoRemove protocol version of {mode,ino,uid,gid}_t
Lionel Sambuc [Thu, 1 May 2014 14:19:28 +0000 (16:19 +0200)]
Remove protocol version of {mode,ino,uid,gid}_t

Now that we have enough room in the message, remove these types.

Change-Id: Ib734c6f0209b259a14a1189b3886b9c8474e1b9a

10 years agoMessage types for VFS read, write & peek
Lionel Sambuc [Mon, 28 Apr 2014 18:19:19 +0000 (20:19 +0200)]
Message types for VFS read, write & peek

All of these requests share the same message type as at least one server
manages those requests in the same handler, just by checking the actual
type of the request, and then acting upon it.

Change-Id: I17337b4c67ae209523574c22ccc108cf5f1e65e9

10 years agoMessage types for VFS bread, bwrite & bpeek
Lionel Sambuc [Thu, 1 May 2014 11:45:58 +0000 (13:45 +0200)]
Message types for VFS bread, bwrite & bpeek

These two request are handled by the same function in some FSes, which
prevents us from using two different kinds of messages.

Change-Id: Ib2fc80bdd56ef67db6b4c51cf8963353a761aab1

10 years agoMessage types for VFS chown
Lionel Sambuc [Thu, 1 May 2014 09:40:33 +0000 (11:40 +0200)]
Message types for VFS chown

Change-Id: I1dc50772fd28b0c698d85922ad0ad3b41dde006c

10 years agoMessage types for VFS statvfs
Lionel Sambuc [Thu, 1 May 2014 09:19:18 +0000 (11:19 +0200)]
Message types for VFS statvfs

Change-Id: If84f53577510399aa1238cfcd0b8aa1fb13c2490

10 years agoMessage types for VFS chmod
Lionel Sambuc [Wed, 30 Apr 2014 18:37:50 +0000 (20:37 +0200)]
Message types for VFS chmod

Change-Id: I76e5df4c0a386682e863e640182c59e4ab7e30be

10 years agoMessage types for VFS mknod
Lionel Sambuc [Wed, 30 Apr 2014 18:00:29 +0000 (20:00 +0200)]
Message types for VFS mknod

Change-Id: I41772ffe0efc520b3cd204857c33c8c76d81a5a8

10 years agoMessage types for VFS mkdir
Lionel Sambuc [Wed, 30 Apr 2014 17:44:48 +0000 (19:44 +0200)]
Message types for VFS mkdir

Change-Id: I05ea5b5e14e28afdfab6edcabc1dc761389f2638

10 years agoMessage types for VFS unlink & rmdir
Lionel Sambuc [Thu, 1 May 2014 08:06:10 +0000 (10:06 +0200)]
Message types for VFS unlink & rmdir

These two request are handled by the same function in some FSes, which
prevents us from using two different kinds of messages.

Change-Id: Iede3a0251d8d84ca7f121c56f30f42b045b0c737

10 years agoMessage types for VFS stat
Lionel Sambuc [Thu, 1 May 2014 08:05:07 +0000 (10:05 +0200)]
Message types for VFS stat

Change-Id: I1d40ae7c3c32a4f7b80c82bc2fa8b157b20a6837

10 years agoMessage types for VFS inhibread
Lionel Sambuc [Wed, 30 Apr 2014 14:17:44 +0000 (16:17 +0200)]
Message types for VFS inhibread

Change-Id: I4ce20a4566033593e4784fd278d7ff7fda16dd9d

10 years agoMessage types for VFS putnode
Lionel Sambuc [Mon, 28 Apr 2014 17:12:06 +0000 (19:12 +0200)]
Message types for VFS putnode

Change-Id: I0802ccaaaa6ee1b4eb96d62b08f9795c790ce39b

10 years agoMessage types for VFS link
Lionel Sambuc [Wed, 30 Apr 2014 13:33:48 +0000 (15:33 +0200)]
Message types for VFS link

Change-Id: Ibe03e7c9fded7f3764ecbe3e35b92df3662e54a4

10 years agoMessage types for VFS rdlink
Lionel Sambuc [Wed, 30 Apr 2014 08:20:16 +0000 (10:20 +0200)]
Message types for VFS rdlink

Change-Id: Ic077e99fb140a3a1de849f7f761fdfd90961f5d8

10 years agoMessage types for VFS getdents
Lionel Sambuc [Wed, 30 Apr 2014 07:55:55 +0000 (09:55 +0200)]
Message types for VFS getdents

Change-Id: I7474d7547f1fd52f4da54754ccfe984ba1a2baa8

10 years agoMessage types for VFS new_driver
Lionel Sambuc [Tue, 29 Apr 2014 19:13:28 +0000 (21:13 +0200)]
Message types for VFS new_driver

Change-Id: If1b6ee2c5beb43e72a69c27dbc32b72525831962

10 years agoMessage types for VFS slink
Lionel Sambuc [Tue, 29 Apr 2014 18:59:48 +0000 (20:59 +0200)]
Message types for VFS slink

Change-Id: I13975474b924817553101c28591b4c04e8679173

10 years agoMessage types for VFS utime
Lionel Sambuc [Tue, 29 Apr 2014 18:08:54 +0000 (20:08 +0200)]
Message types for VFS utime

Change-Id: If7e5faa13a824528fd8ca02bd6982e04d48032e9

10 years agoMessage types for VFS ftrunc
Lionel Sambuc [Tue, 29 Apr 2014 17:33:47 +0000 (19:33 +0200)]
Message types for VFS ftrunc

Change-Id: I593a4d91b1d974f632f6cb4eb23aabee5b65df7b

10 years agoMessage types for VFS rename
Lionel Sambuc [Tue, 29 Apr 2014 16:36:15 +0000 (18:36 +0200)]
Message types for VFS rename

Change-Id: I48a4098c16519e9c104b287d7bdf95ed6a2a7323

10 years agoMessage types for VFS flush
Lionel Sambuc [Tue, 29 Apr 2014 14:15:37 +0000 (16:15 +0200)]
Message types for VFS flush

Change-Id: Ida7cbff4402bf876603a2153e2784699d93c03ea

10 years agoMessage types for VFS mountpoint
Lionel Sambuc [Tue, 29 Apr 2014 13:35:42 +0000 (15:35 +0200)]
Message types for VFS mountpoint

Change-Id: I61c5729628b9b9262cc11415591b1b0f25ad04a8

10 years agoMessage types for VFS newnode
Lionel Sambuc [Mon, 28 Apr 2014 16:54:18 +0000 (18:54 +0200)]
Message types for VFS newnode

Change-Id: I5c0790fc1104182ab08bcae699c60a364833c360

10 years agoMessage types for VFS create
Lionel Sambuc [Mon, 28 Apr 2014 16:25:26 +0000 (18:25 +0200)]
Message types for VFS create

Change-Id: Ibeba338337eb16814b5b25f7135da958e8316a99

10 years agoMessage types for VFS lookup
Lionel Sambuc [Mon, 28 Apr 2014 15:45:52 +0000 (17:45 +0200)]
Message types for VFS lookup

Change-Id: Ic4d2a616ebc986c4b405b6b9ee0bd7c3b59e81d2

10 years agoMessage types for VFS readsuper
Lionel Sambuc [Mon, 28 Apr 2014 14:45:11 +0000 (16:45 +0200)]
Message types for VFS readsuper

Change-Id: I7aea85d9842459ea454420bb1687d9b8eb597914

10 years agoRemove unused generic message m6
Lionel Sambuc [Thu, 1 May 2014 13:43:02 +0000 (15:43 +0200)]
Remove unused generic message m6

Change-Id: Ie99dca9b75325b3c4890718f8ac7aa49a8973798

10 years agoIntroduce message types mess_u{8,16,32,64}
Lionel Sambuc [Mon, 28 Apr 2014 12:21:40 +0000 (14:21 +0200)]
Introduce message types mess_u{8,16,32,64}

Those messages offer a simple array of the given type. This should allow
for fast and simple prototyping.

When a protocol is fixed, then proper message types should be defined.

Change-Id: I4e98eeb0493924f3015862a51d14d894315e2bc2

10 years agoservers/iso9660fs: drop unused function fs_access
Lionel Sambuc [Thu, 1 May 2014 09:46:28 +0000 (11:46 +0200)]
servers/iso9660fs: drop unused function fs_access

As a consequence, remove protect.c which is now empty.

Change-Id: I675f9059510b3a22262f2bab4f18964a5356aa62

10 years agoUse fixed size type for on-disk representation
Lionel Sambuc [Fri, 2 May 2014 05:41:15 +0000 (07:41 +0200)]
Use fixed size type for on-disk representation

Use fixed size for directory entries records, instead of semantic type
in the struct which is used to access on-disk records.

Change-Id: If8816d367eaa7070ccb17202ffc9047b5aee5d3e

10 years agoadded sethostname syscall with proper error checks
Morgawr [Thu, 24 Apr 2014 00:12:48 +0000 (02:12 +0200)]
added sethostname syscall with proper error checks

Change-Id: I4b4e0a7c4035e19d5843b86ee1f714096adcecd2

10 years agoadded chmod util from NetBSD userland
Morgawr [Tue, 22 Apr 2014 23:48:23 +0000 (01:48 +0200)]
added chmod util from NetBSD userland

Change-Id: Ice81a29becedcebfc1ff42ac9826c291b6451189

10 years agoremove __BIT_TYPES_DEFINED__ because they are actually not defined.
Kees Jongenburger [Tue, 1 Apr 2014 09:19:17 +0000 (09:19 +0000)]
remove __BIT_TYPES_DEFINED__ because they are actually not defined.

Change-Id: Iae6489c013ff92042f001d50e9a9983a409c268e

10 years agoarm:ddekit use simple alloc to allocate stack.
Kees Jongenburger [Tue, 29 Apr 2014 06:55:34 +0000 (08:55 +0200)]
arm:ddekit use simple alloc to allocate stack.

Workaround for:
-ddekit large alloc unnecessarily allocating physical contiguous memory.
-the ARM port expecting that physical contiguous memory equals device memory.

10 years agoStub for setpgid
Lionel Sambuc [Thu, 24 Apr 2014 11:39:50 +0000 (13:39 +0200)]
Stub for setpgid

This implements a near noop setpgid, unless the use is one equivalent
to setsid, in which case it will behave as such.

Also activates setpgrp, which is implemented in terms of setpgid.

Change-Id: I84411cb1957351aa1d3985623cd9e69bdf6f8d4c

10 years agoStub for setrlimit
Lionel Sambuc [Mon, 28 Apr 2014 08:05:45 +0000 (10:05 +0200)]
Stub for setrlimit

Change-Id: I54c7233d71805711bd72e1e751456aad30fd3e35

10 years agoImporting sbin/chown
Lionel Sambuc [Wed, 26 Mar 2014 17:35:18 +0000 (18:35 +0100)]
Importing sbin/chown

Change-Id: I49950ec241985a8a8f1fc29e01c0212278fbeaa9

10 years agoFrom Ben Gras, add select support on /dev/random.
Lionel Sambuc [Wed, 16 Apr 2014 11:57:52 +0000 (13:57 +0200)]
From Ben Gras, add select support on /dev/random.

Change-Id: I47bf4c45285458ecc224df0564edf98afdb2c9d6

10 years agoPrefix libc (u)mount with minix_
Lionel Sambuc [Mon, 17 Mar 2014 13:01:22 +0000 (14:01 +0100)]
Prefix libc (u)mount with minix_

The goal is to prevent a name collision with the expected mount/umount
function signatures, if we decide one day to allow any application
using those to work on MINIX.

At this moment the caller has to start the required services, but if we
implement that logic inside the mount/unmout function, this would allow
any application to call those function successfully.

By renaming those now, we prevent a possible ABI break in the future.

Change-Id: Iaf6a9472bca0dda6bfe634bdb6029b3aa2e1ea3b

10 years agoin6.h
Lionel Sambuc [Tue, 22 Apr 2014 16:50:26 +0000 (18:50 +0200)]
in6.h

Change-Id: Id548a6a144ca77ef3a7bb76f24b8b902efd680b4

10 years agoFollow the namespace pattern for [cs]profile
Lionel Sambuc [Mon, 14 Apr 2014 09:49:40 +0000 (11:49 +0200)]
Follow the namespace pattern for [cs]profile

Change-Id: I5ad7eb1d7f4b4364e668c2f30dfc628f89b0d579

10 years agoHide SO_PASSCRED and SO_PEERCRED by default.
Lionel Sambuc [Tue, 22 Apr 2014 15:37:52 +0000 (17:37 +0200)]
Hide SO_PASSCRED and SO_PEERCRED by default.

This cause in some software to assume we are linux, as this is rightly
only used there.

By default hide it behind _MINIX_SYSTEM, until we have removed traces
of it from getpeereid/[gs]etsocketopt and replaced it by the NetBSD
mechanism.

Change-Id: Iacd4cc1b152bcb7e90f5b1249185a222c90351d6

10 years agoAdd /bin/false to /etc/shells
Lionel Sambuc [Mon, 14 Apr 2014 10:13:22 +0000 (12:13 +0200)]
Add /bin/false to /etc/shells

/bin/false is often used by PKGSRC packages which create unpriviledged
users as part of their install process.

This fixes the generation and installation of such packages.

Change-Id: Ie2a590c56c86dc40a61e3c08d14f5443ebe4f58c

10 years agoAdding an initial ddekit test.
Kees Jongenburger [Tue, 25 Mar 2014 15:02:31 +0000 (16:02 +0100)]
Adding an initial ddekit test.

Change-Id: I0522449bb7bbbb23efc132ede3a02da95efe0326

10 years agotest:test51 add a few more tests for calling setcontext.
Kees Jongenburger [Tue, 25 Mar 2014 15:03:06 +0000 (16:03 +0100)]
test:test51 add a few more tests for calling setcontext.

Change-Id: I272ac01c77537b80bab328aae1acd7b6ce6027fb

10 years agoddekit:use ucontext to switch threads
Kees Jongenburger [Mon, 24 Mar 2014 15:55:57 +0000 (16:55 +0100)]
ddekit:use ucontext to switch threads

Use getcontext/makecontext and setcontext to create/modify and
switch thread when using ddekit.

Change-Id: I485ad61cb2eb5b8e7b486775f282ff6501912dfd

10 years agobuild:also build the hello driver on arm.
Kees Jongenburger [Mon, 24 Mar 2014 15:38:24 +0000 (16:38 +0100)]
build:also build the hello driver on arm.

Change-Id: I5dd82d3b56b907bfc137313f503f9d9c52c199ef

10 years agobuild:make libminc a build dependency of services.
Kees Jongenburger [Mon, 24 Mar 2014 15:31:17 +0000 (16:31 +0100)]
build:make libminc a build dependency of services.

Make libminc a build dependency of services to ensure the services
get rebuilt if libminc changes.

Change-Id: I703a9d98d7641a9a85e04d88402a7228ad0be19f

10 years agolibc:x86 fix for get and setcontext assembly calls.
Kees Jongenburger [Wed, 2 Apr 2014 07:28:38 +0000 (09:28 +0200)]
libc:x86 fix for get and setcontext assembly calls.

The get and set context calls where wrongly assuming that the value
of arguments passed on the stack where kept unmodified.

Change-Id: I779b08d7f5a6472c5e9dc351ae44abb2acafb3bd

10 years agox86:ensure that getcontext will return 0.
Kees Jongenburger [Mon, 24 Mar 2014 15:16:21 +0000 (16:16 +0100)]
x86:ensure that getcontext will return 0.

The setcontext method did not alway set the return value to 0 after
restoring the desired context. Specially When calling setcontext with
the _UC_IGNSIGM and the _UC_IGNFPU flags the return value would be non
zero.

Change-Id: Iec7f8d6a680950aa53e3c88c86e03f65005e66b2

10 years agobuild:check if .settings file is a file.
Kees Jongenburger [Mon, 24 Mar 2014 16:30:45 +0000 (17:30 +0100)]
build:check if .settings file is a file.

Check if the .settings entry is a file and not a directory. Eclipse
as we found out also likes creating .settings directories.

Change-Id: I3cbcaa7aa9e5dfb3d51c6c71df7fd72079fe213e

10 years agoimporting tail
Claudio Martella [Mon, 31 Mar 2014 20:02:03 +0000 (22:02 +0200)]
importing tail

Change-Id: Ieda9690195ccd78f081b383cb530702d45537122

10 years agoAdd TAP output to kyua, see kyua help report-tap.
Lionel Sambuc [Thu, 27 Mar 2014 14:43:45 +0000 (15:43 +0100)]
Add TAP output to kyua, see kyua help report-tap.

Change-Id: Id64218b820da85b5dba75324c732f4e02b898849

10 years agoImporting games/tetris
Thomas Cort [Sat, 22 Mar 2014 10:14:14 +0000 (06:14 -0400)]
Importing games/tetris

No Minix specific changes needed.

Change-Id: Ia6a2d9d2192ae0cee29e395aa42271005c6179c2

10 years agoWorkaround missing lchmod/lchown
Lionel Sambuc [Sat, 15 Mar 2014 13:11:22 +0000 (14:11 +0100)]
Workaround missing lchmod/lchown

Change-Id: I231a0010722619d389b763af35ff55f84ca9cb76

10 years agopatch(1) problems workaround
Ben Gras [Tue, 18 Mar 2014 10:43:08 +0000 (11:43 +0100)]
patch(1) problems workaround

. NUL input in 2 source files cause patch(1)
  to truncate the input (and fail the patches); a sed
  command removes the NULs
. in binutils/ld, configdoc.texi is patched to be removed
  but some patch(1)es leave an empty file, causing build problems;
  this file is explicitly removed.

Change-Id: Iec38d3992b0df4f7bbb9a87b1320005ab3272ff1

10 years agommap: accept non-PROT_WRITE MAP_SHARED mappings
Ben Gras [Mon, 17 Mar 2014 14:53:28 +0000 (15:53 +0100)]
mmap: accept non-PROT_WRITE MAP_SHARED mappings

Currently we don't accept writable file mmap()s, as there is no
system in place to guarantee dirty buffers would make it back to
disk. But we can actually accept MAP_SHARED for PROT_READ mappings,
meaning the ranges aren't writable at all (and no private copy is
made as with MAP_PRIVATE), as it turns out a fairly large class of
usage.

. fail writable MAP_SHARED mappings at runtime
. reduces some minix-specific patches
. lets binutils gold build on minix without further patching

Change-Id: If2896c0a555328ac5b324afa706063fc6d86519e

10 years agowriteisofs build fix (missing NAME_MAX define).
Ryan Sheridan [Mon, 17 Mar 2014 20:06:32 +0000 (13:06 -0700)]
writeisofs build fix (missing NAME_MAX define).

Building writeisofs on OS X led to a failure due to the NAME_MAX define
being missing.

10 years agoImporting games/arithmetic
Thomas Cort [Sun, 16 Mar 2014 14:56:05 +0000 (10:56 -0400)]
Importing games/arithmetic

No Minix specific changes needed.

Change-Id: I67d7a01edea0cee5be403dbbea20c2ca0f1771f0

10 years agoImporting games/random
Thomas Cort [Sun, 16 Mar 2014 14:52:07 +0000 (10:52 -0400)]
Importing games/random

No Minix specific changes needed.

Change-Id: I0fd074325f334f03426accbece4e731b746ebe14

10 years agoImporting games/wargames
Thomas Cort [Sun, 16 Mar 2014 14:49:56 +0000 (10:49 -0400)]
Importing games/wargames

No Minix specific changes needed.

Change-Id: Ie752ee476dd6be712b1dc9cae6ea260f12aaf906

10 years agoImporting games/monop
Thomas Cort [Sun, 16 Mar 2014 14:42:24 +0000 (10:42 -0400)]
Importing games/monop

No Minix specific changes needed.

Change-Id: I362b974a95911d26fcd8a4401129ca946179d93c

10 years agoImporting games/number
Thomas Cort [Sun, 16 Mar 2014 14:38:37 +0000 (10:38 -0400)]
Importing games/number

No Minix specific changes needed.

Change-Id: Iaf87f29a954f241d41c101dd74fe338b9d7c4d95

10 years agoImporting games/bcd
Thomas Cort [Sun, 16 Mar 2014 14:31:53 +0000 (10:31 -0400)]
Importing games/bcd

No Minix specific changes needed.

Change-Id: Ib98d41526baf73445f3a9465dd75fbc517b1edbe

10 years agoImporting games/ppt
Thomas Cort [Sun, 16 Mar 2014 14:29:05 +0000 (10:29 -0400)]
Importing games/ppt

No Minix specific changes needed.

Change-Id: I81eecad5c0f4c1d7a7dba356bcc2e928e3f2c175

10 years agoImporting games/morse
Thomas Cort [Sun, 16 Mar 2014 14:17:38 +0000 (10:17 -0400)]
Importing games/morse

No Minix specific changes needed.

Change-Id: Ie0d427d39a5392c0c0f2c3856ba36286957d21a4

10 years agoImporting games/pig
Thomas Cort [Sun, 16 Mar 2014 14:13:31 +0000 (10:13 -0400)]
Importing games/pig

No Minix specific changes needed.

Change-Id: If6c638f44e9cabc5b667f0b30a0654f1e8e61c13

10 years agoImporting games/fortune
Thomas Cort [Sun, 16 Mar 2014 13:39:21 +0000 (09:39 -0400)]
Importing games/fortune

Replaces commands/fortune. No Minix specific changes needed.

Change-Id: Iac79ea82dedd12e80377c85954da5e2d8eee74af

10 years agoImporting games/factor
Thomas Cort [Sat, 15 Mar 2014 20:05:49 +0000 (16:05 -0400)]
Importing games/factor

Replaces commands/factor. No Minix specific changes needed.

Change-Id: Ie2a58534c59a1ebbf922d483fb27abd8dffd1f5f

10 years agoImporting games/primes
Thomas Cort [Sat, 15 Mar 2014 20:04:13 +0000 (16:04 -0400)]
Importing games/primes

No Minix specific changes needed.

Change-Id: Id4133ad419cb1e31e49b625ad80bb003561afaad

10 years agoImporting games/adventure
Thomas Cort [Sat, 15 Mar 2014 19:46:01 +0000 (15:46 -0400)]
Importing games/adventure

No Minix specific changes needed.

Change-Id: I6826d660c60a9e01676e21ef9b95d27e64a67aa5

10 years agoImport NetBSD touch command
Zachary Storer [Sat, 15 Mar 2014 17:55:55 +0000 (11:55 -0600)]
Import NetBSD touch command

Replaces the 'touch' functionality provided by commands/touch.

10 years agoImport NetBSD echo command
Zachary Storer [Fri, 14 Mar 2014 08:09:14 +0000 (02:09 -0600)]
Import NetBSD echo command

Replaces the 'echo' functionality provided by commands/echo.

10 years agofix declaration of minix_kerninfo_user
Lionel Sambuc [Mon, 10 Mar 2014 20:23:08 +0000 (21:23 +0100)]
fix declaration of minix_kerninfo_user

10 years agoMove Assert to check MAGIC before actual use of the MBI record
Lionel Sambuc [Mon, 10 Mar 2014 20:28:36 +0000 (21:28 +0100)]
Move Assert to check MAGIC before actual use of the MBI record

10 years agobuild:update 'git review' config to match gerrit.minix3.org
Kees Jongenburger [Mon, 10 Mar 2014 15:16:14 +0000 (16:16 +0100)]
build:update 'git review' config to match gerrit.minix3.org

We have moved the gerrit service to a new server and at the same time allowed
direct access to gerrit. This change updates the '.gitreview' file to reflect
these changes. If you have an existing checkout you might need to update your
.ssh/config file to remove the git-minix alias and edit .git/config to update
the gerrit repository from 'git-minix' to the new url sheme:
ssh://username@gerrit.minix3.org:2222/minix

Change-Id: I621848d56c81c8c22a90b8092adf4ab0f29e2fb8

10 years agousr.bin/make: -j fix
Lionel Sambuc [Fri, 25 Apr 2014 14:06:33 +0000 (16:06 +0200)]
usr.bin/make: -j fix

The job option enable the usage of pipes to communicate with sub-makes.

On MINIX, it seems that there is possibility of receiving an EAGAIN on
such reads, even when it had previously been tested for POLLIN using
poll().

This patch is a workaround, by wrapping the read operation within a
do {} while(errno == EAGAIN && ...) loop.

Change-Id: Ia184c4d600efe7218d197820df87761604120862

10 years agoFix perl build hanging on pipe
Lionel Sambuc [Thu, 3 Apr 2014 13:53:43 +0000 (15:53 +0200)]
Fix perl build hanging on pipe

Change-Id: Ic1ff95f45c6082b9310b27783190ce8f92c2afad

10 years agovfs: call pipe_check before reviving select()
Ben Gras [Wed, 5 Mar 2014 14:12:54 +0000 (15:12 +0100)]
vfs: call pipe_check before reviving select()

. select callback on close() on a pipe
  would falsely revive a read-select on
  the pipe
. the extra pipe_check catches it
. fixes the new import of the netbsd
  make in -j N mode (make jobs that communicate
  with pipes)

10 years ago_MINIX_SYSTEM - fixes for in-minix crossbuild
Ben Gras [Wed, 5 Mar 2014 11:21:55 +0000 (12:21 +0100)]
_MINIX_SYSTEM - fixes for in-minix crossbuild

. define _MINIX_SYSTEM for all system code from minix.service.mk
. hide some system-level declarations and definitions
  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
  Minix (such as: NONE being defined and paddr_t being used but not
  declared)
. the similar definition _SYSTEM is unsuitable as it changes the
  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e

10 years agotest74: add mmap-related regression tests
Ben Gras [Fri, 28 Feb 2014 15:56:40 +0000 (16:56 +0100)]
test74: add mmap-related regression tests

tests many complex system/process memory interaction cases.

has to run as root so it can flush the FS cache; needed to
force FS cache misses for unmapped pages.

See the comment in test74.c for a full description of what the tested
cases are.

also re-enable filemap on arm

10 years agoVFS: add F_FLUSH_FS_CACHE fcntl
Ben Gras [Fri, 28 Feb 2014 15:26:13 +0000 (16:26 +0100)]
VFS: add F_FLUSH_FS_CACHE fcntl

This fcntl requests all cached blocks associated with the minor device
number associated with the regular file are invalidated. If the file
is a block special, invalidate the blocks associated with that minor
device instead.

This is to be used for a test that tests unmapped file-mapped memory
ranges whose blocks are not in the cache and therefore must be fetched
from a FS.

Change-Id: Ide914b2e88413aa90bd731ae587ca06fa5f13ebc

10 years agomake vfs & filesystems use failable copying
Ben Gras [Thu, 16 Jan 2014 13:22:13 +0000 (14:22 +0100)]
make vfs & filesystems use failable copying

Change the kernel to add features to vircopy and safecopies so that
transparent copy fixing won't happen to avoid deadlocks, and such copies
fail with EFAULT.

Transparently making copying work from filesystems (as normally done by
the kernel & VM when copying fails because of missing/readonly memory)
is problematic as it can happen that, for file-mapped ranges, that that
same filesystem that is blocked on the copy request is needed to satisfy
the memory range, leading to deadlock. Dito for VFS itself, if done with
a blocking call.

This change makes the copying done from a filesystem fail in such cases
with EFAULT by VFS adding the CPF_TRY flag to the grants. If a FS call
fails with EFAULT, VFS will then request the range to be made available
to VM after the FS is unblocked, allowing it to be used to satisfy the
range if need be in another VFS thread.

Similarly, for datacopies that VFS itself does, it uses the failable
vircopy variant and callers use a wrapper that talk to VM if necessary
to get the copy to work.

. kernel: add CPF_TRY flag to safecopies
. kernel: only request writable ranges to VM for the
  target buffer when copying fails
. do copying in VFS TRY-first
. some fixes in VM to build SANITYCHECK mode
. add regression test for the cases where
  - a FS system call needs memory mapped in a process that the
    FS itself must map.
  - such a range covers more than one file-mapped region.
. add 'try' mode to vircopy, physcopy
. add flags field to copy kernel call messages
. if CP_FLAG_TRY is set, do not transparently try
  to fix memory ranges
. for use by VFS when accessing user buffers to avoid
  deadlock
. remove some obsolete backwards compatability assignments
        . VFS: let thread scheduling work for VM requests too
          Allows VFS to make calls to VM while suspending and resuming
          the currently running thread. Does currently not work for the
          main thread.
        . VM: add fix memory range call for use by VFS

Change-Id: I295794269cea51a3163519a9cfe5901301d90b32

10 years agoPFS: when copy fails, don't change state
Ben Gras [Wed, 26 Feb 2014 14:57:08 +0000 (15:57 +0100)]
PFS: when copy fails, don't change state

. makes it safe to transparently repeate i/o operation on
  EFAULT
. needed for future re-issued i/o operation change in VFS

Change-Id: Iea6b29f3bff19002dcd69b30569671768ac17e21

10 years agodevmand: don't die so easily
David van Moolenbroek [Tue, 25 Feb 2014 23:28:43 +0000 (00:28 +0100)]
devmand: don't die so easily

Change-Id: I048a975fb35dadf07ebb5d067d76fb1d1892bda8

10 years agoRS: also wait for VM's RS_INIT message
David van Moolenbroek [Tue, 25 Feb 2014 14:08:20 +0000 (15:08 +0100)]
RS: also wait for VM's RS_INIT message

Bug reported by JD Begin.

Change-Id: Idd8c4299f20253fe2d982af319002bfb67af27c6

10 years agoVM: fix corruption from recursive PDE allocation
David van Moolenbroek [Tue, 25 Feb 2014 14:04:02 +0000 (15:04 +0100)]
VM: fix corruption from recursive PDE allocation

Change-Id: I6176b849fefca4bed3e92648b0d72ff47658915c

10 years agoTTY: do not reply to KERNEL
David van Moolenbroek [Tue, 25 Feb 2014 13:44:58 +0000 (14:44 +0100)]
TTY: do not reply to KERNEL

Diagnostics messages are printed using locally generated requests,
using KERNEL as the calling endpoint.  No reply should be sent for
such cases.  This check was accidentally lost with the previous
removal of tty_reply().

Change-Id: I4b76215a4d90e927b0071675d89d861aa399abb3

10 years agoRearrange endpoint number layout
David van Moolenbroek [Tue, 25 Feb 2014 13:24:52 +0000 (14:24 +0100)]
Rearrange endpoint number layout

The constants ANY, NONE, and SELF are now a function of the way the
endpoint number is split between a generation number and a process
slot number, rather than the other way around.  This allows for the
use of bit masking and shifting instead of the previous (and more
expensive) multiplication and division.

Change-Id: Id890eea74435444128c75eb0c89816b948f43c0b

10 years agoPTY: split off from TTY
David van Moolenbroek [Mon, 24 Feb 2014 22:28:12 +0000 (23:28 +0100)]
PTY: split off from TTY

Requires recreation of /dev/tty[pq]*, /dev/pty[pq]* device nodes.

Change-Id: I0e5a28d82faa934497fd3b97d619e506bcb5f439

10 years agoInstall sources with MKSRC=yes
Ben Gras [Thu, 27 Feb 2014 09:27:28 +0000 (10:27 +0100)]
Install sources with MKSRC=yes

Change-Id: Iee433cfe6796af0ea292c7eadff365a32059a609

10 years agofix for ld.so @ bitcode build
Ben Gras [Sun, 4 May 2014 11:52:22 +0000 (13:52 +0200)]
fix for ld.so @ bitcode build

ld.so linked with gold didn't work - gold was not generating
the _DYNAMIC ptr in the first GOT entry, leaving it zero, causing
mayhem for ld.so.

  . patch for gold: always generate _DYNAMIC ptr. submitted upstream,
    more info here: https://sourceware.org/bugzilla/show_bug.cgi?id=16900
  . revert "REMOVE ME: Static tests for now" - we can link tests dynamically
    This reverts commit 3e0a3993deb831eb5abcd1c1a2cb1246b43f8d1d.

Change-Id: I4f2910ec2592c31bbd14a85d8a6045497fcaf4e3

10 years agobackport 2 binutils patches
Ben Gras [Thu, 13 Mar 2014 12:21:32 +0000 (13:21 +0100)]
backport 2 binutils patches

These 2 patches are from upstream binutils and together properly
detect whether -ldl is necessary and available to build ld and gold
in plugins mode, instead of hard-coding its usage always. This lets
us build ld and gold on *bsd and minix systems, which do not have
or need -ldl for dl*() functions.

Change-Id: Ie21d027f5d7c225edc9e6e0c6fa2e4b34f421415