]> Zhao Yanbai Git Server - minix.git/log
minix.git
11 years agoARM:Rename ARM_BIG_PAGE to ARM_SECTION. 36/536/1
Kees Jongenburger [Mon, 29 Apr 2013 09:42:26 +0000 (11:42 +0200)]
ARM:Rename ARM_BIG_PAGE to ARM_SECTION.

The natural term to use when talking about MINIX big pages on ARM
is SECTION. A section is a level 1 page table entry pointing to
a 1MB area.

Change-Id: I9bd27ca99bc772126c31c27a537b1415db20c4a6

11 years agomkfs.mfs: double indirect block support 31/531/2
Ben Gras [Fri, 26 Apr 2013 15:35:31 +0000 (15:35 +0000)]
mkfs.mfs: double indirect block support

. allows >4MB files for default 4k block size

Change-Id: I09277fc3704fac1a44af82202c11435dc7ae8d55

11 years agoext2: annotate cache blocks with inode metadata 30/530/2
Ben Gras [Thu, 25 Apr 2013 12:03:40 +0000 (12:03 +0000)]
ext2: annotate cache blocks with inode metadata

. allows mmap() to work on it

Change-Id: I33af8b86ebb408d971478d00ed2caacf15afc7a5

11 years agolibminixfs, mfs, ext2: may re-evaluate cache size 29/529/1
Ben Gras [Fri, 26 Apr 2013 09:54:33 +0000 (09:54 +0000)]
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

11 years agolibelf:use self hosted m4. 27/527/2
Kees Jongenburger [Wed, 24 Apr 2013 09:04:28 +0000 (11:04 +0200)]
libelf:use self hosted m4.

Change-Id: Ia836aa6c43d7ccbb02047e63424923fdc74eb42d

11 years agotoproto:convert special execute bits to chars
Kees Jongenburger [Tue, 23 Apr 2013 14:51:02 +0000 (16:51 +0200)]
toproto:convert special execute bits to chars

Convert the special execute bits of the METALOG file mode entries into mkfs.mfs
compatible u and g flags.

11 years agoVFS: Implement REQ_BPEEK. 08/408/7
Ben Gras [Sat, 16 Mar 2013 04:09:36 +0000 (04:09 +0000)]
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

11 years agolibexec: mmap support, prealloc variants 07/407/7
Ben Gras [Sat, 16 Mar 2013 03:46:37 +0000 (03:46 +0000)]
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

11 years agoMFS: annotate cache blocks with inode metadata 06/406/7
Ben Gras [Sat, 16 Mar 2013 02:29:32 +0000 (02:29 +0000)]
MFS: annotate cache blocks with inode metadata

. use lmfs_* cache functions that provide the cache with inode
  metadata whenever applicable, i.e. tell the cache code which
  inode number and in-inode offset a particular cache block
  corresponds to.
. needed for mmap implementation

Change-Id: Ic7d3c0c49029880f86a31368278722e907bc2896

11 years agovm: new secondary cache code 18/418/6
Ben Gras [Wed, 20 Mar 2013 19:18:52 +0000 (19:18 +0000)]
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

11 years agoVM: memtype fix 16/416/6
Ben Gras [Wed, 20 Mar 2013 19:09:01 +0000 (19:09 +0000)]
VM: memtype fix

Memory types in VM are described by methods. Each mapped region has
a type, and all pages instantiated get that type on creation.
Individual page types has to be able to change though. This commit
changes the code to use the memory types of the individual pages,
where appropriate, instead of just the higher-level region, in case
it has changed. This is needed to e.g. support future copy-on-write
MAP_PRIVATE mmap modes.

Change-Id: I5523db14ac036ec774a54392fb67f9acb8725731

11 years agoVM: 64-bit mmap() 15/415/6
Ben Gras [Wed, 20 Mar 2013 18:45:10 +0000 (18:45 +0000)]
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

11 years agofilesystems: return ENOSYS for REQ_PEEK 14/414/6
Ben Gras [Wed, 20 Mar 2013 17:04:39 +0000 (17:04 +0000)]
filesystems: return ENOSYS for REQ_PEEK

The filesystems already implement REQ_PEEK, but do not fully
use the new filesystem cache code yet. (Because it isn't committed
yet..) REQ_PEEK should be disabled for them until they do.

This indicates to VFS that they are not annotating their cache
blocks (in VM) with inode number/offset info, and therefore mmap()
shouldn't succeed on any of their files. (Most importantly exec()
won't fallback elegantly otherwise.)

Change-Id: Ic57ee422864b4bbc031eadba32973270907b02fd

11 years agovm: remove secondary cache code 03/403/8
Ben Gras [Thu, 8 Nov 2012 12:45:06 +0000 (13:45 +0100)]
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

11 years agoChange function prototype to use endpoint_t instead of int 24/524/1
Xiaoguang Sun [Mon, 22 Apr 2013 23:50:45 +0000 (23:50 +0000)]
Change function prototype to use endpoint_t instead of int

11 years agobuild:refactor arm_sdimage.sh as to no longer require root. 21/521/2
Kees Jongenburger [Mon, 22 Apr 2013 20:53:44 +0000 (22:53 +0200)]
build:refactor arm_sdimage.sh as to no longer require root.

There where two reasons for needing root access while making ARM builds. The
first reason was that we needed root permissions to create device nodes and
assign permissions to files. The second reason we needed root was that we used
loop mounted files to copy the build output to the file backed storage.

The first problem is solved by building in unprivileged mode (adding -U) during
compilation. The second problem is solved by using mcopy to put files on the
fat partition and use the mkfs.mfs proto files to create MFS file system.

Future work might be to replace this script by the netbsd makefs tool.

Change-Id: Ibba61d4cad053f7c1ede26169d5214065a4939d8

11 years agobuild:add tool to convert from METALOG to proto files. 18/518/3
Kees Jongenburger [Fri, 19 Apr 2013 09:49:09 +0000 (11:49 +0200)]
build:add tool to convert from METALOG to proto files.

Change-Id: I5c4e15b1a2bac5a4ca3a0530f8d6aa2643ac720a

11 years agobuild:add script to sort netbsd sets and sort minix/mi. 17/517/3
Kees Jongenburger [Fri, 19 Apr 2013 09:43:26 +0000 (11:43 +0200)]
build:add script to sort netbsd sets and sort minix/mi.

Change-Id: I309d8bbcfe2f5b6d5e1ae7626422c4402985ad1d

11 years agorun script:return 1 upon test failure. 19/519/2
Kees Jongenburger [Sat, 20 Apr 2013 07:26:18 +0000 (09:26 +0200)]
run script:return 1 upon test failure.

Change-Id: If3c9d636a04da7f7b4098b58d29c492c664dab1a

11 years agomany new tests 11/511/6
Ben Gras [Fri, 12 Apr 2013 20:54:42 +0000 (20:54 +0000)]
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

11 years agovfs: fix null deref, pfs: add fchmod() 08/508/5
Ben Gras [Mon, 15 Apr 2013 17:44:19 +0000 (17:44 +0000)]
vfs: fix null deref, pfs: add fchmod()

. vfs read_only() assumes vnode->v_vmnt is non-NULL, but it can
  be NULL sometimes
. e.g. fchmod() on UDS triggered NULL deref; add a check and
  add REQ_CHMOD to pfs so unix domain sockets can be fchmod()ded
. add to test56

Change-Id: I83c840f101b647516897cc99fcf472116d762012

11 years agomkfs.mfs:add comment about the overflow check. 16/516/2
Kees Jongenburger [Thu, 18 Apr 2013 15:38:46 +0000 (17:38 +0200)]
mkfs.mfs:add comment about the overflow check.

Change-Id: I1f09c3a62377164296037f6dc9b7874023123311

11 years agomkfs.mfs:fix to allow to fill larger file systems. 15/515/2
Kees Jongenburger [Thu, 18 Apr 2013 12:29:53 +0000 (14:29 +0200)]
mkfs.mfs:fix to allow to fill larger file systems.

Allow the number of written blocks to exceed 8 * block_size.

Change-Id: I301ce46a92d86c6220c3af2acee22db26a4b4496

11 years agomkfs.mfs:remove MFS V1 related headers. 14/514/2
Kees Jongenburger [Thu, 18 Apr 2013 12:22:42 +0000 (14:22 +0200)]
mkfs.mfs:remove MFS V1 related headers.

Change-Id: I46a8128f54112ee0092ef60160d88cadd0038be0

11 years agomkfs.mfs:remove some globals 13/513/2
Kees Jongenburger [Wed, 17 Apr 2013 11:41:04 +0000 (13:41 +0200)]
mkfs.mfs:remove some globals

Remove the gobal inocount, zonecount and blockcount.

Change-Id: I77d120bb79bcf183e0c6b5abed736343af7badf2

11 years agorun script: correction, clarity
Ben Gras [Fri, 19 Apr 2013 10:24:50 +0000 (10:24 +0000)]
run script: correction, clarity

Change-Id: Ibf583c6277c67646dd90d7c49482daf4e76b78b6

11 years agotest run: feature for nicer jenkins interaction 12/512/2
Ben Gras [Thu, 18 Apr 2013 13:41:01 +0000 (13:41 +0000)]
test run: feature for nicer jenkins interaction

. add -l option to list available tests
. add -t option to specify tests to run
. also improve the root check a bit by
  not relying on an environment var
. do not print the human-friendly banner & summary
  if a test list is given to make the test
  results easy to parse

Change-Id: Id0f87d485240b1924d667af788338ae31c3dc94c

11 years agotests cleanup 10/510/2
Ben Gras [Tue, 16 Apr 2013 16:04:46 +0000 (16:04 +0000)]
tests cleanup

. make common.o link with the tests instead of being
  #included as common.c
. fix warnings about missing prototypes by declaring functions
  static
. reduces some duplicated code

Change-Id: Ic2a765d7f5886add5863190efec3fdd2d2ea2137

11 years agovfs: make m_out non-global 06/506/3
Ben Gras [Fri, 12 Apr 2013 16:41:23 +0000 (16:41 +0000)]
vfs: make m_out non-global

m_out is shared between threads as the reply message, and it can happen
results get overwritten by another thread before the reply is sent. This
change

. makes m_out local to the message handling function,
  declared on the stack of the caller
. forces callers of reply() to give it a message, or
  declare the reply message has no significant fields except
  for the return code by calling replycode()

Change-Id: Id06300083a63c72c00f34f86a5c7d96e4bbdf9f6

11 years agors232: remove unneeded lock()/unlock() functions 02/502/2
Michael W. Bombardieri [Fri, 12 Apr 2013 09:28:12 +0000 (11:28 +0200)]
rs232: remove unneeded lock()/unlock() functions

Change-Id: Ie1d2a7f460132aa59791cd7d16c9068b79675f1b

11 years agoremove utimes() workarounds
Thomas Cort [Wed, 10 Apr 2013 10:41:57 +0000 (10:41 +0000)]
remove utimes() workarounds

With the addition of utimes(), we can remove the workarounds
and use the original NetBSD code for timestamping files.

Also restore use of -p & -r for install while building

11 years agoAdd tests for utime*s() functions
Antoine Leca [Wed, 6 Feb 2013 18:29:28 +0000 (18:29 +0000)]
Add tests for utime*s() functions

11 years agoutimens(2) system call
Antoine Leca [Sat, 24 Dec 2011 14:02:54 +0000 (15:02 +0100)]
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.

11 years agocleanup:misc documentation fix.
Kees Jongenburger [Wed, 10 Apr 2013 15:05:44 +0000 (17:05 +0200)]
cleanup:misc documentation fix.

11 years agoarm_sdimage:hide non fatal errors.
Kees Jongenburger [Wed, 10 Apr 2013 14:58:46 +0000 (16:58 +0200)]
arm_sdimage:hide non fatal errors.

Redirect the output of the command that are supposed to fail to
/dev/null.

11 years agoarm:cleanup add assert.
Kees Jongenburger [Wed, 10 Apr 2013 14:53:18 +0000 (16:53 +0200)]
arm:cleanup add assert.

11 years agoarm:cleanup omap serial, remove unused defines.
Kees Jongenburger [Wed, 10 Apr 2013 14:43:10 +0000 (16:43 +0200)]
arm:cleanup omap serial, remove unused defines.

11 years agoarm:rs232 fix.
Kees Jongenburger [Wed, 10 Apr 2013 13:00:42 +0000 (15:00 +0200)]
arm:rs232 fix.

The kernel API for requesting interrupts and the associated callback
have a somewhat strange behaviour. Requesting an interrupts is done
by calling sys_irqsetpolicy using an interrupt and a given id. This
id can be modified by the sys_irqsetpolicy and must be used for
subsequent calls to sys_irqenable/sys_irqdisable. However upon an
incoming call from the kernel NOTIFY_ARG contains the original value
encoded in a set e.g. if  1 << id == true the interrupt was raised.

11 years agommc:Change startup message in rc script.
Kees Jongenburger [Mon, 8 Apr 2013 13:08:15 +0000 (15:08 +0200)]
mmc:Change startup message in rc script.

11 years agoarm:increase the amount of interrup vectors
Kees Jongenburger [Fri, 5 Apr 2013 09:33:39 +0000 (11:33 +0200)]
arm:increase the amount of interrup vectors

Increase the amount of interrup vectors in preparation for the AM335X.

11 years agoarm:cleanup remove special case memory handling.
Kees Jongenburger [Fri, 5 Apr 2013 08:50:40 +0000 (10:50 +0200)]
arm:cleanup remove special case memory handling.

We used to load the memory driver above the other modules to allow
the memory driver (ramdisk) to grow. We no longer want or need this
this as we have a working mmc driver.

11 years agoReducing external/bsd/file differences 81/481/3
Lionel Sambuc [Wed, 10 Apr 2013 09:08:42 +0000 (11:08 +0200)]
Reducing external/bsd/file differences

Change-Id: I0d025059ba0b200ac1162ea5a764fd756600ecd0

11 years agoAlso apply sub-second UTIME to libpuffs
Antoine Leca [Sun, 7 Apr 2013 08:44:49 +0000 (10:44 +0200)]
Also apply sub-second UTIME to libpuffs

11 years agoSubsecond timestamps support for FS
Antoine Leca [Wed, 21 Dec 2011 22:29:29 +0000 (23:29 +0100)]
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

11 years agoLibpuffs: use struct timespec instead of time_t
Antoine Leca [Sun, 7 Apr 2013 08:42:26 +0000 (10:42 +0200)]
Libpuffs: use struct timespec instead of time_t

11 years agosys/stat.h: better align with NetBSD-current
Antoine Leca [Fri, 5 Apr 2013 22:10:35 +0000 (00:10 +0200)]
sys/stat.h: better align with NetBSD-current

11 years agomake minix lwip make explicit use of 'int' 91/491/1
Michael W. Bombardieri [Thu, 11 Apr 2013 20:37:30 +0000 (22:37 +0200)]
make minix lwip make explicit use of 'int'

makes lwip use "unsigned int" instead of "unsigned" since this is
more obvious (i.e. type is not implied).

Change-Id: I852eb80484516e1235241d55be3e15174fa24109

11 years agoDowngrading to netbsd zlib version 80/480/2
Lionel Sambuc [Sat, 6 Apr 2013 16:45:48 +0000 (18:45 +0200)]
Downgrading to netbsd zlib version

Change-Id: I83cf73d8357ea34ab5e49fe15bd4c45ce54cac01

11 years agoRemoving include/minix/limits.h 79/479/2
Lionel Sambuc [Mon, 8 Apr 2013 14:54:49 +0000 (16:54 +0200)]
Removing include/minix/limits.h

This files defines two constants which are only used through
sys/syslimits. So they where moved there instead of including the file
and it was removed.

Change-Id: Iba3d220144dddf5d6411a6c66e2f223a1aafb50f

11 years agoAdding missing dependency on libraries for hdboot 73/473/2
Lionel Sambuc [Fri, 5 Apr 2013 12:22:46 +0000 (14:22 +0200)]
Adding missing dependency on libraries for hdboot

 * Also cleanup a bit the makefile.
 * Also removing small inconsistency for arm builds where log would be
   skipped if doing a make hdboot, but not when cross-compiling.

Change-Id: Ic9e20655234a667ea8a967d05589d4df46c2d521

11 years agotests/run: add test69 to setuids.
Thomas Cort [Sat, 6 Apr 2013 22:46:56 +0000 (22:46 +0000)]
tests/run: add test69 to setuids.

test69 requires superuser powers to adjust the time. This caused
the test to fail when run as a normal user. The patch adds test69
to the setuid list which will allow regular users to execute it.

Patch contributed by Antoine Leca.

11 years agoImporting usr.sbin/rdate 76/476/2
Thomas Cort [Sat, 6 Apr 2013 12:47:10 +0000 (12:47 +0000)]
Importing usr.sbin/rdate

Import the NetBSD rdate command and remove the Minix rdate command.
The default behaviour for both is the same. The NetBSD version adds
options to just display the time, adjust the time using adjtime(),
and set the time without printing the time.

Porting Notes:
 - Compiles cleanly out of the box without any warnings
 - Path changes from /usr/bin/rdate to /usr/sbin/rdate
 - checked pkgsrc for any usages of rdate (none found)
 - checked src for any usages of rdate (none found)

Testing:
 - all command line options work (tested with time.nist.gov server)
 - Native and cross build OK

Change-Id: I613449763891a896527f337999c006a970c3924c

11 years agoetcfiles: Improve the "install" message 77/477/1
Antoine Leca [Sat, 6 Apr 2013 22:22:07 +0000 (22:22 +0000)]
etcfiles: Improve the "install" message

11 years agoImporting usr.bin/ftp 75/475/1
Thomas Cort [Fri, 5 Apr 2013 19:02:06 +0000 (19:02 +0000)]
Importing usr.bin/ftp

11 years agotop: a few fixes 74/474/1
Ben Gras [Fri, 5 Apr 2013 15:24:47 +0000 (15:24 +0000)]
top: a few fixes

. fixed overflow in ticks compare function, causing
  occasionally esp. the kernel to be mis-ordered by cpu
  time
. fixed some const string related warnings
. fixed some variable name shadowing warnings

Change-Id: I02c177b1579bce164372f9b03f6b472537cc9e3e

11 years agoRemove obsolete warning in sys/sys/sysctl header 72/472/2
Lionel Sambuc [Fri, 5 Apr 2013 09:50:32 +0000 (11:50 +0200)]
Remove obsolete warning in sys/sys/sysctl header

Change-Id: Idb9b10922d00d4b3886c8247f352cc4ec5fe17b4

11 years agoinet: silence message about exceptions
Thomas Cort [Tue, 2 Apr 2013 02:06:54 +0000 (02:06 +0000)]
inet: silence message about exceptions

. inet: silence message about exceptions not being implemented
  for select(UDP)

This message generates a lot of noise with openntpd. Hide it unless DEBUG is
turned on.

Change-Id: I1527a9ca2583601d6087456062b4f675c80dd711

11 years agolibc: add adjtime() system call. 70/470/1
Thomas Cort [Sun, 31 Mar 2013 01:24:24 +0000 (01:24 +0000)]
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.

11 years agolibc: add clock_settime() system call. 69/469/1
Thomas Cort [Sat, 30 Mar 2013 16:59:21 +0000 (16:59 +0000)]
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.

11 years agotest69: add clock_getres() and clock_gettime() tests. 68/468/1
Thomas Cort [Sat, 30 Mar 2013 01:45:02 +0000 (01:45 +0000)]
test69: add clock_getres() and clock_gettime() tests.

11 years agolibc: add clock_getres()/clock_gettime() system calls. 67/467/1
Thomas Cort [Fri, 29 Mar 2013 21:48:22 +0000 (21:48 +0000)]
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.

11 years agokernel: rename realtime to monotonic, add realtime 66/466/1
Thomas Cort [Fri, 29 Mar 2013 19:34:29 +0000 (19:34 +0000)]
kernel: rename realtime to monotonic, add realtime

Old realtime was used for both timers (where an accurate count of
all ticks is needed) and the system time. In order to implement
adjtime(2), these duties must be separated as changing the time
of day by a small amount shouldn't affect timers in any way nor
should it change the boot time.

Following the naming of the clocks used by clock_gettime(2). The
clock named 'realtime' will represent the best guess at the
current wall clock time, and the clock named 'monotonic' will
represent the absolute time the system has been running.
Use monotonic for timers in kernel and in drivers. Use realtime
for determining time of day, dates, etc.

This commit simply renames realtime to monotonic and adds a new
tick counter named realtime. There are no functional changes in
this commit. It just lays the foundation for future work.

11 years agosome etc fixes 54/454/5
Ben Gras [Tue, 2 Apr 2013 22:42:17 +0000 (22:42 +0000)]
some etc fixes

. split user-editable and system-owned files in etc/Makefile
. mtab is a symlink, not a file now; remove it
. force-install of certain system-controlled /etc files from
  top Makefile
. rename /etc/make.conf to /etc/mk.conf; and don't set $ARCH;
  reduce difference in bsd.own.mk

Change-Id: I9f4bbb8d37ba80cba7dcfcf1a9a89e934910f579

11 years agomkfs.mfs fixup 65/465/1
Lionel Sambuc [Tue, 26 Feb 2013 15:18:28 +0000 (15:18 +0000)]
mkfs.mfs fixup

 For the special case of crossbuilding minix on minix.

11 years agoetc: force system.conf install 48/448/2
Ben Gras [Fri, 29 Mar 2013 22:07:19 +0000 (22:07 +0000)]
etc: force system.conf install

Change-Id: I5f88b108248fb3cee457de8a2f2baa2f30b0a335

11 years agolwip (inet's alternative) is compiled by default
Tomas Hruby [Wed, 6 Feb 2013 10:43:02 +0000 (10:43 +0000)]
lwip (inet's alternative) is compiled by default

11 years agocore is not cleaned in libraries
Tomas Hruby [Wed, 6 Feb 2013 16:11:03 +0000 (16:11 +0000)]
core is not cleaned in libraries

- according to Lionel, no such files are generated

- it conflicts with the core subdirectory in liblwip

11 years agoLWIP - avoid an assert when a driver restarts
Tomas Hruby [Thu, 7 Feb 2013 09:50:58 +0000 (09:50 +0000)]
LWIP - avoid an assert when a driver restarts

11 years agoLWIP - avoid crash when an unknown driver come up
Tomas Hruby [Thu, 7 Feb 2013 09:49:52 +0000 (09:49 +0000)]
LWIP - avoid crash when an unknown driver come up

11 years agoLWIP - fixed TCP panic when shutting down
Tomas Hruby [Sun, 14 Oct 2012 20:18:12 +0000 (20:18 +0000)]
LWIP - fixed TCP panic when shutting down

- listening sockets do not handle some callbacks

11 years agoLIBLWIP - ARP fix
Tomas Hruby [Sat, 13 Oct 2012 21:05:25 +0000 (21:05 +0000)]
LIBLWIP - ARP fix

- does not crash KVM anymore

11 years agoLWIP - fixed makefiles
Ambarisha B [Thu, 21 Mar 2013 20:14:51 +0000 (21:14 +0100)]
LWIP - fixed makefiles

- Modified libnetsock/Makefile and servers/lwip/Makefile to
  include ipvX headers

Signed-off-by: Tomas Hruby <tom@minix3.org>
11 years agoLIBLWIP - updated to LwIP trunk
Ambarisha B [Wed, 4 Jul 2012 23:32:06 +0000 (05:02 +0530)]
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>
11 years agoLIBLWIP - fixed clang warnings
Tomas Hruby [Thu, 11 Oct 2012 10:23:44 +0000 (10:23 +0000)]
LIBLWIP - fixed clang warnings

11 years agoImporting usr.bin/from 41/441/1
Thomas Cort [Fri, 22 Mar 2013 20:05:41 +0000 (20:05 +0000)]
Importing usr.bin/from

11 years agoImporting usr.bin/whatis 40/440/1
Thomas Cort [Fri, 22 Mar 2013 19:03:20 +0000 (19:03 +0000)]
Importing usr.bin/whatis

- LSC: fixed missing entry in minix/mi

Change-Id: I5766dd72819e3b15ef24ab49c5ee3a5aa42049c4

11 years agoImporting usr.bin/head 38/438/1
Thomas Cort [Mon, 18 Mar 2013 22:56:28 +0000 (22:56 +0000)]
Importing usr.bin/head

11 years agoinclude/paths.h: correct _PATH_MAILDIR
Thomas Cort [Fri, 22 Mar 2013 20:07:37 +0000 (20:07 +0000)]
include/paths.h: correct _PATH_MAILDIR

11 years agoImporting NetBSD banner
David Höppner [Mon, 24 Dec 2012 19:00:31 +0000 (19:00 +0000)]
Importing NetBSD banner

11 years agoVFS: wikify README
Thomas Veerman [Thu, 21 Mar 2013 15:20:34 +0000 (15:20 +0000)]
VFS: wikify README

Change-Id: I746f7c8ddabd1e047b8d536df14586c5b1594d55

11 years agovfs: coredump fix: write zeroes for missing memory
Ben Gras [Sat, 16 Mar 2013 04:13:02 +0000 (04:13 +0000)]
vfs: coredump fix: write zeroes for missing memory

11 years agoMove MINIX reboot definitions into minix/reboot.h 12/412/2
David van Moolenbroek [Wed, 20 Mar 2013 15:29:03 +0000 (15:29 +0000)]
Move MINIX reboot definitions into minix/reboot.h

Also fix a buffer overflow in commands/reboot/sh_wall.c.

Change-Id: I3a61057c4f0221d1700e14d44520b4ad17f1dbe1

11 years agoRename "struct partition" to "struct part_geom"
David van Moolenbroek [Fri, 8 Mar 2013 13:52:24 +0000 (13:52 +0000)]
Rename "struct partition" to "struct part_geom"

Change-Id: Ifaf9795ba70f5b933599b2a6ec9415e6bd13200c

11 years agorelease.sh: pkg_install should be installed 1st
Thomas Cort [Sun, 17 Mar 2013 23:54:20 +0000 (19:54 -0400)]
release.sh: pkg_install should be installed 1st

pkgin now depends on pkg_install. If pkg_install appears after pkgin
in PREINSTALLED_PACKAGES, there will be an error because pkg_install
was installed as a dependency for pkgin.

11 years agopackages.install: remove obsolete minix-all pkg.
Thomas Cort [Sun, 17 Mar 2013 23:59:35 +0000 (19:59 -0400)]
packages.install: remove obsolete minix-all pkg.

The minix-all package was placed by the pkgin_all command.

11 years agoImporting usr.bin/cal 11/411/1
Thomas Cort [Fri, 15 Mar 2013 23:52:39 +0000 (23:52 +0000)]
Importing usr.bin/cal

11 years agoImporting usr.bin/yes 10/410/1
Thomas Cort [Fri, 15 Mar 2013 23:29:53 +0000 (23:29 +0000)]
Importing usr.bin/yes

Change-Id: Ia76d7ce9c6b2bf7523d2ecbc6470e3e1e7ab5ee5

11 years agoImporting usr.bin/who 09/409/1
Thomas Cort [Fri, 15 Mar 2013 23:43:44 +0000 (23:43 +0000)]
Importing usr.bin/who

11 years agoVM: ARM/I386 PDE/PTE macro unification 85/385/2
Ben Gras [Wed, 6 Mar 2013 12:17:07 +0000 (12:17 +0000)]
VM: ARM/I386 PDE/PTE macro unification

. further reduces special cases in pagetable.c

Change-Id: Ifd7dd9ee10ca618a47bb4a372467205fbe6da90e

11 years agoImporting bin/ksh
Thomas Cort [Wed, 13 Mar 2013 03:41:18 +0000 (03:41 +0000)]
Importing bin/ksh

11 years agoChange the group of ast to users instead of others 99/399/2
Lionel Sambuc [Wed, 13 Mar 2013 10:37:13 +0000 (11:37 +0100)]
Change the group of ast to users instead of others

Change-Id: I3c92554f209fa39597e55a6b407dddd447111f2f

11 years agoAdapt ARM print macro to match used types 98/398/2
Lionel Sambuc [Sun, 3 Feb 2013 21:27:36 +0000 (22:27 +0100)]
Adapt ARM print macro to match used types

Change-Id: I987c669dce30d97ff67e33a50106a07163f7d7f1

11 years agoVM: pagetable.c: harmonize x86/ARM findhole() code 84/384/3
Ben Gras [Sun, 24 Feb 2013 21:00:52 +0000 (22:00 +0100)]
VM: pagetable.c: harmonize x86/ARM findhole() code

ARM needs to be able to find N consecutive free slots; use same
code for x86.

Change-Id: Ic79677961c8adfca2aeb5385962942ae0d76867c

11 years agoVM: pagequeue data structure 83/383/3
Ben Gras [Sat, 29 Dec 2012 00:16:33 +0000 (00:16 +0000)]
VM: pagequeue data structure

. data structure that automatically keeps a set
  of pages in reserve, to replace sparepages and
  possibly re-used in the future for similar situations,
  e.g. if in-filesystem-cache block eviction is
  implemented and FS asks for a new block

Change-Id: I149d46c14b9c8e75df16cb94e08907f008c339a6

11 years agoInstall default users directly 96/396/3
Lionel Sambuc [Fri, 8 Mar 2013 18:18:09 +0000 (19:18 +0100)]
Install default users directly

Install /home/ast and /home/bin as part of the system build procedure,
as the setup script is not ran on the arm image.

/home/bin is needed for successful completion of our test suite.

This patch does not change the setup script, as it is not bothered by
those files/directiories being already there, and may be useful during
reinstallation on intel systems.

Change-Id: I358c881df09223c343442673aa0822937f9ea33c

11 years agoInstalling posix tests in /usr/tests/minix-posix 95/395/3
Lionel Sambuc [Fri, 8 Mar 2013 16:02:27 +0000 (17:02 +0100)]
Installing posix tests in /usr/tests/minix-posix

The goal is to enable anyone to simply run our current test suite.

Change-Id: I27d8856cb82a4be2baa5dc5273526383b7f4fc2c

11 years agoImporting usr.bin/getopt
Thomas Cort [Sat, 9 Mar 2013 19:22:06 +0000 (19:22 +0000)]
Importing usr.bin/getopt

11 years agotest56: unlink proper test file
Thomas Veerman [Fri, 8 Mar 2013 15:45:53 +0000 (15:45 +0000)]
test56: unlink proper test file

Change-Id: I215f0d00b8e077930c4e93d192553eaf0d2a353f

11 years agoUDS: terminate canonical path string 92/392/2
Thomas Veerman [Fri, 8 Mar 2013 14:17:13 +0000 (14:17 +0000)]
UDS: terminate canonical path string

When you provided a string with junk after the terminating nul to a
UNIX domain socket and used bind(2), the canonical path function would
not properly terminate the new string. This caused VFS to return
ENAMETOOLONG on an otherwise valid path name.

Test case is added to test56.

Change-Id: I883b6be23d9e4ea13c3cee28cbb3726343df037f

11 years agopax: Replace bsdtar.1 by a symlink to tar.1 89/389/3
Lionel Sambuc [Wed, 6 Mar 2013 17:52:14 +0000 (18:52 +0100)]
pax: Replace bsdtar.1 by a symlink to tar.1

Change-Id: I4b80080e9420e89525c73f03ed68717fb59c1e40