Commit graph

105 commits

Author SHA1 Message Date
Ben Gras 515ae0a3e9 <sys/{ipc,sem,shm}.h>
Change-Id: I0cf021813cb73a01b1c9f9a1b302bde1a2b4ff7e
2014-03-03 20:47:05 +01:00
Ben Gras 09fab4dc04 <sys/ttydefaults.h>
Change-Id: I237e141e2a6409c7100db4adb14a90fbb46294b4
2014-03-03 20:47:04 +01:00
Ben Gras 6cf86998df <net/if_ether.h>
Change-Id: I7425aae72ab43e3fcec8373f7c589273d36f7fcb
2014-03-03 20:47:04 +01:00
Ben Gras 1ef83ee923 <sys/param.h>
Change-Id: I53d0ca207789f27e3a01acdd184ade24630d9a00
2014-03-03 20:47:04 +01:00
Ben Gras 9c031c9d7f <sys/ptrace.h>
Change-Id: Ib930c661c1e6de05b2e0d5fce4ffc1ae2269fc6a
2014-03-03 20:47:04 +01:00
Ben Gras f4f382d8c0 align ARM cpu.h importing & using armreg.h
Change-Id: I4793517d936f71b0bb7088fbfe67e73a65fafb11
2014-03-03 20:47:04 +01:00
Ben Gras 81473dbba0 <vmparam.h>
Change-Id: I941ea3111703ed089bfdaf87d26158ab8697a80d
2014-03-03 20:47:04 +01:00
Ben Gras 5cecdfcb3e <machine/mcontext.h>
Change-Id: I2ad64018f3f402e7ccc5c4dc037dd0a3fe56a929
2014-03-03 20:47:03 +01:00
Ben Gras 17587738d3 align <sys/ucontext.h> <sys/uio.h> <sys/un.h>
Change-Id: I70adf01fddf931a3a6931083adaa4bbe647ea6a3
2014-03-03 20:47:03 +01:00
Ben Gras 01624e6f86 <sys/socket.h>, <netinet/{in,tcp,udp,udp_var}.h>
. add sa_len to sockaddr, sin_len to sockaddr_in
	. rename SCM_CREDENTIALS to SCM_CREDS
	. retire PF_FILE (same as PF_UNIX)

Change-Id: Id3ec63fe2556fc7ceb48de8ad4e80736df3ddfc7
2014-03-03 20:47:03 +01:00
Ben Gras dda632a24f drop the minix_ prefixes for mmap and munmap
also cleanup of various minix-specific changes, cleanup of
mmap-related testing.

Change-Id: I289a4fc50cf8a13df4a6082038d860853a4bd024
2014-03-03 20:47:03 +01:00
Lionel Sambuc d1ae7749c8 sys/sys/ctype_inline.h: merged
Change-Id: I0a04b7729b2226ce601cadceebfb6878302c64d1
2014-03-03 20:47:00 +01:00
Lionel Sambuc df23a7e418 sys/arch/{arm,i386}/include: merges
The follwoing file have been merged as far as reasonably possible:

 * sys/arch/arm/include/:
   - ansi.h
   - asm.h

 * sys/arch/arm/include/:
   - ansi.h
   - asm.h
   - cdef.h

Unlike on NetBSD, the definition of size_t, ssize_t and ptrdiff_t are
the same as the ones on intel.

Change-Id: I3b52e9c03991e575450ca42567877cd4fd14976a
2014-03-03 20:47:00 +01:00
Lionel Sambuc 55d9e9954b Extending time_t to 64bits.
Change-Id: Ia96b8bfba19cb8179a0237a7d2122d415c24d73f
2014-03-03 20:45:28 +01:00
Ben Gras 364953ad40 <sys/stat.h>
current version of <sys/stat.h> from netbsd repo is older than the minix
one; will be corrected on next netbsd re-import.

Change-Id: Ifc696581ef476cfecd9695a9f6e74b844131e584
2014-03-02 12:28:33 +01:00
Ben Gras 3b4bc508ac <sys/unistd.h>, <time.h>
Change-Id: If0d0cd9115dec33d27e8e5644c0020021d8816b8
2014-03-02 12:28:32 +01:00
Ben Gras 256829c7e8 <sys/wait.h>
Change-Id: I24605df209d012e99333065428a3ed2752799321
2014-03-02 12:28:32 +01:00
Lionel Sambuc 37598dccf1 Aligning dev_t to 64bits.
Change-Id: I630f72f8530dd4aaf05c35ca23683ae12c9f8328
2014-03-02 12:28:32 +01:00
Lionel Sambuc c9072ba0bb Aligning makedev macros, dev_t still 32bits
Change-Id: Ib343d9b459ff0eeac70c4e54c23fe2e82a137100
2014-03-02 12:28:32 +01:00
Lionel Sambuc 9a2e578a5c Remove sys/stdlib.h
This file was copied over to allow for the compilation of some
of the arch/i386 code, due to a bug in lib/libc/compat/Makefile.inc.

This patch fixes the situation, and removes the now useless header, as
well as remove a patch in lib/libc/stdlib/putenv.c

Change-Id: Ic5e4c4bb967f58f6e874c091788e1dd5ecaebe5e
2014-03-02 12:28:31 +01:00
Ben Gras 8ccb12bb5a use netbsd <sys/signal.h> and sigset_t
. create signals-related struct message type to store sigset_t
	  directly
	. create notify-specific message types, so the generic NOTIFY_ARG
	  doesn't exist anymore
	. various related test expansions, improvements, fixes
	. add a few error-checks to sigismember() calls
	. rename kernel call specific signals fields to SYS_*

Change-Id: I53c18999b5eaf0cfa0cb25f5330bee9e7ad2b478
2014-03-02 12:28:31 +01:00
Ben Gras 6c3dfa5f3c switch to netbsd <sys/errno.h>
not entirely clean; _SIGN hack remains for now.  also leave in
minix-specific stuff like minix-specific errno's and OK.

Change-Id: I035efc52e27b92f58ae0d88dab19dec263edb6e3
2014-03-02 12:28:31 +01:00
Ben Gras 7120f34ec1 drop <minix/termios.h>, use clean <sys/termios.h>
. also implement some netbsd-style tty ioctls
	. also implement SIGINFO
	. also import netbsd stty
	. rename keymap minix CMIN (for ctrl+minus on numeric keypad)
	  to CNMIN; to keep unchanged control character default CMIN in
	  new <sys/ttydefaults.h>
	. convert CS[5678] logic in rs232 driver to explicit setting of LC
	  bits

Change-Id: I9b7d2963fe9aec00fb6e7535ef565b3191fc1c1d
2014-03-02 12:28:20 +01:00
Lionel Sambuc c3fc9df84a Adding ipc_ prefix to ipc primitives
* Also change _orig to _intr for clarity
 * Cleaned up {IPC,KER}VEC
 * Renamed _minix_kernel_info_struct to get_minix_kerninfo
 * Merged _senda.S into _ipc.S
 * Moved into separate files get_minix_kerninfo and _do_kernel_call
 * Adapted do_kernel_call to follow same _ convention as ipc functions
 * Drop patches in libc/net/send.c and libc/include/namespace.h

Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
2014-03-01 09:05:01 +01:00
Ben Gras 6c8f7fc3ba netbsd dirent.h, import sys/sys *.h, mfs cleanup
. add all sys/sys headers not already present to help compiling
	. take netbsd dirent.h and struct dirent; main result is
	  introducing d_type and d_namlen that have to be set by getdents()
	  in all FS code implementing it
	. d_off is gone
	. alignment of the struct has become 8 bytes instead of 4
	. remove _MAX_BLOCK_SIZE, _MIN_BLOCK_SIZE, _STATIC_BLOCK_SIZE
	. libminlib: cleanup unused yet duplicate code
	. mfs: throw out the long-broken v1, v2 support
	. new test for dirent contents filled by getdents()

Change-Id: I1459755c7ba5e5d1c9396d3a587ce6e63ddc283e
2014-03-01 09:04:59 +01:00
David van Moolenbroek 10a344c3fd UDS: align struct sockaddr_un with NetBSD
Well, make a start, anyway. Our copy was missing a legacy field from
the structure, that could very well cause applications to fail trying
to set, clear, or check it. As a consequence, SUN_LEN now yields the
same result as on NetBSD.

Change-Id: I80f6aff7769be402b3bd3959f64d314509ed138c
2014-03-01 09:04:57 +01:00
Thomas Cort f5dbfe789e uname: normalize release and version
Most systems provide the full version number in the
'release' field and the kernel version in 'version'.
Minix used to split the full version number between
release and version which caused problems for pkgsrc
and other applications. This patch brings Minix's
uname in line with other systems such as NetBSD.
It also brings the getty banner in line with NetBSD.

Old Minix uname:
	sysname->Minix
	nodename->10.0.2.15
	release->3
	version->2.1
	machine->i686

New Minix uname:
	sysname->Minix
	nodename->10.0.2.15
	release->3.2.1
	version->Minix 3.2.1 (GENERIC)
	machine->i686

Change-Id: I966633dfdcf2f9485966bb0d0d042afc45bbeb7d
2014-03-01 09:04:55 +01:00
Lionel Sambuc 9fab85c2de Replacing timer_t by netbsd's timer_t
* Renamed struct timer to struct minix_timer
 * Renamed timer_t to minix_timer_t
 * Ensured all the code uses the minix_timer_t typedef
 * Removed ifdef around _BSD_TIMER_T
 * Removed include/timers.h and merged it into include/minix/timers.h
 * Resolved prototype conflict by renaming kernel's (re)set_timer
   to (re)set_kernel_timer.

Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5
2014-03-01 09:04:54 +01:00
David van Moolenbroek 6989311826 Add VND driver, providing loopback devices
Change-Id: I40fa695e28c67477a75383e6f1550e451afcab41
2014-03-01 09:04:54 +01:00
David van Moolenbroek d266a94fea Enable devname(3)
There is no support for a device name database yet, so this call is
expected to be fairly slow.

Change-Id: I73aa5f267e2b6921b7d3bbdcc4beac463931132c
2014-03-01 09:04:53 +01:00
David van Moolenbroek 1760f1c717 Straighten ioctl.h
- include all ioctl subheaders, properly listing all letters;
- change FBD's ioctl calls to use 'B' instead of 'F', in
  preparation of the VND driver.

Change-Id: Ia718979568cc057f47cf505a89238d5b3b6695d4
2014-03-01 09:04:53 +01:00
David van Moolenbroek 665198b4c2 Rewrite character driver protocol
As a side effect, remove the clone style, as the normal device style
supports device cloning now.

Change-Id: Ie82d1ef0385514a04a8faa139129a617895780b5
2014-03-01 09:04:52 +01:00
David van Moolenbroek b443e9244d Retire EBADIOCTL in favor of ENOTTY
Change-Id: I6bd0e301d21ab7f2336e350e7e6e15d238c2c93d
2014-03-01 09:04:51 +01:00
David van Moolenbroek 4f6b382c41 Retire ptrace(T_DUMPCORE), dumpcore(1), gcore(1)
The T_DUMPCORE implementation was not only broken - it would currently
produce a coredump of the tracer process rather than the traced
process - but also deeply flawed, and fixing it would require serious
alteration of PM's internal state machine. It should be possible to
implement the same functionality in userland, and that is now the
suggested way forward. For now, also remove the (identical) utilities
using T_DUMPCORE: dumpcore(1) and gcore(1).

Change-Id: I1d51be19c739362b8a5833de949b76382a1edbcc
2014-02-18 11:25:03 +01:00
David van Moolenbroek 24ed4e38de Remove support for obsolete 3.2.1 ABI
Change-Id: I76b4960bda41f55d9c42f8c99c5beae3424ca851
2014-02-18 11:25:02 +01:00
David van Moolenbroek 430c2113c7 Enable getmntinfo(3)
Change-Id: Ida9b0660471bb9fde3cdca6c9b9fd9e94341e02f
2014-02-18 11:25:02 +01:00
David van Moolenbroek 8143b9bf1d Implement support for [f]statvfs1(2)
The [f]statvfs(3) calls now use [f]statvfs1(2).

Change-Id: I949c177fc14abf976e45165c342f897f4ec988ee
2014-02-18 11:25:02 +01:00
David van Moolenbroek 266239fe64 Implement support for getvfsstat(2)
Change-Id: I99b697919d411c57105de561105beefc7d1d309a
2014-02-18 11:25:02 +01:00
David van Moolenbroek 61ed526374 Align "struct statvfs" with NetBSD
This is a requirement for implementing calls such as getmntinfo(3).
VFS is now responsible for filling in some of the structure's fields.

Change-Id: I0c1fa78019587efefd2949b3be38cd9a7ddc2ced
2014-02-18 11:25:01 +01:00
Lionel Sambuc 65333e5108 32 to 64 bits fsblkcnt_t and fsfilcnt_t.
Change-Id: I432229143c85cd178262b802a76ac606801ac59a
2014-02-18 11:25:01 +01:00
Lionel Sambuc 58f5d8dd5e moving prototypes to lib.h
Change-Id: If53d3f5ee761b10e0f3d4346a0c5b39ba7901c65
2014-02-18 11:25:01 +01:00
Lionel Sambuc 55dcce66c6 struct uucred
Change-Id: Ia97cb6c38bb566be30d568a252ae7b76142a21dd
2014-02-18 11:25:01 +01:00
Lionel Sambuc 744378194d Alignement on netbsd types, part 1
The following types are modified (old -> new):
 * _BSD_USECONDS_T_ int       -> unsigned int
 * __socklen_t      __int32_t -> __uint32_t
 * blksize_t        uint32_t  -> int32_t
 * rlim_t           uint32_t  -> uint64_t
On ARM:
 * _BSD_CLOCK_T_    int       -> unsigned int
On Intel:
 * _BSD_CLOCK_T_    int       -> unsigned long

bin/cat is also updated in order to fix warnings.

_BSD_TIMER_T_ has still to be aligned.

Change-Id: I2b4fda024125a19901120546c4e22e443ba5e9d7
2014-02-18 11:25:01 +01:00
Lionel Sambuc 84a7c3f464 fix sysroot clang
Change-Id: I63adf8460e7fdbe3d9d5ad6c828ae5758cb1643c
2014-02-18 11:25:01 +01:00
Thomas Veerman c1a31d53d9 stat.h: remove some big_ types
Change-Id: I84017db3d54edfb823cc52e02d0b07fccb003988
2014-02-18 11:25:01 +01:00
Thomas Cort 1e69cb63f4 Importing usr.bin/nl
* Add _SC_LINE_MAX to unistd.h (value of 15 from NetBSD).
 * Add _SC_LINE_MAX case to sysconf(3) in libc.
 * usr.bin/nl itself required no Minix specific changes.

Change-Id: I10f056ccdf4f212beb1272f735f41303e5036c05
2013-10-14 18:06:05 -04:00
Ben Gras c8f3b10909 fix a few more minix specific warnings
. also disable stack protection feature for gcc,
	  causes build errors for pkgsrc gcc on minix

Change-Id: I1c6e2bcb4d948098d642543d7b2711284ee55c72
2013-08-27 16:16:03 +00:00
Ben Gras 6e5a113837 a bit more -Werror compatability
for clang, fix warnings in drivers/, lib/, servers/, sys/, common/.
by turning off fatal warnings (takes effect if the default is on),
fixing warnings or reducing the warning level.

Change-Id: Ia1b4bc877c879ba783158081b59aa6ebb021a50f
2013-08-20 11:37:40 +02:00
Thomas Cort bdf33c702a Importing sys/dev/videomode
NetBSD provides an in-kernel EDID parser, validator, and printer
along with other useful functions. This code will be re-used by
the Minix fb driver as it is a complete and well tested
implementation.

Change-Id: I46fe3005d9957cd90d4972030ddcce7bc3bd7924
2013-08-11 20:35:08 +02:00
Thomas Cort 437177b028 i2c: increase BUFLEN/CMDLEN to 128, add page flag.
128 byte reads are much more common than 32 byte reads. The message
passing + setup/teardown for a read is much more expensive, in terms
of time, than the reading itself. A slightly bigger struct is well
worth the time savings. This reduces read times for /dev/eeprom
from 57 seconds per 4KB to 14 seconds.

Additionally, make sending the page address in the eeprom driver
and utility optional. This can save a little time when reading
within the same page and allows support for smaller devices that
don't support pages (example: chips containing EDID).

Change-Id: Ie48087caee40c11fa241d1555fce9309ddd27b43
2013-07-27 08:21:37 -04:00