Commit graph

953 commits

Author SHA1 Message Date
Ben Gras 4f3b015903 fix some warnings
Change-Id: I1f3fa582d8e3ddb3c981784dddb13e740102f4f3
2013-05-31 20:57:39 +00:00
Ben Gras 33a7ac7557 vfs: mmap support
. libc: add vfs_mmap, a way for vfs to initiate mmap()s.
	  This is a good special case to have as vfs is a slightly
	  different client from regular user processes. It doesn't do it
	  for itself, and has the dev & inode info already so the callback
	  to VFS for the lookup isn't necessary. So it has different info
	  to have to give to VM.
	. libc: also add minix_mmap64() that accepts a 64-bit offset, even
	  though our off_t is still 32 bit now.
	. On exec() time, try to mmap() in the executable if available.
	  (It is not yet available in this commit.)
	. To support mmap(), add do_vm_call that allows VM to lookup
	  (to ino+dev), do i/o from and close FD's on behalf of other
	  processes.

Change-Id: I831551e45a6781c74313c450eb9c967a68505932
2013-05-31 15:42:00 +00:00
Ben Gras 2d2a1a077d panic: declare as printf-style-checked
. and related fixes

Change-Id: I5131ac57dc53d8aec8d421a34c5ceea383404d7a
2013-05-31 13:35:25 +00:00
Kees Jongenburger 3139ce9631 arm:omap timers remove hardcoded base address.
Omap timers remove hardcoded base address and add some initial
support for the beaglebone's timers. Frclock_util will need
refactoring to remain independent of the ARM flavour.

Change-Id: I2b5d04e930364262c81b5686de634c0a51796b23
2013-05-24 14:03:14 +02:00
Ben Gras 717425320f kernel, random: adaptive entropy gathering
kernel: stop gathering timestamps once the bin is full per interrupt

random: once seeded, retrieve new entropy at a lower rate

Change-Id: I4ce6081d39274728d82c6889686d1650cfd5fc2e
2013-05-07 17:19:06 +00:00
Ben Gras 4ebb889e7a libsys: panic hook feature
. vfs: use it to dump threads stacks

Change-Id: I7ae3521fc153a407505f11049629e6d4142cf7c7
2013-05-07 17:18:40 +00:00
Ben Gras 80846c4a79 kernel ipc debug: various fixes
. add receive hooks in the kernel to print asynchronously
	  delivered messages
	. do not rely on MF_REPLY_PEND to decide between calls and errors,
	  as that isn't reliable for asynchronous messages; try both instead
	. add _sendcall() that extract-mfield.sh can then reliably recognize
	  the fields for messages that are sent with just send()
	. add DEBUG_DUMPIPC_NAMES to restrict printed messages to
	  from/to given process names

Change-Id: Ia65eb02a69a2b58e73bf9f009987be06dda774a3
2013-05-01 21:40:23 +00:00
Ben Gras 85fd078707 tty: non-overlapping code for FKEY_CONTROL
. to decode it in kernel/debug.c

Change-Id: I0d2cc66e87d97a362fa549b364b4d1b0e1225e66
2013-05-01 21:36:43 +00:00
Ben Gras f0cc010614 libminixfs, mfs, ext2: may re-evaluate cache size
libminixfs may now be informed of changes to the block usage on the
filesystem. if the net change becomes big enough, libminixfs may
resize the cache based on the new usage.

	. update the 2 FSes to provide this information to libminixfs

Change-Id: I158815a11da801fd5572a8de89c9e6c039b82650
2013-04-26 13:57:08 +00:00
Kees Jongenburger 988c7e39c0 libelf:use self hosted m4.
Change-Id: Ia836aa6c43d7ccbb02047e63424923fdc74eb42d
2013-04-24 17:22:59 +02:00
Ben Gras 44f34e53d5 VFS: Implement REQ_BPEEK.
This commit introduces a new request type called REQ_BPEEK. It
requests minor device blocks from the FS.  Analogously to REQ_PEEK,
it requests the filesystem to get the requested blocks into its
cache, without actually copying the result anywhere.

Change-Id: If1d06645b0e17553a64b3167091e9d12efeb3d6f
2013-04-24 10:18:16 +00:00
Ben Gras 0cfff08e56 libexec: mmap support, prealloc variants
In libexec, split the memory allocation method into cleared and
non-cleared. Cleared gives zeroed memory, non-cleared gives 'junk'
memory (that will be overwritten anyway, and so needn't be cleared)
that is faster to get.

Also introduce the 'memmap' method that can be used, if available,
to map code and data from executables into a process using the
third-party mmap() mode.

Change-Id: I26694fd3c21deb8b97e01ed675dfc14719b0672b
2013-04-24 10:18:16 +00:00
Ben Gras 49eb1f4806 vm: new secondary cache code
Primary purpose of change: to support the mmap implementation, VM must
know both (a) about some block metadata for FS cache blocks, i.e.
inode numbers and inode offsets where applicable; and (b) know about
*all* cache blocks, i.e.  also of the FS primary caches and not just
the blocks that spill into the secondary one. This changes the
interface and VM data structures.

This change is only for the interface (libminixfs) and VM data
structures; the filesystem code is unmodified, so although the
secondary cache will be used as normal, blocks will not be annotated
with inode information until the FS is modified to provide this
information. Until it is modified, mmap of files will fail gracefully
on such filesystems.

This is indicated to VFS/VM by returning ENOSYS for REQ_PEEK.

Change-Id: I1d2df6c485e6c5e89eb28d9055076cc02629594e
2013-04-24 10:18:16 +00:00
Ben Gras 9e88c40e40 VM: 64-bit mmap()
Some (backwards-compatible) changes in mmap() call message fields
that allow for a 64-bit offset. minix_mmap() takes an off_t and
minix_mmap64() takes a u64_t. Some mmap() work in VM goes into a
separate function, using the new fields, so that that can be re-used
when files are to be mapped (future commit).

Change-Id: Ifb77a90b593dd3c33cf81b396068e4da1ec5fb1c
2013-04-24 10:18:15 +00:00
Ben Gras adf2032bc0 vm: remove secondary cache code
This commit removes the secondary cache code implementation from
VM and its usage from libminixfs. It is to be replaced by a new
implementation.

Change-Id: I8fa3af06330e7604c7e0dd4cbe39d3ce353a05b1
2013-04-24 10:18:10 +00:00
Xiaoguang Sun 20e6c9329f Change function prototype to use endpoint_t instead of int 2013-04-23 17:15:15 +02:00
Ben Gras 32a4e0d84d many new tests
. test70: regression test for m_out vfs race condition

The following tests use testcache.c to generate test i/o
patterns, generate random write data and verify the reads.

	. test71: blackbox full-stack test of FS operation, testing
	  using the regular VFS interface crazy i/o patterns
	  with various working set sizes, triggering only
	  primary cache, also secondary cache, and finally
	  disk i/o and verifying contents all the time
	. test72: unit test of libminixfs, implementing
	  functions it needs from -lsys and -lblockdriver
	  and the client in order to simulate a working
	  cache client and backend environment.
	. test73: blackbox test of secondary vm cache in isolation

Change-Id: I1287e9753182b8719e634917ad158e3c1e079ceb
2013-04-19 16:21:48 +00:00
Antoine Leca 9131e98a7d utimens(2) system call
Variant of utime(2) with struct timespec (with ns precision)
instead of time_t values; also allows for tv_nsec members
the values UTIME_NOW (force update to current time) or
UTIME_OMIT (allow to set either atim or mtim independently.)

Provides a superset of utimes(2), futimes(2), lutimes(2),
and futimens(2).
Provides the same subset of utimensat(2) as does NetBSD 6.
Also import utimens() and lutimeNS() from NetBSD-current.
2013-04-12 18:55:39 +00:00
Lionel Sambuc 08ff44c446 Reducing external/bsd/file differences
Change-Id: I0d025059ba0b200ac1162ea5a764fd756600ecd0
2013-04-12 13:25:18 +02:00
Antoine Leca c979136e4e Also apply sub-second UTIME to libpuffs 2013-04-12 11:11:59 +02:00
Antoine Leca 4069cef7f9 Subsecond timestamps support for FS
Expand REQ_UTIME to include tv_nsec members
(as in struct timespec) in addition to tv_sec==time_t

Designed with help from David van Moolenbroek
2013-04-12 11:11:59 +02:00
Antoine Leca df9d28ebe7 Libpuffs: use struct timespec instead of time_t 2013-04-12 11:11:59 +02:00
Lionel Sambuc 435f2b0095 Downgrading to netbsd zlib version
Change-Id: I83cf73d8357ea34ab5e49fe15bd4c45ce54cac01
2013-04-09 16:43:13 +02:00
Thomas Cort 15b3d77268 libc: add adjtime() system call.
Implement the adjtime() system call and add a test for it to test69.
Additionally, install the adjtime.2 and clock_*.2 man pages.
2013-04-04 15:04:54 +02:00
Thomas Cort 516fec97d9 libc: add clock_settime() system call.
This also adds the sys_settime() kernel call which allows for the adjusting
of the clock named realtime in the kernel. The existing sys_stime()
function is still needed for a separate job (setting the boottime). The
boottime is set in the readclock driver. The sys_settime() interface is
meant to be flexible and will support both clock_settime() and adjtime()
when adjtime() is implemented later.

settimeofday() was adjusted to use the clock_settime() interface.

One side note discovered during testing: uptime(1) (part of the last(1)),
uses wtmp to determine boottime (not Minix's times(2)). This leads `uptime`
to report odd results when you set the time to a time prior to boottime.
This isn't a new bug introduced by my changes. It's been there for a while.
2013-04-04 15:04:54 +02:00
Thomas Cort e67fc5771d libc: add clock_getres()/clock_gettime() system calls.
In order to make it more clear that ticks should be used for timers
and realtime should be used for timestamps / displaying the date/time,
getuptime() was renamed to getticks() and getuptime2() was renamed to
getuptime().

Servers, drivers, libraries, tests, etc that use getuptime()/getuptime2()
have been updated. In instances where a realtime was calculated, the
calculation was changed to use realtime.

System calls clock_getres() and clock_gettime() were added to PM/libc.
2013-04-04 15:04:53 +02:00
Tomas Hruby a1fa603ed5 lwip (inet's alternative) is compiled by default 2013-03-25 16:51:25 +01:00
Tomas Hruby 566af1516a LIBLWIP - ARP fix
- does not crash KVM anymore
2013-03-25 16:51:25 +01:00
Ambarisha B 2d9009b0ab LWIP - fixed makefiles
- Modified libnetsock/Makefile and servers/lwip/Makefile to
  include ipvX headers

Signed-off-by: Tomas Hruby <tom@minix3.org>
2013-03-25 16:51:25 +01:00
Ambarisha B 7e55dbac33 LIBLWIP - updated to LwIP trunk
commit a4a41b9023ef5b3a7c4a1cd82fb167fc63e706df
Author: goldsimon <goldsimon@gmx.de>
Date:   Wed Sep 26 21:50:42 2012 +0200

- This also brings in LwIP's IPv6 codebase

Signed-off-by: Tomas Hruby <tom@minix3.org>
2013-03-25 16:51:24 +01:00
Tomas Hruby 9d66e2299d LIBLWIP - fixed clang warnings 2013-03-25 16:51:24 +01:00
David van Moolenbroek 3be9c7c33b Rename "struct partition" to "struct part_geom"
Change-Id: Ifaf9795ba70f5b933599b2a6ec9415e6bd13200c
2013-03-20 16:14:21 +00:00
Lionel Sambuc fbd82e76a4 Let the build system manage compilation flags
Do not hardcode warning and optimisation flags, otherwise the
main options (i.e. DBG, CPPFLAGS) will not work as expected.

You can still provide specific default by using DBG?=<value>.

Doing so leaves the opportunity to override the setting from the
commandline, while the default value from the build system is
then ignored for that particular package.

When crosscompiling, and using build.sh, adding -V DBG=<value> has
this same effect as make DBG=<value>.

Change-Id: Ic610e4d33b945acad64571e1431f1814291e2d84
2013-03-08 09:41:49 +01:00
Lionel Sambuc b9674650f1 Fix signal handling for services on abort/exit
Change-Id: I970a25ae0dd52f0d928fda376296e7b39e3e17eb
2013-03-07 13:11:31 +01:00
Ben Gras a9f55a2e46 VFS, FSes: add REQ_PEEK request type
REQ_PEEK behaves just like REQ_READ except that it does not copy
data anywhere, just obtains the blocks from the FS into the cache.

To be used by the future mmap implementation.

Change-Id: I1b56de304f0a7152b69a72c8962d04258adb44f9
2013-03-07 10:57:38 +00:00
Thomas Veerman 49ad4e8888 Spring cleanup
Remove old versions of system calls and system calls that don't have
a libc api interface anymore (dup, dup2, creat).

VFS still contains support for old system call numbers for the new stat
system calls (i.e., 65, 66, 67) to keep supporting old binaries built for
MINIX 3.2.1 (prior to the release).

Change-Id: I721779b58a50c7eeae20669de24658d55d69b25b
2013-03-06 09:56:08 +00:00
Thomas Veerman 39fad09a94 libc: drop Minix popen and use NetBSD's
Change-Id: I56f253d855671a6e1c8d53c7383107565164ab8d
2013-02-28 10:08:54 +00:00
Thomas Veerman 473547c777 VFS: implement pipe2
Change-Id: Iedc8042dd73a903456b25ba665d12577f5589ca2
2013-02-28 10:08:53 +00:00
Thomas Veerman fa78dc389f socket: implement SOCK_CLOEXEC and SOCK_NONBLOCK
Change-Id: I3fa36fa999c82a192d402cb4d913bd397e106e53
2013-02-28 10:08:53 +00:00
Thomas Veerman fd610ba1b0 VFS: add ability to open files O_CLOEXEC
.adjust libc to make use of it (undo __minix diff)

Change-Id: I90a1aa219fcd1b12b6bc60e72176f326eac8184a
2013-02-28 10:08:53 +00:00
Lionel Sambuc f640210005 Removing obsolete _NBSD_LIBC define
Change-Id: Ia6ce84ccdf36cf6f64540b990baaa7d85c53533d
2013-02-26 09:44:24 +00:00
Lionel Sambuc afa4fd56ac Removing obsolete _MINIX_COMPAT define
Change-Id: If1f5901a53bbc454c04ee33ebb469a58f0566df7
2013-02-26 09:44:23 +00:00
Lionel Sambuc 813d4c6a36 Removing obsolete _MINIX_SOURCE define
Change-Id: I924d5af294cd5daf17c73f71803f060cea3c3d8b
2013-02-26 09:44:21 +00:00
Lionel Sambuc 8e4736f2df Removing obsolete _MINIX define
Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076
2013-02-26 09:44:20 +00:00
Thomas Veerman 4de18d528b Remove unintentionally commited file
Change-Id: I2e0f66f5d8033e98c4e9e20d60773548af9e8c35
2013-02-22 13:56:25 +00:00
Thomas Veerman 2b793e4945 libsys: refactor frclock api
Make the frclock functions similar to the tsc utility functions. This
way, we can call frclock functions from the framebuffer driver which
will use frclock on ARM and tsc on X86.

Also, frclock_64_to_micros computed seconds, not microseconds

Change-Id: I6718ae0fb7db050794f6f032205923e1a32dc1ac
2013-02-22 13:08:21 +00:00
Ben Gras 7a07b58aa8 test66: float smoke test, floating point fixes (arm)
Change-Id: Idd209ab6f341fbfb6b2dca77290ff440695bc2c1
2013-02-20 12:29:37 +00:00
Ben Gras 7df45744ad libexec: quiet
. harmless errors in the case of shell scripts

Change-Id: I461776024a21233e291102ca6d05dc7fa767f71a
2013-02-10 19:52:25 +01:00
Ben Gras 95513e73da opendir change: refinement
Change-Id: I90cc6929c9e7678da8e200688dcd40441efe030f
2013-02-08 23:09:21 +00:00
Ben Gras 4505b4a30a add opendir alias
Change-Id: Ib121e763bac7bea44a2f2533c454ff7d9361dc8d
2013-02-08 21:40:57 +00:00
Ben Gras f5cfab17d6 ldivmod, uldivmod: fix qdivrem calls
. ldivmod, uldivmod were passing the modulo argument pointer
	  in R4, which is bogus, as qdivrem expects it on the stack as
	  per the EABI, causing essentially 'random' memory to be trampled
	  by qdivrem. fix by pushing R4 before the call.
	. also add these functions to -minc so -lminc clients can be
	  linked without -lgcc

Change-Id: I90b0b28b51a188c93da5de6afb108224749ea794
2013-02-08 14:09:45 +01:00
Kees Jongenburger 3357fcb24a GPIO:further development
* Generalize GPIO handling.
* Add libs to configure gpio's clocks and pads
* Add Interrupt handling.
* Introduce mmio.h and log.h

Change-Id: I928e4c807d15031de2eede4b3ecff62df795f8ac
2013-02-06 16:07:43 +01:00
Ben Gras 298b41b523 libexec: detect short files
if an exec() fails partway through reading in the sections, the target
process is already gone and a defunct process remains. sanity checking
the binary beforehand helps that.

test10 mutilates binaries and exec()s them on purpose; making an exec()
fail cleanly in such cases seems like acceptable behaviour.

fixes test10 on ARM.

Change-Id: I1ed9bb200ce469d4d349073cadccad5503b2fcb0
2013-02-04 12:04:35 +01:00
Ben Gras 57bab02d57 kernel, libc: signals fixes
. kernel: signal handler args for ARM
	. kernel: sanity check return address (LSB indicates thumb mode)
	. libc: properly retrieve signal mask for ARM

together fix test37 on ARM.

Change-Id: I4e00f754c50104ed85c7fdf8ec5ad54568f20a81
2013-02-04 12:03:46 +01:00
Lionel Sambuc 252a83f614 Fix command line history in ash
Also did some cleanup in ash sources, to make minix modifications
more obvious, as well as some simplifications (by removing code which
is never compiled)

Removed EDITLINE support, use libedit, which does the termcap/terminfo
handling.

Change-Id: I19f7f425ed6a61298844631f9d7f3173cf7f30c0
2013-02-01 11:41:47 +01:00
Thomas Veerman db8c1ee9d0 ARM: provide free running clock to replace ccnt
The Cycle CouNTer on ARM cannot be used reliably as it wraps around
rather quickly and can be altered by user space (on Minix). Furthermore,
it's buggy when wrapping and is not implemented at all on the Linaro
Beagleboard emulator.

This patch programs GPTIMER10 as a free running clock at 1.625 MHz (it
doesn't generate interrupts). It's memory mapped into every process,
which enables libsys to provide micro_delay().

Change-Id: Iba004c6c62976762fe154ea390d69e518eec1531
2013-01-31 15:19:11 +00:00
Ben Gras e3e5cf6d34 arm: make signal handlers work
A few kernel and calling convention adjustments to make sigsend and
sigreturn work for arm.

	. provide a arch_proc_setcontext for earm in kernel
	. set LR in context of signal handler to provide a proper
	  return address (to __sigreturn)
	. change __sigreturn to retrieve the sigcontext pointer
	  from the sigframe struct and pass it to _sigreturn() in r0

Change-Id: Icd135a70595382c79d11d8dd9876f6a6f1df41f8
2013-01-30 04:10:12 +00:00
Ben Gras b6d285faba libc: add stat aliases
. add non-internal aliases for stat, lstat, fstat

Change-Id: I87e025b2bf073ff56a5742fc1dcf5badb2b7b321
2013-01-29 20:11:16 +00:00
Ben Gras 08cb986d3f vm: fix kernel-requested mappings for arm
. make vm tell kernel virtual locations of mappings
	. makes _minix_kerninfo feature work
	. fix for mappings being larger than what 1 pde can address
	  (e.g. devices memory requested on arm)
	. still requires a special case for devices memory for the
	  kernel, which has to switch to virtual addressing

Change-Id: I2e94090aa432346fa4da0edeba72f0b7406c2ad7
2013-01-29 17:57:04 +00:00
Thomas Veerman fe892c5e66 libcsu: store argc and argv on the stack 2013-01-25 17:07:02 +00:00
Thomas Veerman fe45ee7ed0 ARM: disable __minix_init for now
On ARM we can't yet globally map pages into every process. So now that
we correctly receive the pointer to the globally mapped kern_info
struct, we have to ignore it on ARM because attempting to dereference
the pointer yields a segfault.
2013-01-25 17:07:02 +00:00
Thomas Veerman e52ecfbf5d ARM: correctly store kernel_info_struct pointer 2013-01-25 17:07:02 +00:00
Thomas Veerman 264c20159d Split libsys in arch dependent parts
The ARM part is not finished yet and will be fixed in a later commit.
2013-01-25 17:07:01 +00:00
Ben Gras 8ebdbed79c getifaddrs: add un-namespaced alias
. needed for security/heimdal, needed for git

Change-Id: I8638945dffd0abffd487c47281ad7616da1b70db
2013-01-24 21:57:15 +00:00
Lionel Sambuc 3e1db26a5a Termcap update, replacing elvis by nvi.
Removing elvis, importing nvi, ctags, updating libedit.

Change-Id: I881eb04d2dc64cf112facd992de1114e1a59107f
2013-01-24 07:44:38 +01:00
Lionel Sambuc f9f6c9251a Re-adding extended keys in minix termcap entry 2013-01-23 21:28:17 +01:00
Lionel Sambuc 96836647f8 Fixing cross build i386 on minix 2013-01-23 21:03:38 +01:00
Arne Welzel a58c735738 virtio: generic virtio library 2013-01-23 09:03:03 +00:00
Nicholas Heath 1bbba6353d Fixed bug in getrlimit as core dumps are supported now. 2013-01-17 14:06:35 +00:00
Lionel Sambuc b1c4ba4ab6 ARM updates
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.

There is also a few related Makefile updates as well as minor
source code corrections.
2013-01-17 10:03:58 +01:00
Lionel Sambuc ebae0113f8 Removing useless __NBSD_LIBC define in libcurses 2013-01-17 10:03:58 +01:00
Ben Gras 287c0e3b92 csu: restore crt1.o symlink
. minix gcc package uses crt1.o to link
2013-01-15 09:20:27 +00:00
Lionel Sambuc 0ac803292e Fix warnings trivial warnings.
Fix warnings about:
 . Unused variables
 . format mismatch in printf/scanf format string and arguments
 . Missing parenthesis around assignment as truth values
 . Clang warnings anout unknown GCC pragma
2013-01-14 11:44:31 +01:00
Lionel Sambuc f5435c74b7 Updating lib/libcrypt
Change-Id: I4dc5ca7c86abc5295ffc57386a14dd1d790fd489
2013-01-14 11:36:27 +01:00
Lionel Sambuc 0c3ae37f52 Updating libcurses, libterminfo and terminfo.
The three are updated together as they are tightly coupled.

Change-Id: I9e1f07b6adc6e8ae10833e6f1402f8472d2d34b8
2013-01-14 11:36:26 +01:00
Lionel Sambuc f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00
Lionel Sambuc f6aac1c3b5 Moving all NetBSD headers back where they belong.
Moving include/sys NetBSD headers to /sys/sys
Moving include/arch/*/ NetBSD headers to /sys/arch/*/include

Change-Id: Ia1a45d4e83ab806c84093ec2b61bdbea9bed65a0
2013-01-14 11:36:25 +01:00
Thomas Veerman aa3623d873 ARM: make cycle counter available to userspace 2013-01-11 09:18:36 +00:00
Thomas Veerman 93103f497f libmthread: add possibility to randomize scheduler 2013-01-11 09:18:35 +00:00
Ben Gras 017ce5a503 libc, libutil: remove compat hacks 2013-01-08 15:47:37 +00:00
Ben Gras d36ce68582 libexec exec fix
. restores executing shell scripts without explicit interpreter
2012-12-29 01:41:24 +00:00
Ben Gras 29edcad310 vm: replace phys avl by array
. make vm be able to use malloc() by overriding brk()
   and minix_mmap() functions
 . phys regions can then be malloc()ed and free()d instead
   of being in an avl tree, which is slightly faster
 . 'offset' field in phys_region can go too (offset is implied
   by position in array) but leads to bigger code changes
2012-12-26 16:14:41 +00:00
Ben Gras 59ba14bb1d libutil: add O_NOCTTY back to old pty open code
restores fix 4f78dfcabc

	. fixes e.g. ssh sessions not getting their own
	  controlling tty
2012-12-10 15:22:12 +01:00
Lionel Sambuc 456a46e6bf Removing useless minix/types.h header
Change-Id: If5f922279b87f075f301b64c7786caa18b434c2a
2012-12-07 13:58:06 +01:00
Lionel Sambuc 100babf0e0 Removing last reference to NETBSDINCLUDES
Also removing minix-config.inc and placing its content in
Makefile.inc, as the file is modified anyway. Simplifies diff.

Change-Id: I6262fdb790a5455b59e07acdccdc221fd5dd41f8
2012-12-07 13:58:06 +01:00
Lionel Sambuc 7faf801d1f fixing warning about uninitialized variable in libsys/vprintf.c
Change-Id: I8764a57b502edc3d50a32b3e2db56c4f94592309
2012-12-07 13:58:06 +01:00
Thomas Veerman d9f4f71916 Implement dynamic mtab support
With this patch /etc/mtab becomes obsolete.
2012-11-26 15:20:18 +00:00
Lionel Sambuc 9903b9fb96 Fixing wrong dependency from libc on libsys. 2012-11-26 13:53:02 +01:00
Erik van der Kouwe 57c748b968 Remove ability to pass commands to bootloader 2012-11-22 19:16:17 +01:00
Lionel Sambuc 4a711bea63 Upgrading bzip2
Change-Id: I6968b0f0401f3f42dc55a0f4938a7e12a3a55ae7
2012-11-21 18:32:06 +01:00
Ben Gras a89ec8bc3b can't get_block(NO_DEV) any more
. 'anonymous' cache blocks (retrieved with NO_DEV as dev
	  parameter) were used to implement read()s from holes in
	  inodes that should return zeroes
	. this is an awkward special case in the cache code though
	  and there's a more direct way to implement the same functionality:
	  instead of copying from a new, anonymous, zero block, to
	  the user target buffer, simply sys_safememset the user target
	  buffer directly. as this was the only use of this feature,
	  this is all that's needed to simplify the cache code a little.
2012-11-16 16:37:44 +01:00
Tomas Hruby 10f30159a9 struct minix_ipcvecs - pretty-print
- the _ptr suffix is not needed anymore :-)
2012-11-15 16:52:00 +01:00
Lionel Sambuc cd554e7284 Hack for unresolved symbol read_tsc_64 2012-11-15 16:07:30 +01:00
Lionel Sambuc d19d7d58aa Toolchain upgrade and portability improvements.
upgrade to NetBSD CVS release from 2012/10/17 12:00:00 UTC

Makefiles updates to imporve portability

Made sure to be consistent in the usage of braces/parenthesis at
least on a per file basis. For variables, it is recommended to
continue to use braces.
2012-11-15 16:07:29 +01:00
Lionel Sambuc 9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00
Lionel Sambuc bdb3f57135 Adding shlib_version for libsys 2012-11-15 16:07:29 +01:00
Lionel Sambuc e415d48872 Libc update to simplify merge.
Bumping libc files for unsupported architectures, to simplify merging.
A bunch of small fixes:
 * in libutil update
 * the macro in endian.h
 * some undefined types due to clear separation from host.
 * Fix a warning for cdbr.c

Some modification which were required for the new build system:
 * inclusion path for const.h in sconst, still hacky
 * Removed default malloc.c which conflicts on some occasions.
2012-11-15 16:07:29 +01:00
Lionel Sambuc dba3562d78 Updating libutil from netbsd 2012-11-15 16:07:29 +01:00
Ben Gras 196021cd82 drop safemap code 2012-10-30 13:55:42 +01:00
Lionel Sambuc 85fee539f4 Upgrading pax.
This also means importing librmt.

Change-Id: Ie5b314aeaad28dca46acb64f20f2d70746ea52d0
2012-10-24 13:42:44 +02:00