Commit graph

5419 commits

Author SHA1 Message Date
Ben Gras 0245723d5f run script: correction, clarity
Change-Id: Ibf583c6277c67646dd90d7c49482daf4e76b78b6
2013-04-19 10:24:50 +00:00
Ben Gras 2a44efb1c0 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
2013-04-18 14:28:03 +00:00
Ben Gras 5977114c42 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
2013-04-17 22:00:59 +00:00
Ben Gras cef94e096e 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
2013-04-12 23:40:38 +00:00
Michael W. Bombardieri cb51426c6a rs232: remove unneeded lock()/unlock() functions
Change-Id: Ie1d2a7f460132aa59791cd7d16c9068b79675f1b
2013-04-12 21:37:26 +02:00
Thomas Cort a0a1440a52 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
2013-04-12 18:55:40 +00:00
Antoine Leca 3ae6c600a9 Add tests for utime*s() functions 2013-04-12 18:55:40 +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
Kees Jongenburger 88414c568c cleanup:misc documentation fix. 2013-04-12 20:52:58 +02:00
Kees Jongenburger 99c5247453 arm_sdimage:hide non fatal errors.
Redirect the output of the command that are supposed to fail to
/dev/null.
2013-04-12 20:52:58 +02:00
Kees Jongenburger 9d9456ef7d arm:cleanup add assert. 2013-04-12 20:52:57 +02:00
Kees Jongenburger 1e9492a8b8 arm:cleanup omap serial, remove unused defines. 2013-04-12 20:52:57 +02:00
Kees Jongenburger 037aeb5a13 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.
2013-04-12 20:52:57 +02:00
Kees Jongenburger aa3db0e0e2 mmc:Change startup message in rc script. 2013-04-12 20:52:57 +02:00
Kees Jongenburger 7015c66bfa arm:increase the amount of interrup vectors
Increase the amount of interrup vectors in preparation for the AM335X.
2013-04-12 20:52:57 +02:00
Kees Jongenburger 390f852bd1 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.
2013-04-12 20:52:57 +02: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
Antoine Leca 9315ea8299 sys/stat.h: better align with NetBSD-current 2013-04-12 11:11:58 +02:00
Michael W. Bombardieri a806c5feb1 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
2013-04-11 22:37:30 +02:00
Lionel Sambuc 435f2b0095 Downgrading to netbsd zlib version
Change-Id: I83cf73d8357ea34ab5e49fe15bd4c45ce54cac01
2013-04-09 16:43:13 +02:00
Lionel Sambuc dd6b239665 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
2013-04-09 16:43:02 +02:00
Lionel Sambuc 78cbcc9750 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
2013-04-09 16:41:52 +02:00
Thomas Cort b3cb63379e 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.
2013-04-08 14:22:27 +02:00
Thomas Cort 8357e3a442 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
2013-04-08 08:37:04 +02:00
Antoine Leca 0f487a702b etcfiles: Improve the "install" message 2013-04-07 00:38:00 +02:00
Thomas Cort 04203a83a6 Importing usr.bin/ftp 2013-04-05 19:02:06 +00:00
Ben Gras 2db46bcfa1 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
2013-04-05 15:27:09 +00:00
Lionel Sambuc a264c7ec4c Remove obsolete warning in sys/sys/sysctl header
Change-Id: Idb9b10922d00d4b3886c8247f352cc4ec5fe17b4
2013-04-05 13:24:18 +02:00
Thomas Cort f05ad905a8 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
2013-04-04 15:06:18 +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 18ad4c0799 test69: add clock_getres() and clock_gettime() tests. 2013-04-04 15:04:53 +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
Thomas Cort 5142b1f388 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.
2013-04-04 15:04:52 +02:00
Ben Gras d6bc6cb44b 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
2013-04-04 12:50:12 +00:00
Lionel Sambuc b622d2b795 mkfs.mfs fixup
For the special case of crossbuilding minix on minix.
2013-04-03 15:57:04 +02:00
Ben Gras aafef7f9ff etc: force system.conf install
Change-Id: I5f88b108248fb3cee457de8a2f2baa2f30b0a335
2013-03-30 15:01:15 +01:00
Tomas Hruby a1fa603ed5 lwip (inet's alternative) is compiled by default 2013-03-25 16:51:25 +01:00
Tomas Hruby ee0cc364a8 core is not cleaned in libraries
- according to Lionel, no such files are generated

- it conflicts with the core subdirectory in liblwip
2013-03-25 16:51:25 +01:00
Tomas Hruby 9582cbffc5 LWIP - avoid an assert when a driver restarts 2013-03-25 16:51:25 +01:00
Tomas Hruby 00f08c4868 LWIP - avoid crash when an unknown driver come up 2013-03-25 16:51:25 +01:00
Tomas Hruby f6b5201f64 LWIP - fixed TCP panic when shutting down
- listening sockets do not handle some callbacks
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
Thomas Cort 1d4c0ebe0f Importing usr.bin/from 2013-03-23 16:11:11 +01:00