Read calls may be repeated by VFS if the user destination memory is
not mapped in. Devman currently assumes that all reads are
successful, and uses this to track whether EOF has been reached for
a particular event, discarding it as soon as this happens. Upon
repetition, this may result in lost events for devmand.
With this patch, devman discards events only once devmand reads the
EOF marker, which itself can never generate a user page fault. The
result is that read calls for data can be repeated safely, without
the risk of losing events in the process.
Change-Id: I9dfdf7f8c8992a20a10302d79c3506e61f8564b0
When building Gold on OSX 10.9 and Clang 6.0, the build process fails
with the error:
In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/binary.cc:31:
In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/stringpool.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:54:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cctype:51:72: error: use of undeclared identifier 'do_not_use_isalnum_with_safe_ctype'
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}
Signed-off-by: Thomas Veerman <tveerman@gmail.com>
Change-Id: Ib7ca13a51e83c31bb3020d755e04b308aeacde5d
- Fixed missing variable interpolation because of single quotes
- Replaced /bin/sh in gen_uEnv.txt.sh with /usr/bin/env bash as the default
echo doesn't support '-n'
- Fixed some whitespace errors
- A succesful build requires for now to skip the gold linker on OSX.
Change-Id: Id09bf52f45252026e3a58b74e8448ea24a0dab12
We have to use SOCK_SEQPACKET instead of SOCK_STREAM for client/server
communication, because UDS does things with control messages that tmux
does not expect.
Change-Id: I3edb1875d61fb976cf6485c650f4fd4b82fa354c
The NetBSD version is seriously broken--it is unable to match lines
against an empty pattern--and appears to be unmaintained.
The new version is the latest OpenBSD grep, with a number of MINIX-
specific changes marked as such, and an additional number of
(signed/unsigned, const) fixes to pass compilation.
Since this is not NetBSD code, move back the entire thing into
minix/usr.bin.
Change-Id: Icd40794a2d0cff9e7fb452db7d28c16dbd25e51d
The entire infrastructure relied on an ACK feature, and as such, it
has been broken for years now, with no easy way to repair it.
Change-Id: I783c2a21276967af115a642199f31fef0f14a572
- synchronize request type with ioctl by making it unsigned long;
- unbreak VFS requests, as they were being sent to PM;
- use proper ioctl direction flags (and new numbers) for requests;
- remove some needless header inclusions;
- svrctl is in libc, make its message name reflect this;
- keep backward compatibility: svrctl is part of the userland ABI.
Change-Id: I44902e8d0d11b8ebc1ef3bda94d2202481743c9b
- fix for "out of extents" panic;
- return ENOENT when a file name does not exist;
- inode count sanity check upon unmount.
Change-Id: Icb97dbaf7c8aec463438f06b341defca357094b2
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
- 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
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
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
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
The file system may not be expecting these upcalls at arbitrary
moments, while they serve only as a performance optimization anyway.
Change-Id: I0748fd1f6c2645ddbb64466093ee36025aac45e0
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
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
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