-Add support for returning the amount of characters that would have been
written if the buffer was large enough.
-Protect code against NULL dereference.
Change-Id: Ifb2041f4757e8a99f255d94768ba19621bc0ea16
http://gerrit.minix3.org/#/c/2560/
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
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
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
. 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
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
- Fix for possible unset uid/gid in toproto
- Fix for default mtree style
- Update libelf
- Importing libexecinfo
- Resynchronize GCC, mpc, gmp, mpfr
- build.sh: Replace params with show-params.
This has been done as the make target has been renamed in the same
way, while a new target named params has been added. This new
target generates a file containing all the parameters, instead of
printing it on the console.
- Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
get getservbyport() out of the inner loop
Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
. use netbsd sigframe, sigcontext struct
. netbsd sigframe *contains* sigcontext; use that directly
in kernel sigsend
. drop two fields from minix x86 stackframe.h (process context)
that were unused, retadr and st
use in-sigframe sigcontext
Change-Id: Ib59d699596dc3a78163dee59f19730482fdddf11
. use <sys/ioccom.h> to make ioctls
. use netbsd <sys/ioctl.h>, include minix ioctls
. convert to varargs ioctl() like netbsd
Change-Id: Id5165780df48172b28bf0003603516d30d7c1abb
The follwoing file have been merged as far as reasonably possible:
* sys/arch/arm/include/:
- ansi.h
- asm.h
* sys/arch/arm/include/:
- ansi.h
- asm.h
- cdef.h
Unlike on NetBSD, the definition of size_t, ssize_t and ptrdiff_t are
the same as the ones on intel.
Change-Id: I3b52e9c03991e575450ca42567877cd4fd14976a
current version of <sys/stat.h> from netbsd repo is older than the minix
one; will be corrected on next netbsd re-import.
Change-Id: Ifc696581ef476cfecd9695a9f6e74b844131e584
This file was copied over to allow for the compilation of some
of the arch/i386 code, due to a bug in lib/libc/compat/Makefile.inc.
This patch fixes the situation, and removes the now useless header, as
well as remove a patch in lib/libc/stdlib/putenv.c
Change-Id: Ic5e4c4bb967f58f6e874c091788e1dd5ecaebe5e
. create signals-related struct message type to store sigset_t
directly
. create notify-specific message types, so the generic NOTIFY_ARG
doesn't exist anymore
. various related test expansions, improvements, fixes
. add a few error-checks to sigismember() calls
. rename kernel call specific signals fields to SYS_*
Change-Id: I53c18999b5eaf0cfa0cb25f5330bee9e7ad2b478
not entirely clean; _SIGN hack remains for now. also leave in
minix-specific stuff like minix-specific errno's and OK.
Change-Id: I035efc52e27b92f58ae0d88dab19dec263edb6e3
. also implement some netbsd-style tty ioctls
. also implement SIGINFO
. also import netbsd stty
. rename keymap minix CMIN (for ctrl+minus on numeric keypad)
to CNMIN; to keep unchanged control character default CMIN in
new <sys/ttydefaults.h>
. convert CS[5678] logic in rs232 driver to explicit setting of LC
bits
Change-Id: I9b7d2963fe9aec00fb6e7535ef565b3191fc1c1d
* Also change _orig to _intr for clarity
* Cleaned up {IPC,KER}VEC
* Renamed _minix_kernel_info_struct to get_minix_kerninfo
* Merged _senda.S into _ipc.S
* Moved into separate files get_minix_kerninfo and _do_kernel_call
* Adapted do_kernel_call to follow same _ convention as ipc functions
* Drop patches in libc/net/send.c and libc/include/namespace.h
Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
. 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
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
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