Commit graph

68 commits

Author SHA1 Message Date
David van Moolenbroek ba736c7968 libpuffs: clean up, unbreak
- move MINIX3-specific files into minix/lib/libpuffs;
- resynchronize the remaining files with NetBSD code;
- remove a few unnecessary changes;
- put remaining MINIX3-specific changes in __minix blocks;
- sort out the source files being linked at all.

The result is that libpuffs now successfully links against FUSE
file system programs again.  It can successfully mount, perform
some of the most basic operations, and unmount the file system.

Change-Id: Ieac220f7ad8c4d1fa293abda81967e8045be0bb4
2015-09-23 12:05:03 +00:00
David van Moolenbroek 7c48de6cc4 Resolve more warnings
Change-Id: Ibc1b7f7cd45ad7295285e59c6ce55888266fece8
2015-09-23 12:04:58 +00:00
Cristiano Giuffrida 3f82ac6a4e services: Selectively enable stateful restart.
Change-Id: Ibf6afa3041013ca714e28b673abb1329cd72d2d5
2015-09-17 13:36:01 +00:00
David van Moolenbroek 22840dea11 libfsdriver: preinitialize stat.st_ino
The stat.st_ino field must always be filled with the inode number
given as part of the fdr_stat request anyway, so libfsdriver can
simply fill in the number and allow the file system not to bother.

Change-Id: Ia7a849d0b23dfc83010df0d48fa26e4225427694
2015-06-23 14:38:04 +00:00
David van Moolenbroek 289b04677a 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
2014-11-14 15:54:16 +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 81db4f2cff libpuffs: use libfsdriver
Change-Id: I26651578066e1098dc275a9cfbe5710870a13811
2014-09-18 12:46:25 +00:00
Lionel Sambuc b6aa3714a1 Remove protocol version of {mode,ino,uid,gid}_t
Now that we have enough room in the message, remove these types.

Change-Id: Ib734c6f0209b259a14a1189b3886b9c8474e1b9a
2014-07-28 17:05:29 +02:00
Lionel Sambuc 56350a991b Message types for VFS read, write & peek
All of these requests share the same message type as at least one server
manages those requests in the same handler, just by checking the actual
type of the request, and then acting upon it.

Change-Id: I17337b4c67ae209523574c22ccc108cf5f1e65e9
2014-07-28 17:05:29 +02:00
Lionel Sambuc a65bf37e3b Message types for VFS chown
Change-Id: I1dc50772fd28b0c698d85922ad0ad3b41dde006c
2014-07-28 17:05:29 +02:00
Lionel Sambuc fd32afa654 Message types for VFS statvfs
Change-Id: If84f53577510399aa1238cfcd0b8aa1fb13c2490
2014-07-28 17:05:29 +02:00
Lionel Sambuc ea84447ccd Message types for VFS chmod
Change-Id: I76e5df4c0a386682e863e640182c59e4ab7e30be
2014-07-28 17:05:29 +02:00
Lionel Sambuc f90ed467fc Message types for VFS mknod
Change-Id: I41772ffe0efc520b3cd204857c33c8c76d81a5a8
2014-07-28 17:05:28 +02:00
Lionel Sambuc 2dc27154ad Message types for VFS mkdir
Change-Id: I05ea5b5e14e28afdfab6edcabc1dc761389f2638
2014-07-28 17:05:28 +02:00
Lionel Sambuc 169e0314ea Message types for VFS unlink & rmdir
These two request are handled by the same function in some FSes, which
prevents us from using two different kinds of messages.

Change-Id: Iede3a0251d8d84ca7f121c56f30f42b045b0c737
2014-07-28 17:05:28 +02:00
Lionel Sambuc df7e2766c5 Message types for VFS stat
Change-Id: I1d40ae7c3c32a4f7b80c82bc2fa8b157b20a6837
2014-07-28 17:05:28 +02:00
Lionel Sambuc 6a94be7e63 Message types for VFS putnode
Change-Id: I0802ccaaaa6ee1b4eb96d62b08f9795c790ce39b
2014-07-28 17:05:28 +02:00
Lionel Sambuc afcde4d208 Message types for VFS link
Change-Id: Ibe03e7c9fded7f3764ecbe3e35b92df3662e54a4
2014-07-28 17:05:27 +02:00
Lionel Sambuc 111969b623 Message types for VFS rdlink
Change-Id: Ic077e99fb140a3a1de849f7f761fdfd90961f5d8
2014-07-28 17:05:27 +02:00
Lionel Sambuc 591227dc38 Message types for VFS getdents
Change-Id: I7474d7547f1fd52f4da54754ccfe984ba1a2baa8
2014-07-28 17:05:27 +02:00
Lionel Sambuc 0d1db99965 Message types for VFS slink
Change-Id: I13975474b924817553101c28591b4c04e8679173
2014-07-28 17:05:27 +02:00
Lionel Sambuc cadcb6d061 Message types for VFS utime
Change-Id: If7e5faa13a824528fd8ca02bd6982e04d48032e9
2014-07-28 17:05:26 +02:00
Lionel Sambuc 135346dfc3 Message types for VFS ftrunc
Change-Id: I593a4d91b1d974f632f6cb4eb23aabee5b65df7b
2014-07-28 17:05:26 +02:00
Lionel Sambuc a725c62a66 Message types for VFS rename
Change-Id: I48a4098c16519e9c104b287d7bdf95ed6a2a7323
2014-07-28 17:05:26 +02:00
Lionel Sambuc 5d682d17ee Message types for VFS flush
Change-Id: Ida7cbff4402bf876603a2153e2784699d93c03ea
2014-07-28 17:05:26 +02:00
Lionel Sambuc 16a3f23203 Message types for VFS mountpoint
Change-Id: I61c5729628b9b9262cc11415591b1b0f25ad04a8
2014-07-28 17:05:26 +02:00
Lionel Sambuc 3f567bdb11 Message types for VFS create
Change-Id: Ibeba338337eb16814b5b25f7135da958e8316a99
2014-07-28 17:05:25 +02:00
Lionel Sambuc 02dc6498da Message types for VFS lookup
Change-Id: Ic4d2a616ebc986c4b405b6b9ee0bd7c3b59e81d2
2014-07-28 17:05:25 +02:00
Lionel Sambuc 398af818df Message types for VFS readsuper
Change-Id: I7aea85d9842459ea454420bb1687d9b8eb597914
2014-07-28 17:05:25 +02:00
Lionel Sambuc 18f97ad415 Workaround missing lchmod/lchown
Change-Id: I231a0010722619d389b763af35ff55f84ca9cb76
2014-07-28 17:05:20 +02:00
Ben Gras 3f38115c7b _MINIX_SYSTEM - fixes for in-minix crossbuild
. define _MINIX_SYSTEM for all system code from minix.service.mk
	. hide some system-level declarations and definitions
	  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
	  Minix (such as: NONE being defined and paddr_t being used but not
	  declared)
	. the similar definition _SYSTEM is unsuitable as it changes the
	  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
2014-07-28 17:05:14 +02:00
Ben Gras 3f3e78ef59 64-bit REQ_TRC_START, REQ_TRC_END
Change-Id: I567804209695b5ec0d83a453d93e36cbf8900f1a
2014-07-28 17:05:11 +02:00
Ben Gras 4694fcc1d5 64-bit RES_FILE_SIZE
Change-Id: Ia17b4b4722f87fb35142948b62d4a8392ded5f73
2014-07-28 17:05:10 +02:00
Ben Gras fdd85c4d08 64-bit RES_SEEK_POS
Change-Id: Id13f06417f2f600db167bec7b33bc825742cae79
2014-07-28 17:05:10 +02:00
Ben Gras 978082bb0d 64-bit REQ_SEEK_POS
Change-Id: I2e51a188b171af0f0a02349e4eccbe78e7cc2e0c
2014-07-28 17:05:10 +02:00
Lionel Sambuc 03514ba605 Getting rid of "old-style-definition"
Patch submitted by hoefnix. Ref.
https://groups.google.com/d/msg/minix-dev/sHQDVJRyx1c/eJjrYOqk5bgJ

Change-Id: I2fcdf4cf119ef252ccc7df06849baf37ffd08440
2014-07-28 17:05:09 +02:00
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