Commit graph

6470 commits

Author SHA1 Message Date
Ben Gras 0d9602e04b Import NetBSD legal/COPYRIGHT.
Change-Id: Ic23e5f1902ade92402faa968bb945b7d873aaf6b
2014-09-28 16:28:05 +02:00
Alexandre Beletti 6a76678e59 Import NetBSD games/fish command.
Change-Id: Ie3009121c768fa5e0c50c681b87cde344ae7cfe2
2014-09-25 02:03:28 +02:00
Sky Liu ca78167b44 Porting grep from NetBSD
Change-Id: I6fa9e3c0a4edc4d3ff292dc5c96ac16b34d7c792
2014-09-24 15:33:57 +02:00
Alexandre Beletti 831337191b Import NetBSD games/snake command.
Change-Id: Ie46c0acc09e5e8079f80301ae3a40172fcfb51dd
2014-09-24 11:58:53 +02:00
David van Moolenbroek 3a40bab785 tests: reenable testisofs
Change-Id: Ic0883f8b487390e34f1a27e324b033a8cbe2cfff
2014-09-18 13:01:13 +00:00
David van Moolenbroek ef9dc93f44 Clean up obsolete FS support routines
Change-Id: I56d0ab51f32064bb964051732de7e2465dc22b75
2014-09-18 13:01:02 +00:00
David van Moolenbroek c2f99d7c3a isofs: rename source directory to "isofs"
Change-Id: Ibe630f720b4399e7ebbbd850650036fbaa9cec7b
2014-09-18 13:00:57 +00:00
David van Moolenbroek edfcb02885 isofs: basic improvements
- fix for "out of extents" panic;
- return ENOENT when a file name does not exist;
- inode count sanity check upon unmount.

Change-Id: Icb97dbaf7c8aec463438f06b341defca357094b2
2014-09-18 13:00:52 +00:00
David van Moolenbroek e2dc2c8954 isofs: use libdriver
Change-Id: I5ced800eec92f651f31d9c77c3129fe837ca4614
2014-09-18 13:00:47 +00:00
Jean-Baptiste Boric 3e08d38e8e iso9660fs: rewrite ISO 9660 file system server
iso9660fs has been cleaned up and debugged. It now supports:
 * ISO 9660 Level 3,
 * System Use Sharing Protocol (SUSP),
 * Rock Ridge Interchange Protocol (RRIP).

The following Rock Ridge features are supported:
 * POSIX file attributes (PX),
 * POSIX device number (PN),
 * Symbolic links (SL),
 * Alternate file name (NM),
 * Timestamps in 7-byte format (TF).

Change-Id: Ib227411bdda5bc10a957b27ad05fafdc95eca35f
2014-09-18 13:00:42 +00:00
David van Moolenbroek 1858c65d72 Revert "Temporarily disable the is9600 FS server"
This reverts commit ab5c98ee5a.
2014-09-18 12:59:18 +00:00
David van Moolenbroek 8ca6466a71 writeisofs: set file struct version field to one
Dictated by the spec and correctly flagged by the new isofs code.

Change-Id: Ie155c30b6a53e40ec42066af0adbcdbf457e5620
2014-09-18 12:46:29 +00:00
David van Moolenbroek 30d9b70391 PFS: rewrite, restyle
- remove the buffer pool, inode bitmap, and inode hash table, and
  simplify the code accordingly;
- use theoretically slightly more optimal buffer management;
- put the entire source in one file, instead of having many files
  with one or two functions each;
- convert the code to KNF style.

Change-Id: Ib8f6f0bd99fbc6eb9098fba718e71b8e560783d9
2014-09-18 12:46:28 +00:00
David van Moolenbroek f859061eaf PFS: use libfsdriver
In order to avoid creating libfsdriver exceptions, two changes to VFS
are necessary:

- the returned position field for reads/writes is no longer abused to
  return the new pipe size; VFS is perfectly capable of updating the
  size itself;
- during system startup, PFS is now sent a mount request, just like all
  other file systems.

In proper "two steps forward, one step back" fashion, the latter point
has the consequence that PFS can no longer drop its privileges at
startup.  This is probably best resolved with a more general solution
for all boot image system services.  The upside is that PFS no longer
needs to be linked with libc.

Change-Id: I92e2410cdb0d93d0e6107bae10bc08efc2dbb8b3
2014-09-18 12:46:28 +00:00
David van Moolenbroek 2e89653e65 libc: make socketpair(3) use the right device
UDS expects the device number of the actual socket, not the device on
which the socket happens to reside.  The code worked only because PFS
returned the same value in the st_dev stat field, which it will have
to continue doing for a while now.

Change-Id: I426d38a86a96307ff6e6ed8099d37dae02d6bf2b
2014-09-18 12:46:28 +00:00
David van Moolenbroek 970d95ecd5 ext2: use libfsdriver
- fix panic on truncating files with holes;
- remove block-based readahead, to match MFS.

Change-Id: I385552f8019e9c013a6cb937bcc8e4e7181a4a50
2014-09-18 12:46:27 +00:00
David van Moolenbroek ccaeedb267 MFS: use libfsdriver
Change-Id: Ib658c7dea47b81a417755b0554a75288117b431a
2014-09-18 12:46:27 +00:00
David van Moolenbroek ad80a203db Move clock_time into libsys
Change-Id: Ibc5034617e6f6581de7c4a166ca075b3c357fa82
2014-09-18 12:46:26 +00:00
David van Moolenbroek 0dc5c83ec2 libvtreefs: use libfsdriver
Change-Id: I0e6446bd0ccc3b89edc237be441ebfd92585f352
2014-09-18 12:46:26 +00:00
David van Moolenbroek 81db4f2cff libpuffs: use libfsdriver
Change-Id: I26651578066e1098dc275a9cfbe5710870a13811
2014-09-18 12:46:25 +00:00
David van Moolenbroek a99c939dee libsffs: use libfsdriver
Change-Id: Id8377873455771c614371e115643cd906d05f12c
2014-09-18 12:46:25 +00:00
David van Moolenbroek ebd3c0673d libminixfs: add block I/O routines
The new functionality aims to save each file system server from having
to implement its own block I/O routines just so that it can serve as a
root file system.  The new source file (bio.c) lists the requirements
that file system servers have to fulfill in order to use the routines.

Change-Id: Ia0190fd5c30e8c2097ed8f4b0e3ccde1827e0b92
2014-09-18 12:46:25 +00:00
David van Moolenbroek c5beebb68d libminixfs: do not make fs_sync upcalls
The file system may not be expecting these upcalls at arbitrary
moments, while they serve only as a performance optimization anyway.

Change-Id: I0748fd1f6c2645ddbb64466093ee36025aac45e0
2014-09-18 12:46:24 +00:00
David van Moolenbroek 35118b0a91 test72: fix mock bdev functions
The minixfs library only ever submits vector elements (and reads) of
the system page size. The test implementation was expecting vector
elements (and reads) of the file system block size. The resulting
mismatch caused I/O to fail in various ways, even though this did not
have an effect on the actual test.

Change-Id: I02f4a3efcd4a32916435d82c7d5798e6b78f0a27
2014-09-18 12:46:24 +00:00
David van Moolenbroek f018897664 test72: fix premature block size update
Updating the current block size before flushing the cache, which still
contained blocks with the old block size, resulted in triggering an
assert on position alignment.

Change-Id: I7a83f3d3bc57bafc08aa6c8df64fbf978273bbfd
2014-09-18 12:46:23 +00:00
David van Moolenbroek 89c9de7d09 Add libfsdriver: a library to drive file systems
This library provides new abstractions for the upper (VFS) side of
file system services, and should be used for all file system service
implementations from now on.  It provides the following functionality:

  - a function call table abstraction, hiding the details of the
    VFS-FS protocol with simple parameters;
  - a (currently limited) number of per-function steps required for
    all file system implementations, such as copying in and out path
    names and result buffers;
  - a default implementation for multicomponent path lookups, such
    that the file system merely has to implement resolution of single
    components at a time;
  - an abstraction for copying data from and to the file system, which
    allows transparent intraprocess copying as required for the lookup
    implementation;
  - a set of functions to simplify getdents implementations.

The message loop provided by the library is currently for use by
single-threaded file system implementations only.  Multithreaded file
system services may use the more low-level message processing
functionality.

Protocol-level optimizations such as including names in protocol
messages may be hidden entirely in this library.  In addition, in the
future, the lookup implementation may be replaced by a single-
component lookup VFS/FS protocol request as part of a VFS name cache
implementation; this, too, can be hidden entirely in this library.

Change-Id: Ib34f0d0e021dfa3426ce8826efcf3eaa94d3ef3e
2014-09-18 12:46:23 +00:00
David van Moolenbroek e7b4aa7d99 VFS: provide correct root directory for lookups
This fixes a VFS panic and a chroot(2) security hole.

Change-Id: Ifd1923f886501cf3a73277aab89db974798c47dc
2014-09-18 12:46:23 +00:00
David van Moolenbroek 71cd1dd4b9 VFS: do not call REQ_FLUSH on the root file system
Change-Id: I15d29a6f3d198e604ea7f7a9db600d6d18b6994b
2014-09-18 12:46:22 +00:00
Ben Gras 588a35b929 Set the motd to point to a wiki page.
Change-Id: I12bc9d07c4d3d0bcb17a27521a0f06ad5abb5fda
2014-09-13 23:56:50 +02:00
Ben Gras 5457987d13 set reasonable packages list
. clang, binutils and git and dependencies on CD
	. don't bzip .iso

Change-Id: If43324b46289de5fd1ca7b64785f8ae6e97fd6b7
2014-09-13 22:23:43 +02:00
Ben Gras 43eceae54c restore pkgin_cd
. make release.sh put packages on the cd
	. make setup script produce a better rc.package file

Change-Id: Ia4b7588975c2ddf630fa1c510715d82755f67f1e
2014-09-13 17:05:52 +02:00
Ben Gras a875715bb4 restore single user mode
. the minix init started rc with the 'bootargs' variable.
	  this can now be cleanly passed to rc by executing sysenv
	  from the ramdisk rc script.

Change-Id: I68d0d2ab0be326b2ae30438a62dd7649b600c2d2
2014-09-12 23:16:13 +02:00
Ben Gras 8d311af7ae small arm image script changes
. let you specify IMG as a block device directly. this minimizes
	  i/o (only write used parts of the filesystem) and so turnaround
	  time - while still allowing the big default FS size.

Change-Id: Ib738499464e0d350a474a706f688d3f10806207d
2014-09-12 14:20:37 +02:00
Lionel Sambuc ab5c98ee5a Temporarily disable the is9600 FS server
It is currently too broken to be of any use anyway. Fixes are pending,
which is why this patch is intended to be reverted before those are
merged.

For the time being, the following tools can be used to access cdroms:
 - isodir
 - isoinfo
 - isoread
 - writeisofs

Change-Id: I681e8f1224bb464ba978f893dc18d46fa06a8208
2014-09-12 13:39:49 +02:00
Lionel Sambuc 6631803105 usb/hcd: asserts should not have side effects
They can be deactivated with -DNDEBUG, which is why they can't contain
code which should always be run.

It seems the local implementation of USB_ASSERT doesn't honor the
CPP flags NDEBUG, this will be corrected in a later patch.

Change-Id: Iac56b09fd563f1b8c4c7be15a468a05b9cc86a18
2014-09-12 13:20:43 +02:00
Lionel Sambuc d5b158e992 pkgin_sets: Fix python package name
Change-Id: I09658a10f750b3d15867d6bd69d749c61831a00d
2014-09-12 11:10:30 +02:00
Lionel Sambuc 684b2eb975 /usr/Makefile: prevent pkgin from hanging
Change-Id: Ida6086f3c2d3300609aaebb931d094fd779c73ea
2014-09-12 11:07:33 +02:00
David van Moolenbroek bb9431cb88 Kernel: update copyright year
Change-Id: I1776f1bc6402f264c7095c17a9ace087036cf010
2014-09-10 13:01:45 +00:00
David van Moolenbroek e60f57aa30 rc: update (unused) default service directory
Change-Id: I62f838a47ef92975ef88319fffd94f83814fef49
2014-09-09 10:04:31 -04:00
David van Moolenbroek 16b6870659 blocktest: update test.sh for new shell
Change-Id: I9c08139db972013a16f5794bd213b69bba0b5350
2014-09-09 10:04:09 -04:00
Sky Liu 2fde3a4846 Porting uuencode/uudecode from NetBSD
Lionel: I fixed small mistakes in the mi file, typos, missing keywords,
        and whitespace fixes.

Change-Id: If0c04b923af328838f2d0950e189bf28995bc0f0
2014-09-08 19:51:28 +02:00
Lionel Sambuc 31b808b8fa Drop minix-malloc & friends
Known limitations:
 - comment for now testisofs, as iso9660fs is known to be broken.

Benefits:
 - near 3x speed improvement on C++ code compilation, bringing down
   make build to from 44min down to 21min.

 - Allows for X applications to work properly, which should be available
   in near-term future through pkgsrc for 3.3.0.

Change-Id: I8f4179a7ea925ed381642add32cfd8c5822217e4
2014-09-08 17:30:18 +02:00
Lionel Sambuc 6f7ac603f2 Allow elf_unpack to withstand invalid ELF headers
Change-Id: I10a0f3111176b9614b8531d6736e2e860eb95ce4
2014-09-08 11:48:57 +02:00
Lionel Sambuc ea36b58e62 Set uts.machine to i386 on intel 32bit platforms.
Change-Id: Ic0833843f0d3e3df50fcbde11b453b846f0d4f33
2014-09-05 15:35:23 +02:00
Lionel Sambuc 3f072cf30f commands/setup: fixes for new sh & renamed fsck
- adapt an arithmetic expression for the new sh
 - update the fsck call to use the main fsck wrapper instead of a
   specific fsck version.

Change-Id: I7e25bf6e54b5c9f564082459e78b9ce5c39254cf
2014-09-05 10:26:19 +02:00
Lionel Sambuc c48c7d47f7 Remove SETS.* from the CD.
Change-Id: I06385c51d7d24b4e0e6af037c5953ef11695c923
2014-09-05 10:26:19 +02:00
Lionel Sambuc 094431dd97 set LD_LIBRARY_PATH
Change-Id: I959043857b381df561ce156b7388444628c81afb
2014-09-05 10:26:18 +02:00
Ben Gras 85ebb0e0c3 tps65950: allow 0 as id for qemu beaglexm
makes booting on qemu beaglexm a lot prettier.

Change-Id: I45d0383abbf0d21227a95f538ed78ca6c1ed7871
2014-09-04 13:46:02 +02:00
Ben Gras 683d394d66 devmand: skip unconfigured script invocations
. if a up/down script isn't specified, devmand
	  would try to execute a command line with (null)
	  in it, causing messy messages on startup
	. skip script at a higher level when missing,
	  and add asserts for expected strings at the lower level

Change-Id: Ia0d772076f3781caa5879ea4e64b53fa6c6e8478
2014-09-04 13:33:11 +02:00
Ben Gras a4d4ce4adb retire unstack & datasizes in favour of addr2line
Change-Id: Ibf5db75f3358c3c0bf81ca211a6602b333af0473
2014-09-03 19:14:13 +02:00