Thomas Cort [Sun, 14 Aug 2011 12:41:39 +0000 (12:41 +0000)]
mkdir: allow 'mkdir -p' with trailing '/'
Let's suppose that /usr/tmp exists and one wants /usr/tmp/a/b
If one runs "mkdir -p /usr/tmp/a/b/" (the '/' at the end is
important), then a "File exists" error comes up. Example:
Ben Gras [Fri, 12 Aug 2011 20:59:23 +0000 (20:59 +0000)]
kernel: don't use -ffreestanding
. workaround for clang's stdint.h __STDC_HOSTED__ test
that causes the host stdint.h to be ignored for -ffreestanding,
causing a type to be double-defined in the kernel
Ben Gras [Mon, 1 Aug 2011 13:35:34 +0000 (15:35 +0200)]
kernel: invlpg facility
. only use for single-page invalidations initially
. shows tiny but statistically significant performance
improvement; will be more helpful in certain VM debug
modes
Ben Gras [Thu, 4 Aug 2011 23:52:03 +0000 (23:52 +0000)]
vm/ipc: only report signals when it matters to ipc
. ipc wants to know about processes that get
signals, so that it can break blocking ipc operations
. doing it for every single signal is wasteful
and causes the annoying 'no slot for signals' message
. this fix tells vm on a per-process basis it (ipc)
wants to be notified, i.e. only when it does any ipc calls
. move ipc config to separate config file while we're at it
Antoine Leca [Tue, 26 Jul 2011 11:49:20 +0000 (13:49 +0200)]
ash: don't rely on libc signal names
The bsd signal names are out-of-order compared to the minix ones.
I found out (the hard way) that the (MINIX-descending) ordered list of
signals in <sys/signal.h> does not match the (BSD-descending) ordered
list of signals in usr/src/lib/libc/nbsd_libc/gen/sig{name,list}.c
Beyond being unfortunate, it prevents the trap command of ash to handle
correctly a named signal; a funny test case is
#!/bin/sh
trap 'echo trapping signal BUS' BUS
trap 'echo trapping signal 10 (USR1)' 10
trap # show me what is currently trapped
As a quick workaround, I disabled the use of the libc-provided
sys_sig{name,list} arrays for ash, and reverted to the hand-made array
which is used by the less capable MINIX libc. It allowed me to use
pkgsrc.
Ben Gras [Tue, 26 Jul 2011 15:59:57 +0000 (17:59 +0200)]
add /etc/resolv.conf pointing to minix nonamed
. needed for netbsd libc dns resolution
. points to minix nonamed
. /etc/resolv.conf should have the real info
(written by netconf / dhcp client)
. nonamed should be phased out but will probably
be around for the 'old' libc
Ben Gras [Fri, 22 Jul 2011 10:55:04 +0000 (10:55 +0000)]
kernel: improve exception debug printing
. fold 2 exception-in-kernel cases (pagefault and rest)
into 1
. for exceptions that occur in kernel, don't just print
kernel stacktrace (typically that is just the exception
handler) but also the stacktrace of when the exception
happened
Ben Gras [Wed, 20 Jul 2011 13:44:59 +0000 (15:44 +0200)]
cleanup of libterminfo introduction
. don't install minix <termcap.h> as libterminfo
has its own (but still install it in /usr/include.ack)
. forget minix termcap functions in -lcompat_minix
. make commands use -lterminfo in netbsd libc compile mode
Ben Gras [Wed, 20 Jul 2011 12:51:58 +0000 (14:51 +0200)]
import netbsd sed
. speeds up mkdep (i.e. world builds) significantly
. have to keep minix /bin/sed for a while because previous
usr/etc/rc depends on it
. force mkdep to use /usr/bin/sed for speedup
Arun Thomas [Tue, 19 Jul 2011 13:26:25 +0000 (15:26 +0200)]
buildsystem: use dependall target
Improves cache locality by grouping together dependency generation
with building for each program instead of doing a whole-tree dep
generation phase followed by a whole-tree build phase
Ben Gras [Sat, 16 Jul 2011 01:11:10 +0000 (03:11 +0200)]
rename mmap() and munmap()
. it's a good extra interface to have but doesn't
meet standardised functionality
. applications (in pkgsrc) find it and expect
full functionality the minix mmap doesn't offter
. on the whole probably better to hide these functions
(mmap and friends) until they are grown up; the base system
can use the new minix_* names
Ben Gras [Fri, 15 Jul 2011 16:10:50 +0000 (18:10 +0200)]
rename mmap MAP_SHARED to MAP_IPC_SHARED
. MAP_SHARED was used to implement sysv shared memory
. used to signal shareable memory region to VM
. assumptions about this situation break when processes
use MAP_SHARED for its normal, standardised meaning
POSIX truncate specification says "Upon successful completion, if
the *file size is changed*, this function shall mark for update the
st_ctime and st_mtime fields of the file." This patch prevents
changing of the date fields when the size stays the same.