Commit graph

6600 commits

Author SHA1 Message Date
Jacob Adams
3a1943c1c1 devmand: properly prevent overflow
closes #22

Change-Id: Ia10f352a7ff5b05b1095dbb65d36316f9165a6f0
2015-04-15 08:28:59 +02:00
Jacob Adams
1cd28eb8e4 libc: Fix incomplete fprintf
Closes #23

Change-Id: Ibe6362de0d2d1d94442401b92bc126e63bf9f9b0
2015-03-31 15:45:48 +02:00
Thomas Cort
79444d163d 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
2015-03-28 08:39:19 +01:00
Thomas Cort
93cdb3a735 mined: move to minix/usr.bin/mined
As suggested in issue #43.

Historic Locations:

Prior to this commit

  minix/commands/mined

Prior to commit 433d6423c3

  commands

Change-Id: I374ab3ff0e3b9e47779fc21e80b47fda87698242
2015-03-28 08:39:10 +01:00
Thomas Cort
e6df9032b3 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
2015-03-28 08:38:56 +01:00
Thomas Cort
f3734d6b31 mined.h: use '\a' instead of ascii code for bell.
Makes the code slightly more portable and readable.

Change-Id: I45bbecb6dc1c320c9412eeeaf598116c2ce1aac5
2015-03-28 08:38:48 +01:00
Thomas Cort
e978660932 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
2015-03-28 08:38:33 +01:00
Thomas Cort
fc850d580c 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
2015-03-25 06:53:44 +01:00
Thomas Cort
d1a87c1f64 mined: clean-up trailing whitespace.
Change-Id: Ic27293d7e1d0f830d635b78e7e620dcf0ef3e03f
2015-03-24 14:03:03 +01:00
Thomas Cort
d131b58784 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
2015-03-24 14:03:03 +01:00
Thomas Cort
6a0aa6fb5e mined.h: remove irrlevant comment.
It used to refer to several NIL_* definitions. Those were removed
in commit 6e25ad8b0a leaving the
comment with nothing to comment on.

Change-Id: I52221ae5d2c5216e82391b480cf2038ad723b8f0
2015-03-24 14:03:02 +01:00
Thomas Cort
0cf05b213d mined.h: remove unused definition, MEMORY_SIZE.
Change-Id: I1ae83c427cafb15f1382b7d8ab3871a36b0eec28
2015-03-24 14:03:02 +01:00
Thomas Cort
50d246bbba mined.h: remove minix/config.h include.
Nothing defined there is used by mined.

Change-Id: I38b692be1313aaed316eebd7caf8e879178d90dc
2015-03-24 14:02:41 +01:00
Jacob Adams
d82c151c9e commands/fix: create manpage for fix(8)
Change-Id: I868f1338994d6cc2cba6789b9b4e8934610d0142
2015-03-24 08:21:14 +01:00
rlfnb
31ba042920 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
2015-03-23 14:57:06 +01:00
Jacob Adams
80c94e3974 swifi: Fix incorrect memset
Change-Id: I6764aff558f51cdb90b91a3e71c982e8b3f47058
2015-03-23 14:56:59 +01:00
Jacob Adams
056ece2898 Update whatis/apropos database configuration
Change-Id: I2483cc0e9748ba68bd1acf0ceb39fde4afc2059b
2015-03-23 11:11:49 +01:00
Jacob Adams
f113a7238f Make rotate manpage more detailed
Change-Id: I028550c17b87655a6e39a7f8b3233cbe982883eb
2015-03-23 11:06:37 +01:00
Lionel Sambuc
426224bbc6 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
2015-03-20 11:17:24 +01:00
Christian Koch
6f55e9f11d nonamed.8: Document the -L option.
Change-Id: I1aadb50cd416e0467a87c8d75db1c293333a7969
2015-03-19 10:00:56 +01:00
Jacob Adams
271999a2f3 Do not read past the end of the buffer
closes #22

Change-Id: I239c670915d98440c176ccf23e5270c40c4fbe81
2015-03-18 08:29:46 +01:00
Jacob Adams
e3cf9c04f1 properly check if configuration file is opened
closes #21

Change-Id: I2f83b5385ac38bf07d30acb14f40c14bec476830
2015-03-18 08:25:19 +01:00
Jacob Adams
3bdcd28869 Get rid of K&R functions in recwave
Change-Id: I98cf0426aedf03ec0312f58ff77b816fd231eb84
2015-03-18 08:21:31 +01:00
Jacob Adams
25223c2ae2 Check argc is greater than 1 before using on argv
closes #19

Change-Id: I50ee3fa82bce274e710434628b6c178467fd3887
2015-03-18 08:20:08 +01:00
Emmanuel Blot
41b870c890 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
2015-03-18 07:50:31 +01:00
Emmanuel Blot
54841c0102 Fix incorrect sanity check
Remove invalid sanity check where an array is tested against NULL -
not a pointer

Change-Id: I3d5e33585e7f97a41124af4133e8a879ab21d972
2015-03-18 07:49:44 +01:00
Emmanuel Blot
4f89addcc1 Fix unused variable warnings
Do not define variables that are not used in Minix builds

Change-Id: I11d12e5e1de9fc359b71a7e7534fc8f09fac837d
2015-03-18 07:49:03 +01:00
Emmanuel Blot
d91890d288 Fix format string for size_t types
Fix missing “%z[dux]” prefix printf formatter string for `size_t`
types.

Change-Id: If216a778b0b65e8ab2cdd1c7484cb8452d1f965d
2015-03-18 07:48:09 +01:00
Jacob Adams
61890c3b2e Change rotate.sh BZIP2 to the correct path
closes #8

Change-Id: I90cb30e3d8ee2c000aca36fb9f8cc22c6d49583e
2015-03-14 16:43:04 +01:00
Robin Karlsson
e3b78ef14f Import NetBSD games/rogue
Change-Id: Id4aef4950f250edef2d507910877aabc6b9580ea
2015-03-14 14:59:16 +01:00
Jacob Adams
1b6a97c9c0 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
2015-03-13 18:53:05 +01:00
Jacob Adams
dc0077241b Use or instead of and to determine if urb is valid
close #24

Change-Id: I12e2b20d69aa7b186a8e5cd0dc16f653a18b2ee2
2015-03-11 17:56:09 +01:00
rlfnb
7171c2321f 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
2015-03-11 13:46:45 +01:00
rlfnb
b56a9d4725 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
2015-03-11 13:46:41 +01:00
Lionel Sambuc
3d0f2c86c4 Fix arm build for GCC, noassert, -Os
Change-Id: I706fdfc8fc9a5e0c9076e3657ac1a6ef0745bd14
2015-03-05 15:42:21 +01:00
David van Moolenbroek
f912036bae 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
2015-02-10 13:47:29 +00:00
David van Moolenbroek
75e18fe498 Add 3c90x: 3Com 3C90xB/C network driver
Change-Id: Iba0bbcb3b1b69a7c204abdc81cf3afe59b6bfaae
2015-02-10 13:47:28 +00:00
David van Moolenbroek
3814aed560 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
2015-02-10 13:47:28 +00:00
David van Moolenbroek
2a3bc70264 ACPI: OS-dependent code tweaks
Change-Id: I533685f6716cb48ccf3d5ca5ef0fb681a5293549
2015-02-10 13:47:28 +00:00
David van Moolenbroek
3b0299dd65 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
2015-02-10 13:47:28 +00:00
David van Moolenbroek
29492bb71c ACPI: upgrade to acpica-unix2-20141107
Change-Id: I96151a2756fd9814bfba180548e8a96dca63ce51
2015-02-10 13:47:27 +00:00
David van Moolenbroek
f202792edf 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
2015-02-10 13:47:27 +00:00
Lionel Sambuc
6c30d22a56 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
2015-02-05 14:04:31 +01:00
Thomas Goering
e1131d9c96 recognize Intel 82540EP LP by e1000
Change-Id: I8868963ba09ce1dffa9416c9ece29c7315dee4cd
2014-12-12 21:28:06 +01:00
Ben Gras
5ae1a533c7 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
2014-12-12 13:04:56 +01:00
Lionel Sambuc
41ba8c04cc 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
2014-12-10 23:11:25 +01:00
Ben Gras
ad8bffad67 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
2014-12-10 16:46:29 +01:00
David van Moolenbroek
5260f07c2c virtio_net: use new libnetdriver
Change-Id: Id06bdb67da12477984b42bbd46623bd8f25c0ab9
2014-12-04 12:10:52 +00:00
David van Moolenbroek
d76bd1f07c rtl8169: use new libnetdriver
Change-Id: Ia26b6c440a1525f1d2bb9e7592e357dac0ba602c
2014-12-04 12:10:52 +00:00
David van Moolenbroek
4081bff625 rtl8139: use new libnetdriver
Change-Id: Iba941653b7c052375694bcec2561957c1979feb0
2014-12-04 12:10:51 +00:00