]> Zhao Yanbai Git Server - minix.git/log
minix.git
9 years agoAdd games/banner 84/2984/1
Jacob Adams [Sun, 5 Apr 2015 02:05:03 +0000 (22:05 -0400)]
Add games/banner

Change-Id: Ib4a002422d668d8aa5cf0e7171ea430ef630eeff

9 years agoImport games/rain 83/2983/1
Jacob Adams [Sun, 5 Apr 2015 02:53:00 +0000 (22:53 -0400)]
Import games/rain

Change-Id: Ifc9a9d69795e3281f62c3c3438622ce74994b8b0

9 years agodevmand: properly prevent overflow 82/2982/1
Jacob Adams [Sat, 4 Apr 2015 22:14:44 +0000 (18:14 -0400)]
devmand: properly prevent overflow

closes #22

Change-Id: Ia10f352a7ff5b05b1095dbb65d36316f9165a6f0

9 years agolibc: Fix incomplete fprintf 81/2981/1
Jacob Adams [Mon, 30 Mar 2015 19:53:59 +0000 (15:53 -0400)]
libc: Fix incomplete fprintf

Closes #23

Change-Id: Ibe6362de0d2d1d94442401b92bc126e63bf9f9b0

9 years agomined: increase the size of the tgetent() buffer. 80/2980/1
Thomas Cort [Wed, 25 Mar 2015 19:46:00 +0000 (15:46 -0400)]
mined: increase the size of the tgetent() buffer.

From the termcap section of the GNU termutils manual:

"There is no way you can tell how much space is needed, so the convention
is to allocate a buffer 2048 characters long and assume that is enough.
(Formerly the convention was to allocate 1024 characters and assume that
was enough. But one day, for one kind of terminal, that was not
enough.)"

Change-Id: Ia5937366ae89e886dbaef7d180bee40669d0c488

9 years agomined: move to minix/usr.bin/mined 79/2979/1
Thomas Cort [Wed, 25 Mar 2015 18:51:18 +0000 (14:51 -0400)]
mined: move to minix/usr.bin/mined

As suggested in issue #43.

Historic Locations:

Prior to this commit

  minix/commands/mined

Prior to commit 433d6423c39e34ec4b79c950597bb2d236f886be

  commands

Change-Id: I374ab3ff0e3b9e47779fc21e80b47fda87698242

9 years agomined: remove !__STDC__ code blocks. 78/2978/1
Thomas Cort [Wed, 25 Mar 2015 18:48:08 +0000 (14:48 -0400)]
mined: remove !__STDC__ code blocks.

__STDC__ is used to mitigate the differences between K&R C and the
ANSI C standard. Nearly every compiler now supports ANSI C, so
there is no need to support non-standard compilers.

Change-Id: Ifc3381ecf1c43dfde9004bee48552d8b3ac4dcdc

9 years agomined.h: use '\a' instead of ascii code for bell. 77/2977/1
Thomas Cort [Wed, 25 Mar 2015 18:34:14 +0000 (14:34 -0400)]
mined.h: use '\a' instead of ascii code for bell.

Makes the code slightly more portable and readable.

Change-Id: I45bbecb6dc1c320c9412eeeaf598116c2ce1aac5

9 years agomined: built without UNIX defined. 76/2976/1
Thomas Cort [Wed, 25 Mar 2015 18:32:43 +0000 (14:32 -0400)]
mined: built without UNIX defined.

* Remove undef NULL, EOF, getchar, putchar
* Rename putchar, getchar, _putchar, _getchar to putch, getch, _putch,
  _getch to avoid conflict with libc functions.
* Rename UP() to UP1() (for UP 1 line) to avoid conflict with UP
  definition in termcap.h. Rename DN1 LF1 RT1 for consistency.
* Add termcap.h for prototypes for tputs and friends.
* Add libterminfo references to Makefile
* Add return value to _putch() to make it work as tputs expects.
* Make putch() call _putch()
* Remove UNIX ifdefs and all code in the !UNIX branches.

closes #43

Change-Id: I0a6f7298aa8b12a74225badc88d3c236a02669ea

9 years agoman: clean-out man1x category. 75/2975/1
Thomas Cort [Tue, 24 Mar 2015 20:24:39 +0000 (16:24 -0400)]
man: clean-out man1x category.

Removes the following man pages:

* awk.1x -- for a version of awk we no longer have
* kermit.1x -- seems gone altogether
* macros.1x -- not useful for anyone anymore

Moves the following man pages:

* mined.1x -- Moved to minix/commands/mined/mined.1
and reformatted to use the mdoc macros instead of the
Minix macros so that it displays properly.

Removes /usr/man/man1x from the directory tree.

closes #44

Change-Id: I59b8bd54cf5cba6d188e51e99a92b36e90c275c1

9 years agomined: clean-up trailing whitespace. 74/2974/3
Thomas Cort [Sun, 22 Mar 2015 20:29:04 +0000 (16:29 -0400)]
mined: clean-up trailing whitespace.

Change-Id: Ic27293d7e1d0f830d635b78e7e620dcf0ef3e03f

9 years agomined1.c: remove i386 guard around escape sequences. 73/2973/3
Thomas Cort [Sun, 22 Mar 2015 20:14:51 +0000 (16:14 -0400)]
mined1.c: remove i386 guard around escape sequences.

The escape sequences for the function keys used to be separated
out in older versions of Minix when they were different for m68k
and intel. Support for m68k was dropped and that code was
removed, leaving the ifdef i386. Since the sequences are the
same for i386 and arm, there is no need to keep the ifdef i386.

Change-Id: Id96a80bcb24da120efa63acc9b248d87fc347eac

9 years agomined.h: remove irrlevant comment. 72/2972/3
Thomas Cort [Sun, 22 Mar 2015 20:10:17 +0000 (16:10 -0400)]
mined.h: remove irrlevant comment.

It used to refer to several NIL_* definitions. Those were removed
in commit 6e25ad8b0a5606fc9351824adf9034d2ef7f7293 leaving the
comment with nothing to comment on.

Change-Id: I52221ae5d2c5216e82391b480cf2038ad723b8f0

9 years agomined.h: remove unused definition, MEMORY_SIZE. 71/2971/3
Thomas Cort [Sun, 22 Mar 2015 20:09:25 +0000 (16:09 -0400)]
mined.h: remove unused definition, MEMORY_SIZE.

Change-Id: I1ae83c427cafb15f1382b7d8ab3871a36b0eec28

9 years agomined.h: remove minix/config.h include. 70/2970/3
Thomas Cort [Sun, 22 Mar 2015 20:07:45 +0000 (16:07 -0400)]
mined.h: remove minix/config.h include.

Nothing defined there is used by mined.

Change-Id: I38b692be1313aaed316eebd7caf8e879178d90dc

9 years agocommands/fix: create manpage for fix(8) 69/2969/2
Jacob Adams [Sun, 22 Mar 2015 02:41:10 +0000 (22:41 -0400)]
commands/fix: create manpage for fix(8)

Change-Id: I868f1338994d6cc2cba6789b9b4e8934610d0142

9 years agoFix boot if no pckd device is there 68/2968/1
rlfnb [Wed, 18 Mar 2015 14:36:10 +0000 (15:36 +0100)]
Fix boot if no pckd device is there

Trying to boot Minix3 master on an appliance/sbc like ALIX fails, as
the service command throws an error. Making the rc script more robust
solves it.

Change-Id: I659043cbbaa2d67b70d6d6e5ab14fff8e1bba769

9 years agoswifi: Fix incorrect memset 67/2967/1
Jacob Adams [Wed, 18 Mar 2015 13:04:01 +0000 (09:04 -0400)]
swifi: Fix incorrect memset

Change-Id: I6764aff558f51cdb90b91a3e71c982e8b3f47058

9 years agoUpdate whatis/apropos database configuration 66/2966/1
Jacob Adams [Sun, 15 Mar 2015 02:58:34 +0000 (22:58 -0400)]
Update whatis/apropos database configuration

Change-Id: I2483cc0e9748ba68bd1acf0ceb39fde4afc2059b

9 years agoMake rotate manpage more detailed 65/2965/1
Jacob Adams [Sat, 14 Mar 2015 16:06:21 +0000 (12:06 -0400)]
Make rotate manpage more detailed

Change-Id: I028550c17b87655a6e39a7f8b3233cbe982883eb

9 years agorelease.sh: Support preinstalled package selection 64/2964/1
Lionel Sambuc [Thu, 19 Mar 2015 11:39:00 +0000 (12:39 +0100)]
release.sh: Support preinstalled package selection

This allows to both override the default package repository and
preinstalled packages list from the command line or the environment.

Also use everywhere PACKAGEURL.

Change-Id: I3434ff53be769f8d0f890bb5fb44521a0017e123

9 years agononamed.8: Document the -L option. 63/2963/1
Christian Koch [Sun, 1 Mar 2015 00:59:16 +0000 (00:59 +0000)]
nonamed.8: Document the -L option.

Change-Id: I1aadb50cd416e0467a87c8d75db1c293333a7969

9 years agoDo not read past the end of the buffer 62/2962/1
Jacob Adams [Wed, 18 Mar 2015 00:40:49 +0000 (20:40 -0400)]
Do not read past the end of the buffer

closes #22

Change-Id: I239c670915d98440c176ccf23e5270c40c4fbe81

9 years agoproperly check if configuration file is opened 61/2961/1
Jacob Adams [Wed, 18 Mar 2015 00:36:47 +0000 (20:36 -0400)]
properly check if configuration file is opened

closes #21

Change-Id: I2f83b5385ac38bf07d30acb14f40c14bec476830

9 years agoGet rid of K&R functions in recwave 60/2960/1
Jacob Adams [Wed, 18 Mar 2015 00:34:09 +0000 (20:34 -0400)]
Get rid of K&R functions in recwave

Change-Id: I98cf0426aedf03ec0312f58ff77b816fd231eb84

9 years agoCheck argc is greater than 1 before using on argv 59/2959/1
Jacob Adams [Wed, 18 Mar 2015 00:30:29 +0000 (20:30 -0400)]
Check argc is greater than 1 before using on argv

closes #19

Change-Id: I50ee3fa82bce274e710434628b6c178467fd3887

9 years agoarm: Make sure __k_unpaged_MINIX is first 58/2958/1
Emmanuel Blot [Mon, 19 Jan 2015 13:39:44 +0000 (14:39 +0100)]
arm: Make sure __k_unpaged_MINIX is first

Do not rely on build order to set startup symbol (`__k_unpaged_MINIX`)
at kernel binary start

Change-Id: I1ed3f9309fe66ff97e24915938c114d5a159deaf

9 years agoFix incorrect sanity check 57/2957/1
Emmanuel Blot [Mon, 19 Jan 2015 13:31:46 +0000 (14:31 +0100)]
Fix incorrect sanity check

Remove invalid sanity check where an array is tested against NULL -
not a pointer

Change-Id: I3d5e33585e7f97a41124af4133e8a879ab21d972

9 years agoFix unused variable warnings 56/2956/1
Emmanuel Blot [Mon, 19 Jan 2015 13:29:44 +0000 (14:29 +0100)]
Fix unused variable warnings

Do not define variables that are not used in Minix builds

Change-Id: I11d12e5e1de9fc359b71a7e7534fc8f09fac837d

9 years agoFix format string for size_t types 55/2955/1
Emmanuel Blot [Mon, 19 Jan 2015 13:23:52 +0000 (14:23 +0100)]
Fix format string for size_t types

Fix missing “%z[dux]” prefix printf formatter string for `size_t`
types.

Change-Id: If216a778b0b65e8ab2cdd1c7484cb8452d1f965d

9 years agoChange rotate.sh BZIP2 to the correct path 54/2954/1
Jacob Adams [Sat, 14 Mar 2015 15:20:01 +0000 (11:20 -0400)]
Change rotate.sh BZIP2 to the correct path

closes #8

Change-Id: I90cb30e3d8ee2c000aca36fb9f8cc22c6d49583e

9 years agoImport NetBSD games/rogue 52/2952/2
Robin Karlsson [Sat, 14 Mar 2015 03:29:23 +0000 (04:29 +0100)]
Import NetBSD games/rogue

Change-Id: Id4aef4950f250edef2d507910877aabc6b9580ea

9 years agocommands/autopart: Fix dead code block 51/2951/1
Jacob Adams [Mon, 2 Feb 2015 04:04:30 +0000 (23:04 -0500)]
commands/autopart: Fix dead code block

Fix dead code block, make surrounding code more readable, and remove
unused mode variable.

closes #20

Change-Id: I802e3d8680d7a7adc7acd580bfcec9dc28af0bc4

9 years agoUse or instead of and to determine if urb is valid 50/2950/1
Jacob Adams [Mon, 2 Feb 2015 03:56:49 +0000 (22:56 -0500)]
Use or instead of and to determine if urb is valid

close #24

Change-Id: I12e2b20d69aa7b186a8e5cd0dc16f653a18b2ee2

9 years agoMaybe a broken bios/device setting 49/2949/1
rlfnb [Mon, 9 Mar 2015 13:38:27 +0000 (14:38 +0100)]
Maybe a broken bios/device setting

Removing the panic leads to exactly one message on ALIX. Both commits
make minix out of the box booting on ALIX devices.

Change-Id: I9210fef79a8736e36b9c42c7925c9f3354c60e7c

9 years agoALIX: No pci device at bus 0, dev 0, func 0 48/2948/1
rlfnb [Tue, 3 Mar 2015 20:23:40 +0000 (21:23 +0100)]
ALIX: No pci device at bus 0, dev 0, func 0

Seems like its a kind of convention introduced by Intel but not
mandatory from a PCI specification point of view, that the PCI host
controller resides on bus 0, device 0 function 0. At least tinybios
(the bios used by ALIX and WRAP) based appliances are not able to boot
with this change.

Change-Id: I0e45c68c482972be7276028525985de920cf64f7

9 years agoFix arm build for GCC, noassert, -Os 41/2941/2
Lionel Sambuc [Thu, 5 Mar 2015 13:39:41 +0000 (14:39 +0100)]
Fix arm build for GCC, noassert, -Os

Change-Id: I706fdfc8fc9a5e0c9076e3657ac1a6ef0745bd14

9 years agolibsffs, libvtreefs: fix getdents bug 40/2940/1
David van Moolenbroek [Sun, 1 Feb 2015 15:29:13 +0000 (15:29 +0000)]
libsffs, libvtreefs: fix getdents bug

Bad logic introduced as part of the fsdriver changes could cause
getdents to terminate early in these libraries.

Issue reported by r0ller.

Change-Id: If450d5ea85e830584878d8a4ec0f00519355a353

9 years agoAdd 3c90x: 3Com 3C90xB/C network driver 39/2939/1
David van Moolenbroek [Mon, 29 Dec 2014 14:39:27 +0000 (14:39 +0000)]
Add 3c90x: 3Com 3C90xB/C network driver

Change-Id: Iba0bbcb3b1b69a7c204abdc81cf3afe59b6bfaae

9 years agolibsa: add string precision support to vprintf 38/2938/1
David van Moolenbroek [Tue, 23 Dec 2014 14:58:03 +0000 (14:58 +0000)]
libsa: add string precision support to vprintf

We already had a hack to ignore the precision, but the ACPI driver
requires an actual implementation--it prints garbage at the end of
some strings otherwise.  This patch adds support for precision for
strings only, limiting printing to the given number of characters.
For all other specifiers, precision is still unsupported.

Change-Id: I1d41fc70a0d0494db695c22ba609262a50b86e08

9 years agoACPI: OS-dependent code tweaks 37/2937/1
David van Moolenbroek [Tue, 23 Dec 2014 09:45:52 +0000 (09:45 +0000)]
ACPI: OS-dependent code tweaks

Change-Id: I533685f6716cb48ccf3d5ca5ef0fb681a5293549

9 years agobootloader: pass memory map to kernel 36/2936/1
David van Moolenbroek [Mon, 22 Dec 2014 23:15:02 +0000 (23:15 +0000)]
bootloader: pass memory map to kernel

Previously, the bootloader would only provide a single memory range.
At least on VirtualBox, this memory range includes the ACPI tables,
which the kernel then happily overwrites when executing VM.  Much of
the infrastructure to use a fullblown memory map is already in place;
this patch adds the last (and strangely missing) bit of generating
the memory map in a multiboot-compatible way.

It should be noted that both the bootloader and the kernel actually
violate the multiboot specification by not packing the structure for
the memory ranges.  This is a NetBSD bug, but it is also a nonissue
for (our) practical purposes.  It can be fixed without changing the
code added in this patch.

Change-Id: I7c0a307a8a8133239531e1d2b80f376849f90247

9 years agoACPI: upgrade to acpica-unix2-20141107 35/2935/1
David van Moolenbroek [Mon, 22 Dec 2014 18:19:46 +0000 (18:19 +0000)]
ACPI: upgrade to acpica-unix2-20141107

Change-Id: I96151a2756fd9814bfba180548e8a96dca63ce51

9 years agoVM: fix for handling one-shot page memory 34/2934/1
David van Moolenbroek [Mon, 22 Dec 2014 17:20:40 +0000 (17:20 +0000)]
VM: fix for handling one-shot page memory

The original one-shot page patch (git-e321f65) did not account for the
possibility of pagefaults happening while copying memory in the
kernel.  This allowed a simple cp(1) from vbfs to hang the system,
since VM was repeatedly requesting the same page from the file system.

With this fix, VM no longer tries to fetch the same memory-mapped page
from VFS more than once per memory handling request from the kernel.
In addition to fixing the original issue, this change should make
handling memory somewhat more robust and ever-so-slightly faster.

Test74 has been extended with a simple test for this case.

Change-Id: I6e565f3750141e51b52ec98c938f8e1aa40070d0

9 years agoAllow u-boot repository URL to be overridden 33/2933/1
Lionel Sambuc [Thu, 5 Feb 2015 14:00:17 +0000 (14:00 +0000)]
Allow u-boot repository URL to be overridden

This allows the URL used to clone our specific version of u-boot to be
specified in the environment, instead of being hard-coded.

This new flexibility will be required by the new Continuous Integration
infrastructure, whose test nodes are in a network without direct
internet access.

Change-Id: I7440b5bba6786f979623b4509111e4e99c6558f6

9 years agorecognize Intel 82540EP LP by e1000 31/2931/1
Thomas Goering [Fri, 12 Dec 2014 20:28:06 +0000 (21:28 +0100)]
recognize Intel 82540EP LP by e1000

Change-Id: I8868963ba09ce1dffa9416c9ece29c7315dee4cd

9 years agoARM: can build with llvm, switch to EABI 30/2930/7
Ben Gras [Thu, 11 Dec 2014 14:00:57 +0000 (15:00 +0100)]
ARM: can build with llvm, switch to EABI

. bitcode fixes
. switch to compiler-rt instead of netbsd libc functions
  or libgcc for support functions for both x86 and arm
. minor build fixes
. allow  build with llvm without crossbuilding llvm itself
. can now build minix/arm using llvm and eabi - without C++
  support for now (hence crossbuilding llvm itself is turned off
  for minix/arm)

Change-Id: If5c44ef766f5b4fc4394d4586ecc289927a0d6eb

9 years agoRestart policies: Add testing and ProcFS DB 28/2928/3
Lionel Sambuc [Mon, 8 Dec 2014 10:32:14 +0000 (10:32 +0000)]
Restart policies: Add testing and ProcFS DB

 - Expose in procfs the service status and supported recovery policies.
 - This adds a test (testrelpol.sh) to exercise the restart policies of
   the system services and drivers.

NOTE:
  The policy support information is temporarily hardcoded in ProcFS, but
  this has to be replaced by properly retrieving this information from
  RS, which should in turn be setup on a per service basis, at
  initialization time.

Change-Id: I0cb1516a450355b38d0c46b1a8b3d9e841a2c029

9 years agoARM: remove minix type exception 27/2927/1
Ben Gras [Wed, 10 Dec 2014 15:45:33 +0000 (16:45 +0100)]
ARM: remove minix type exception

. clean fix for minix/arm llvm build problem
. was needed for gcc but isn't any more it seems

Change-Id: Iea1edffbe3149c5c954ae009a388b7ea492f3d1a

9 years agovirtio_net: use new libnetdriver 26/2926/1
David van Moolenbroek [Tue, 2 Dec 2014 14:08:24 +0000 (14:08 +0000)]
virtio_net: use new libnetdriver

Change-Id: Id06bdb67da12477984b42bbd46623bd8f25c0ab9

9 years agortl8169: use new libnetdriver 25/2925/1
David van Moolenbroek [Tue, 2 Dec 2014 14:06:15 +0000 (14:06 +0000)]
rtl8169: use new libnetdriver

Change-Id: Ia26b6c440a1525f1d2bb9e7592e357dac0ba602c

9 years agortl8139: use new libnetdriver 24/2924/1
David van Moolenbroek [Tue, 2 Dec 2014 14:07:16 +0000 (14:07 +0000)]
rtl8139: use new libnetdriver

Change-Id: Iba941653b7c052375694bcec2561957c1979feb0

9 years agoorinoco: use new libnetdriver 23/2923/1
David van Moolenbroek [Tue, 2 Dec 2014 14:05:26 +0000 (14:05 +0000)]
orinoco: use new libnetdriver

Change-Id: I003590539dd76f4be8e067f986bb1f17b151490d

9 years agolance: use new libnetdriver 22/2922/1
David van Moolenbroek [Tue, 2 Dec 2014 14:05:09 +0000 (14:05 +0000)]
lance: use new libnetdriver

Change-Id: If3414088e66407c688c4960f99a165b0ee1ebc83

9 years agolan8710a: use new libnetdriver 21/2921/1
David van Moolenbroek [Tue, 2 Dec 2014 14:04:33 +0000 (14:04 +0000)]
lan8710a: use new libnetdriver

Change-Id: Iaee4d75a5dfafc72d94f0b02681f9aea1c9da535

9 years agofxp: use new libnetdriver 20/2920/1
David van Moolenbroek [Tue, 2 Dec 2014 14:04:01 +0000 (14:04 +0000)]
fxp: use new libnetdriver

Change-Id: I03268655a5daff3d109ae52e64673911ef096a3f

9 years agoe1000: use new libnetdriver 19/2919/1
David van Moolenbroek [Tue, 2 Dec 2014 14:03:14 +0000 (14:03 +0000)]
e1000: use new libnetdriver

Change-Id: I111750d2ca27f01039d0b427b1314aea861e2074

9 years agodpeth: use new libnetdriver 18/2918/1
David van Moolenbroek [Tue, 2 Dec 2014 14:02:46 +0000 (14:02 +0000)]
dpeth: use new libnetdriver

Change-Id: Ic389e54817c5b241dad851c89ef1cf16c015a79b

9 years agodp8390: use new libnetdriver 17/2917/1
David van Moolenbroek [Tue, 2 Dec 2014 14:02:02 +0000 (14:02 +0000)]
dp8390: use new libnetdriver

Change-Id: Ieaf6d605832d475f95fd9b06026b349dce7ee025

9 years agodec21140A: use new libnetdriver 16/2916/1
David van Moolenbroek [Tue, 2 Dec 2014 14:01:20 +0000 (14:01 +0000)]
dec21140A: use new libnetdriver

Change-Id: I54be3b770e4d1fd320200c30e9e9073a7c1b405b

9 years agoatl2: use new libnetdriver 15/2915/1
David van Moolenbroek [Tue, 2 Dec 2014 14:00:04 +0000 (14:00 +0000)]
atl2: use new libnetdriver

Change-Id: I65de5d29a75d5f3101b2c5ab16a4b0d79bd77cc3

9 years agolibnetdriver: turn into network driver framework 14/2914/1
David van Moolenbroek [Tue, 2 Dec 2014 13:16:14 +0000 (13:16 +0000)]
libnetdriver: turn into network driver framework

The new implementation of this library provides abstractions for
network drivers, and should be used for all network drivers from now
on.  It provides the following functionality:

  - a function call table abstraction, hiding the details of the
    datalink protocol with simple parameters;
  - a state machine for sending and receiving packets, freeing the
    actual driver from keeping track of pending requests;
  - an abstraction for copying data from and to the network driver,
    freeing the actual driver from dealing with I/O vectors while at
    the same time providing a copy implementation which is more
    efficient than most current driver implementations;
  - a generalized implementation of zero-copy port-based I/O;
  - a clearer set of policies and defaults.

While the concept is very similar to lib{block,char,fs,input}driver,
one main difference is that libnetdriver now also takes care of SEF
initialization, mainly so that aspects such as recovery policies and
live-update aspects can be changed for all network drivers in a
single place.  As always, for the case that the provided message loop
is too restrictive, a set of more low-level message processing
functions is provided.

The netdriver API has been designed so as to allow alleviation of one
current protocol bottleneck: the fact that at most one send request
and one receive request may be pending at any time.  Changing this
aspect will however require a significant rewrite of libnetdriver,
and possibly debugging of drivers that are not able to cope with (in
particular) queuing multiple packets for transmission at once.

Beyond that, the design of the new API is based on the current
protocol, and may be changed/extended later to allow for non-ethernet
network drivers, exposure of link status, multicast address
configuration, suspend and resume, and any other features that are in
fact long overdue.

Change-Id: I47ec47e05852c42f92af04549d41524f928efec2

9 years agoe1000: convert to KNF 13/2913/1
David van Moolenbroek [Mon, 1 Dec 2014 17:00:04 +0000 (17:00 +0000)]
e1000: convert to KNF

Change-Id: Ibd156c2e0a58fed70895080d4b230b26c500fa11

9 years agoatl2: convert to KNF 12/2912/1
David van Moolenbroek [Thu, 27 Nov 2014 12:59:57 +0000 (12:59 +0000)]
atl2: convert to KNF

Change-Id: Ie4b979aab3127a91a12b8086326da0eb1f9a860b

9 years agolibvirtio: expose result size on packet dequeue 11/2911/1
David van Moolenbroek [Mon, 1 Dec 2014 17:30:45 +0000 (17:30 +0000)]
libvirtio: expose result size on packet dequeue

Change-Id: I49304678895779849abc2528a9f78730f968e712

9 years agoorinoco: restore register memory mapping 10/2910/1
David van Moolenbroek [Mon, 1 Dec 2014 17:21:17 +0000 (17:21 +0000)]
orinoco: restore register memory mapping

Untested.

Change-Id: I439f0e711e16ba478dadf57ffc8ad74ec19ea1b9

9 years agofxp: enable bus mastering if needed 09/2909/1
David van Moolenbroek [Mon, 1 Dec 2014 17:11:44 +0000 (17:11 +0000)]
fxp: enable bus mastering if needed

This is required for at least QEMU.  However, as of writing, QEMU also
requires fixes in its epro100 emulator before this driver can use it.

Change-Id: Ie5c5ffe4311b1a0e581bc687f1c15de3a85f4a30

9 years agoe1000: fix unaligned register access 08/2908/1
David van Moolenbroek [Mon, 1 Dec 2014 17:04:49 +0000 (17:04 +0000)]
e1000: fix unaligned register access

This resolves a guru meditation in recent VirtualBox versions.

Change-Id: I5034d8af1fe885adda3c027cb23563bffaccf97e

9 years agodp8390: update, allow default port and IRQ 07/2907/1
David van Moolenbroek [Mon, 1 Dec 2014 17:50:59 +0000 (17:50 +0000)]
dp8390: update, allow default port and IRQ

Bochs has switched from port base 0x240 to 0x300 for its default
NE2000 ISA configuration, and QEMU is using the same settings.

Change-Id: Ide6cdb14321eb4324d0bf6d6314c5970b3493e95

9 years agoetc/usr/rc: fix argument passing for net drivers 06/2906/1
David van Moolenbroek [Mon, 1 Dec 2014 17:35:21 +0000 (17:35 +0000)]
etc/usr/rc: fix argument passing for net drivers

The expected argument name would include the instance number, which
is not only redundant in many cases (FOOETHn_n=arg.., "n" being the
instance number) and conflicted with what netconf(8) does, but some
drivers need to be able to see the arguments for all instances of its
driver type--for example, dp8390 needs to know how many earlier
instances have been configured to use PCI.

Change-Id: I4830b823352722f554a032979464aba8b08fc166

9 years agoUDS: move from drivers/net/ to net/ 05/2905/1
David van Moolenbroek [Mon, 1 Dec 2014 17:58:20 +0000 (17:58 +0000)]
UDS: move from drivers/net/ to net/

Change-Id: I53992b205e767a77c7b3c868a38c7f3d772a4ed3

9 years agominix/ changes for arm llvm build 03/2903/3
Ben Gras [Tue, 2 Dec 2014 20:31:08 +0000 (21:31 +0100)]
minix/ changes for arm llvm build

. fixes needed to build Minix/ARM with LLVM without errors,
  mostly size_t cleanness

Change-Id: If4dd0a23bc5cb399296073920a8940c34b4caef4

9 years agoFix for TOOL_CPP 02/2902/2
Ben Gras [Tue, 25 Nov 2014 17:15:45 +0000 (17:15 +0000)]
Fix for TOOL_CPP

. needed for xorg build from /usr/xsrc

Change-Id: I632c9d09d4cfecfbf454820551f6d618ac4f4ebe

9 years agoImport a few manpages 97/2897/2
Lionel Sambuc [Wed, 19 Nov 2014 09:54:14 +0000 (10:54 +0100)]
Import a few manpages

The following manpages where contributed by
Jacob Adams <tookmund@gmail.com>:
 - atnormalize.8
 - autopart.8
 - decomp16.1
 - devsize.8
 - rawspeed.8
 - rotate.8
 - update_bootcfg.8
 - updateboot.8

Change-Id: Ide3abf0962083b83e37426e2d47f3a9391d6315e

9 years agofor pkgsrc without base clang from sambuc@ 01/2901/1
Ben Gras [Mon, 24 Nov 2014 12:54:36 +0000 (12:54 +0000)]
for pkgsrc without base clang from sambuc@

Change-Id: Id0bf33da426f6c7a14628846dd1185cdcdfac766

9 years agoremove unused PSW restore code 00/2900/1
Ben Gras [Mon, 24 Nov 2014 11:00:27 +0000 (11:00 +0000)]
remove unused PSW restore code

. now done in-kernel so IOPL gets restored

Change-Id: I9905d2844a4715004054a788613ff7efd02a227d

9 years agorestore PSW like 9393439a20 for AMD syscall 99/2899/1
Ben Gras [Thu, 20 Nov 2014 16:42:32 +0000 (16:42 +0000)]
restore PSW like 9393439a20 for AMD syscall

Change-Id: Ide0a8727af8d0d81361382dbd2460c7a6c5743fc

9 years agoinet: detect short TCP option lengths 96/2896/1
David van Moolenbroek [Tue, 18 Nov 2014 12:45:46 +0000 (12:45 +0000)]
inet: detect short TCP option lengths

Previously, a TCP option length of zero would cause inet to end up
in an infinite loop.

This resolves #7, reported by Alejandro Hernandez.

Change-Id: I45ad4c789d10d8e202cf6e140a7b9db7a6543c75

9 years agoFix for missing /usr/games in root's PATH 95/2895/1
Lionel Sambuc [Mon, 17 Nov 2014 21:35:00 +0000 (22:35 +0100)]
Fix for missing /usr/games in root's PATH

After importing the default environment from NetBSD, we discovered that
it doesn't contain /usr/games, which is required for the commands
strfile. This utility is used while generating fortune database.

This patch simply sets TOOL_STRFILE to contain an absolute path.

Change-Id: I2e366a0b67d5258f387c3f5a2a2a581fedead359

9 years agodhcpd: don't crash so easily 94/2894/1
David van Moolenbroek [Mon, 17 Nov 2014 20:13:46 +0000 (20:13 +0000)]
dhcpd: don't crash so easily

The jump-to-start hack is not resetting global variables, resulting in
a crash after several such restarts cause an overflow in the network
table.  This patch fixes that particular issue, but more similar
issues (in particular memory leaks) are bound to come up.  As such this
is a stopgap measure until we can get rid of the old dhcpd altogether.

This resolves the additional issue reported in #2.

Change-Id: Ic4cd80eae520cf2b97e893bac63b3ab1ecfea6d8

9 years agortl8139: enable bus mastering if needed 93/2893/1
David van Moolenbroek [Mon, 17 Nov 2014 19:19:36 +0000 (19:19 +0000)]
rtl8139: enable bus mastering if needed

This resolves #2.

Change-Id: Ie6736f0d5a713025f09c18de7042ba44fbb1b2f8

9 years agolibfsdriver: support mmap on FSes with no device 92/2892/1
David van Moolenbroek [Sat, 15 Nov 2014 10:14:00 +0000 (10:14 +0000)]
libfsdriver: support mmap on FSes with no device

This patch adds (very limited) support for memory-mapping pages on
file systems that are mounted on the special "none" device and that
do not implement PEEK support by themselves.  This includes hgfs,
vbfs, and procfs.

The solution is implemented in libvtreefs, and consists of allocating
pages, filling them with content by calling the file system's READ
functionality, passing the pages to VM, and freeing them again.  A new
VM flag is used to indicate that these pages should be mapped in only
once, and thus not cached beyond their single use.  This prevents
stale data from getting mapped in without the involvement of the file
system, which would be problematic on file systems where file contents
may become outdated at any time.  No VM caching means no sharing and
poor performance, but mmap no longer fails on these file systems.

Compared to a libc-based approach, this patch retains the on-demand
nature of mmap.  Especially tail(1) is known to map in a large file
area only to use a small portion of it.

All file systems now need to be given permission for the SETCACHEPAGE
and CLEARCACHE calls to VM.

A very basic regression test is added to test74.

Change-Id: I17afc4cb97315b515cad1542521b98f293b6b559

9 years agolibfsdriver: prefill st_dev for stat requests 91/2891/1
David van Moolenbroek [Fri, 14 Nov 2014 15:52:22 +0000 (15:52 +0000)]
libfsdriver: prefill st_dev for stat requests

This obviates the need for several file system implementations to
remember the device on which they are mounted.

Change-Id: Ida8325cf4bcf072e61761cfee34e3f7ed2d750b9

9 years agoprocfs: add /proc/service directory 88/2888/2
David van Moolenbroek [Mon, 10 Nov 2014 14:54:06 +0000 (14:54 +0000)]
procfs: add /proc/service directory

This directory is filled dynamically with regular files, one for each
service that RS knows about, named after its label.  Its contents are
still subject to (heavy) change, but currently expose the service's
endpoint and number of restarts so far.

Change-Id: Ie58c824bcb6382c8da7a714e59fee87329970b4b

9 years agoprocfs: convert to KNF 87/2887/2
David van Moolenbroek [Sun, 9 Nov 2014 15:17:44 +0000 (15:17 +0000)]
procfs: convert to KNF

Change-Id: Ib4252f199af0f9597745dcd2c11a7f761738671f

9 years agolibvtreefs: API changes/extensions, part 2 86/2886/2
David van Moolenbroek [Sun, 9 Nov 2014 14:14:37 +0000 (14:14 +0000)]
libvtreefs: API changes/extensions, part 2

- rename start_vtreefs to run_vtreefs, since the function returns upon
  termination these days;
- add get_inode_slots function to retrieve the number of indexed slots;
- add support for extra per-inode data for arbitrary storage.

Change-Id: If2d365d7b478a1cecc9e20fb2b3e70c1a1cf7243

9 years agolibvtreefs: API changes/extensions, part 1 85/2885/2
David van Moolenbroek [Thu, 6 Nov 2014 15:04:45 +0000 (15:04 +0000)]
libvtreefs: API changes/extensions, part 1

- move primary I/O buffer into vtreefs; change read hook API;
- add hooks for write, truncate, symlink, mknod, unlink, chmod/chown;
- modernize message_hook;
- change procfs, devman, gpio accordingly;

Change-Id: I9f0669e41195efa3253032e95d93f0a78e9d68d6

9 years agolibvtreefs: convert to KNF 84/2884/2
David van Moolenbroek [Thu, 6 Nov 2014 13:36:45 +0000 (13:36 +0000)]
libvtreefs: convert to KNF

Change-Id: I81bdf05c9b630a0cbb0ac573d36d4f59f8137199

9 years agoFix bad cast from `u16_t` to `ssize_t` 89/2889/1
Emmanuel Blot [Fri, 7 Nov 2014 17:24:13 +0000 (18:24 +0100)]
Fix bad cast from `u16_t` to `ssize_t`

9 years agoprocfs: compile in x86 support only for x86 target 83/2883/2
David van Moolenbroek [Wed, 5 Nov 2014 14:07:38 +0000 (14:07 +0000)]
procfs: compile in x86 support only for x86 target

Issue reported by Emmanuel Blot.

Change-Id: I7f5b1b65273e6ac841d5451e0be7b0e1c92d537c

9 years agotest76: increase alarm times 90/2890/1
David van Moolenbroek [Wed, 12 Nov 2014 12:11:32 +0000 (12:11 +0000)]
test76: increase alarm times

The test would sometimes fail because an alarm triggered before the
system call to be interrupted by the alarm could be started.

Change-Id: Ia507720a1f2d259afde1f97b7edd03f22cbd4810

9 years agotrace(1): document how to add an IOCTL handler 82/2882/2
David van Moolenbroek [Tue, 11 Nov 2014 23:11:21 +0000 (23:11 +0000)]
trace(1): document how to add an IOCTL handler

Also fix two small IOCTL-related bugs:
- do not print an argument pointer for argument-less IOCTLs;
- print IOCTL contents with -V given once, just like structures.

Change-Id: Iec7373003d71937fd34ee4b9db6c6cec0c916411

10 years agoext2: perform super I/O with contiguous memory 78/2878/2
David van Moolenbroek [Sun, 9 Nov 2014 12:59:39 +0000 (12:59 +0000)]
ext2: perform super I/O with contiguous memory

Issue reported by Antoine Leca.

Change-Id: Ie6f3ab6c1943b0b7ea9d5a68d4c24b92bab17233

10 years agoVM,MFS: better handling of some exceptional cases 80/2880/1
Ben Gras [Thu, 6 Nov 2014 13:39:32 +0000 (14:39 +0100)]
VM,MFS: better handling of some exceptional cases

Fix for problems reported by Alejandro Hernández:
. VM unmap: handle case where there is no nextvr

Fixes for problems found by running Melkor ELF fuzzing tool:
. VM: better handle case where region prealloc fails by
  freeing memory that was allocated so far
. MFS fs_readwrite: EOF check should happen for read and
  peek requests, not just read

This fixes #4.

Change-Id: I2adf4eebdfb4c48a297beff0478eed5c917a53a4

10 years agoImport NetBSD shell environment files 79/2879/1
Lionel Sambuc [Mon, 10 Nov 2014 15:09:08 +0000 (16:09 +0100)]
Import NetBSD shell environment files

With the import of Xorg, a proper separation between login-time and sub
shell-time of the environment setup is necessary.

Instead of re-developping this from scratch, I am taking the opportunity
to import the NetBSD default environment.

Change-Id: Ib6a8fbd9c2f407ccd59be57a52ef9df21c2c9ce7

10 years agoAdding /usr/X11R7/lib to LD_LIBRARY_PATH 76/2876/2
Lionel Sambuc [Tue, 7 Oct 2014 21:00:33 +0000 (23:00 +0200)]
Adding /usr/X11R7/lib to LD_LIBRARY_PATH

Change-Id: I94b91e9e89115f90142e284fca21df4c3c8e2060

10 years agoAdding /usr/X11R7 to PATH 75/2875/2
Lionel Sambuc [Tue, 6 May 2014 09:14:14 +0000 (11:14 +0200)]
Adding /usr/X11R7 to PATH

Change-Id: Ifac54e59715f48bdfa4ab0a77d656d11f7289a2e

10 years agoImporting external/mit/xorg support rules 74/2874/2
Lionel Sambuc [Wed, 21 Aug 2013 09:15:11 +0000 (11:15 +0200)]
Importing external/mit/xorg support rules

Change-Id: Ib11d8659485a444797bf3a2118182a1d4e316b50

10 years agoexternal/mit/expat: Import 73/2873/2
Lionel Sambuc [Sat, 14 Dec 2013 03:48:37 +0000 (04:48 +0100)]
external/mit/expat: Import

Change-Id: Ieb49357166b392956df6554a06fcae83c8fd519d

10 years agoEnhancing /proc/pci 72/2872/2
Lionel Sambuc [Fri, 17 Oct 2014 16:33:00 +0000 (18:33 +0200)]
Enhancing /proc/pci

 - Adding missing fields for PCI device lookup
 - Adding the domain (for now set to zero) as part of the slot name

Change-Id: Iebaf3b21f6ab5024738cbc1dea66d5ad3ada175d