Commit graph

32 commits

Author SHA1 Message Date
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02: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 3053b27247 include/limits.h: merged
Replacing SYMLOOP_MAX, SYMLINK_MAX, by _POSIX_SYMLOOP_MAX,
_POSIX_SYMLINK_MAX respectively.

Change-Id: I020c20b0dbf6d44e777879d786a20811f23d1561
2014-03-03 20:47:03 +01:00
Lionel Sambuc 37598dccf1 Aligning dev_t to 64bits.
Change-Id: I630f72f8530dd4aaf05c35ca23683ae12c9f8328
2014-03-02 12:28:32 +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
David van Moolenbroek d8106f7f1d Rename VFS_BASE to FS_BASE
The recipients of these requests are file systems, not VFS.

Change-Id: I49211cfe4289df25b0c07171c7f8c321fc3731d6
2014-03-01 09:05:00 +01:00
David van Moolenbroek 80bd109cd3 libsys: various updates
- move system calls for use by services from libminlib into libsys;
- move srv_fork(2) and srv_kill(2) from RS and into libsys;
- replace getprocnr(2) with sef_self(3);
- rename previous getnprocnr(2) to getprocnr(2);
- clean up getepinfo(2);
- change all libsys calls that used _syscall to use _taskcall, so as
  to avoid going through errno to pass errors; this is already how
  most calls work anyway, and many of the calls previously using
  _syscall were already assumed to return the actual error;
- initialize request messages to zero, for future compatibility
  (note that this does not include PCI calls, which are in need of a
  much bigger overhaul, nor kernel calls);
- clean up more of dead DS code as a side effect.

Change-Id: I8788f54c68598fcf58e23486e270c2d749780ebb
2014-03-01 09:05:00 +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 dc1c50abf2 Fix various file system warnings
Change-Id: Ied10498c3ae14f9f2fd06914f23239df330fa296
2014-02-18 11:25:02 +01:00
David van Moolenbroek cc810ee4d9 VFS/FS: replace protocol version with flag field
The main motivation for this change is that only Loris supports
multithreading, and Loris supports dynamic thread allocation, so the
number of supported threads can be implemented as a bit flag (i.e.,
either 1 or "at least as many as VFS has"). The ABI break obviates the
need to support file system versioning at this time, and several
other aspects are better implemented as flags as well. Other changes:

- replace peek/bpeek test upon mount with FS flag as well;
- mark libsffs as 64-bit file size capable;
- remove old (3.2.1) getdents support.

Change-Id: I313eace9c50ed816656c31cd47d969033d952a03
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
David van Moolenbroek f10229eafb VFS/FS: remove fstatfs(2) and REQ_FSTATFS
The fstatfs(3) call now uses fstatvfs(2).

Change-Id: I3fa5d31f078457b4d80418c23060bb2c148cb460
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
Thomas Veerman ab19ece134 Define protocol version of {mode,ino,uid,gid}_t
Change-Id: Ia2027749f2ce55a561d19eb895a5618505e9a2ac
2014-02-18 11:25:01 +01:00
Thomas Veerman c66fd312d4 VFS-FS protocol: add versioning
Change-Id: Ice6fbfd4b535b7435653fa08b27a3378d1cfdbf8
2014-02-18 11:25:00 +01:00
Ben Gras 44f34e53d5 VFS: Implement REQ_BPEEK.
This commit introduces a new request type called REQ_BPEEK. It
requests minor device blocks from the FS.  Analogously to REQ_PEEK,
it requests the filesystem to get the requested blocks into its
cache, without actually copying the result anywhere.

Change-Id: If1d06645b0e17553a64b3167091e9d12efeb3d6f
2013-04-24 10:18:16 +00:00
Antoine Leca c979136e4e Also apply sub-second UTIME to libpuffs 2013-04-12 11:11:59 +02:00
Antoine Leca df9d28ebe7 Libpuffs: use struct timespec instead of time_t 2013-04-12 11:11:59 +02:00
Thomas Cort e67fc5771d libc: add clock_getres()/clock_gettime() system calls.
In order to make it more clear that ticks should be used for timers
and realtime should be used for timestamps / displaying the date/time,
getuptime() was renamed to getticks() and getuptime2() was renamed to
getuptime().

Servers, drivers, libraries, tests, etc that use getuptime()/getuptime2()
have been updated. In instances where a realtime was calculated, the
calculation was changed to use realtime.

System calls clock_getres() and clock_gettime() were added to PM/libc.
2013-04-04 15:04:53 +02:00
Lionel Sambuc 8e4736f2df Removing obsolete _MINIX define
Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076
2013-02-26 09:44:20 +00:00
Lionel Sambuc 0ac803292e Fix warnings trivial warnings.
Fix warnings about:
 . Unused variables
 . format mismatch in printf/scanf format string and arguments
 . Missing parenthesis around assignment as truth values
 . Clang warnings anout unknown GCC pragma
2013-01-14 11:44:31 +01:00
Lionel Sambuc 9152e1c5a7 Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
 * tools
 * distribution
 * sets
 * release

The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.

For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.

Regarding new or modifications of Makefiles a few things:
 * Read share/mk/bsd.README
 * If you add a subdirectory, add a Makefile in it, and have it called
   by the parent through the SUBDIR variable.
 * Do not add arbitrary inclusion which crosses to another branch of
   the hierarchy; If you can't do without it, put a comment on why.
   If possible, do not use inclusion at all.
 * Use as much as possible the infrastructure, it is here to make
   life easier, do not fight it.

Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-11-15 16:07:29 +01:00
Ben Gras 2bfeeed885 drop segment from safecopy invocations
. all invocations were S or D, so can safely be dropped
	  to prepare for the segmentless world
	. still assign D to the SCP_SEG field in the message
	  to make previous kernels usable
2012-06-16 16:22:51 +00:00
Ben Gras 73379f0be5 set major version of shlibs to 0
WARNING: this will break existing dynamically linked binaries if they
exist. If you have any:
	. re-build world statically first if necessary
	. remove libraries from /lib and /usr/lib
	. then build world

This change:
	. avoids possible future dismay when interfacing other
	  systems' binaries; done until they are abi-compatible

Thanks to Antoine Leca for pointing this out.
2012-05-10 16:38:24 +02:00
Ben Gras 4b999f1962 build shared versions of libraries
building defaults to off until clang is updated.

current clang does not handle -shared, necessary to change the ld
invocation to build shared libraries properly. a new clang should be
installed and MKPIC defaults to no unless the newer clang is detected.

changes:

	. mainly small imports of a Makefile or two and small fixes
	  (turning things back on that were turned off in Makefiles)
	. e.g.: dynamic librefuse now depends on dynamic
	  libpuffs, so libpuffs has to be built dynamically too
	  and a make dependency barrier is needed in lib/Makefile
	. all library objects now have a PIC (for .so) and non-PIC
	  version, so everything is built twice.
	. generate PIC versions of the compat (un-RENAMEd) jump files,
	  include function type annotation in generated assembly
	. build progs with -static by default for now
	. also build ld.elf_so
	. also import NetBSD ldd
2012-04-16 05:21:20 +02:00
Ben Gras 204ae72525 retire _ANSI and <minix/ansi.h> 2012-03-25 21:58:27 +02:00
Ben Gras 7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
Ben Gras 6a73e85ad1 retire _PROTOTYPE
. only good for obsolete K&R support
	. also remove a stray ansi.h and the proto cmd
2012-03-25 16:17:10 +02:00
Thomas Veerman 71634240a0 libpuffs: make GCC happy 2012-02-01 13:23:33 +00:00
David van Moolenbroek c9ba1ad75d libpuffs: remove unused block device code 2011-11-29 16:56:52 +01:00
Thomas Veerman 4311136125 Fix compiler warnings 2011-11-14 14:21:39 +00:00
Thomas Veerman 490e0de548 Import librefuse and libpuffs
Import libpuffs and our port of libpuffs. The port was done as part of
GSoC 2011 FUSE project, done by Evgeniy Ivanov. The librefuse import
did not require any porting efforts. Libpuffs has been modified to
understand our VFS-FS protocol and translate between that and PUFFS. As
an example that it works, fuse-ntfs-3g from pkgsrc can be compiled and
used to mount ntfs partitions:
mount -t ntfs-3g <device> <mountpoint>

FUSE only works with the asynchronous version of VFS. See <docs/UPDATING> on
how to run AVFS.

This patch further includes some changes to mount(1) and mount(2) so it's
possible to use file systems provided by pkgsrc (note: manual modifications
to /etc/system.conf are still needed. There has been made an exception for
fuse-ntfs-3g, so it already as an entry).
2011-11-14 11:53:05 +00:00