21 Commits

Author SHA1 Message Date
Michael Santos
0fe9e6c15e unshare: remove debug printf 2015-08-08 15:43:58 -04:00
Michael Santos
535eeb9530 readdir: do not filter paths
Return the result of readdir(3) without removing the magic "." and ".."
directories.
2015-07-25 11:54:39 -04:00
Michael Santos
d5e80fac33 setns/4: supporting setting namespace 2015-07-24 10:52:06 -04:00
Michael Santos
aa306a6ab2 Be explicit with checks
I go back and forth with this: be explicit or brief. Especially with
strcmp() where I always WTF.

The code is simpler and easier to read when the checks are explicit. For
example:

    // NULL pointer or integer?
    if (!x) return;
2015-07-20 10:41:46 -04:00
Michael Santos
ca0d6f12b4 constants: return {error, unuspported}
Return {error, unsupported} if an atom is used as an argument and the
constant the atom represents does not exist on the current platform.

The previous behaviour was inconsistent and non-deterministic. The
constant might:

* return {error,einval}. System return values could not be distinguished
  from alcove return values.

* cause an exception

* be silently ignored
2015-07-18 10:09:41 -04:00
Michael Santos
6a400730c6 alloc: call per file 2015-07-17 06:58:34 -04:00
Michael Santos
2c9633ff27 limit: call per file 2015-07-16 09:36:09 -04:00
Michael Santos
5d88ec52a0 exec: call per file 2015-07-15 09:39:05 -04:00
Michael Santos
07cc6f79dd mount: call per file 2015-07-14 05:34:57 -04:00
Michael Santos
5984f08dd2 signal: call per file
c_src/sys/alcove_signal.c has a function to map signal numbers to
constants used by the signal handler in the event loop.
2015-07-13 10:13:04 -04:00
Michael Santos
eebe8ccc7d proc: call per file 2015-07-12 08:58:48 -04:00
Michael Santos
a5bf4e282a alcove_file: call per file 2015-07-11 09:57:06 -04:00
Michael Santos
014411ba34 syscalls: rename files 2015-07-10 10:04:46 -04:00
Michael Santos
2650d22c4d utsname: calls per file 2015-07-09 08:57:19 -04:00
Michael Santos
8a2f876f7d alcove_env: call per file 2015-07-08 09:36:50 -04:00
Michael Santos
8f5c6d8550 alcove_fork.h: remove alcove_clone_constants 2015-07-06 13:48:03 -04:00
Michael Santos
5d03da9a2c Fix clone_define/2,3
Move out the clone constants to a header since fork() does not need
them. Include sched.h with the constants to ensure the CLONE_ constants
are defined.
2015-07-06 10:12:30 -04:00
Michael Santos
c7bd453e68 fork: individuals calls per file
Leave common utility functions in c_src/sys/alcove_fork.(c|h). Maybe
these files should be renamed "fork_common.c" or "alcove_fork_common.c".

Move alcove_setfd() to alcove.c since the pid_foreach() is also there.
These common functions should also eventually be moved out to another
file.
2015-07-05 11:59:55 -04:00
Michael Santos
bded978e4b mkdir: add missing header 2015-07-04 07:27:48 -04:00
Michael Santos
97fa5d5379 alcove_dir: separate files for each call 2015-07-04 07:19:48 -04:00
Michael Santos
febe77b585 cred: split out calls into separate files
Begin code re-organization by moving functions to one call per file.
2015-07-03 10:40:41 -04:00