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.
Ben Gras [Wed, 13 Jul 2011 21:59:07 +0000 (23:59 +0200)]
release.sh: jail install
. Feature to do a 'release' into a permanent
and usable FS hierarchy, usable with chroot
. Just like the temporary staging hierarchy really
. Useful to checking out and building the latest
version of minix from a host minix; to
(1) make an uptodate minix jail, and
(2) make a sterile, reproducible jail environment, and
(3) use as disposable environment in which moving /usr/pkg
is ok
(i.e. pkgsrc bulk builds)
Ben Gras [Wed, 13 Jul 2011 20:34:37 +0000 (22:34 +0200)]
generate sys_errlist without holes
. strerror() assumes this
. remove generated libminc/errlist.c
. errno's in <sys/errno.h> have to be in sorted order
. filtering out some errno.h in Makefile lets us use near-stock
errlist.awk
* VFS and installed MFSes must be in sync before and after this change *
Use struct stat from NetBSD. It requires adding new STAT, FSTAT and LSTAT
syscalls. Libc modification is both backward and forward compatible.
Also new struct stat uses modern field sizes to avoid ABI
incompatibility, when we update uid_t, gid_t and company.
Exceptions are ino_t and off_t in old libc (though paddings added).
Now users can choose between libsys, libsys + libminc and
libsys + libc. E.g. PUFFS/FUSE servers need libsys + libc while
old servers can use libsys + libminc.
Tomas Hruby [Mon, 4 Jul 2011 08:46:51 +0000 (10:46 +0200)]
E1000 - fixed reading/writing device registers
- the pointers must be flagged as volatile because otherwise they
might be "optimized" by a compiler. It is a common good
practice to access the registers this way, the keyword is in C
for a reason.
- for instance, in eeprom_eerd() when polling a register the
compiler, under certain conditions, may decide upon the first
read and if it does not break the loop it assumes that the
value is not going to change and thus stays in an infinite
loop.
. if the build target is invoked again for the install target, the
stack sizes aren't set properly. A workaround is to only build
and not install the servers. (Installing them doesn't really make
sense anyway.)
Thomas Cort [Wed, 29 Jun 2011 14:45:47 +0000 (14:45 +0000)]
opendir(3): on success, don't clobber errno
The opendir(3) function was setting errno to ENOTDIR even
when the directory existed and was opened successfully. This
caused git to falsely detect an error.
This change moves the errno assignment into the failure code
block. It also adds a test to test24 to check for errno
changing when opendir(3) returns success.