Commit graph

8 commits

Author SHA1 Message Date
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 92b61c816d Fix many more comiler warnings
Most warnings were harmless, some real bugs. Test set should now compile
cleanly with ack, gcc, and clang.
2011-11-28 10:07:55 +00:00
Thomas Veerman 27a2afc1e7 Clean up tests and do runtime test for max name length
- Remove unused code
- Use standard functions declared in common.c
- Change tests to do a runtime test for the max name length of a path
  component (aka NAME_MAX). The actual value might differ from the hard
  coded NAME_MAX depending on the file system used.
2011-08-26 13:16:16 +00:00
Kees van Reeuwijk 0cfdb11450 Repair errors and warnings flagged by llvm. 2010-07-06 11:29:23 +00:00
David van Moolenbroek 1fe1b219c9 test32 fix 2009-09-20 16:47:57 +00:00
David van Moolenbroek f76d75a5ec Various VFS and MFS fixes to improve correctness, consistency and
POSIX compliance.

VFS changes:
* truncate() on a file system mounted read-only no longer panics MFS.
* ftruncate() and fcntl(F_FREESP) now check for write permission on
  the file descriptor instead of the file, write().
* utime(), chown() and fchown() now check for file system read-only
  status.

MFS changes:
* link() and rename() no longer return the internal EENTERMOUNT and
  ELEAVEMOUNT errors to the application as part of a check on the
  source path.
* rename() now treats EENTERMOUNT from the destination path check as
  an error, preventing file system corruption from renaming a normal
  directory to an existing mountpoint directory.
* mountpoints (mounted-on dirs) are hidden better during lookups:
  - if a lookup starts from a mountpoint, the first component has to
    be ".." (anything else being a VFS-FS protocol violation).
  - in that case, the permissions of the mountpoint are not checked.
  - in all other cases, visiting a mountpoint always results in
    EENTERMOUNT.
* a lookup on ".." from a mount root or chroot(2) root no longer
  succeeds if the caller does not have search permission on that
  directory.
* POSIX: getdents() now updates directory access times.
* POSIX: readlink() now returns partial results instead of ERANGE.

Miscellaneous changes:
* semaphore file handling bug (leading to hangs) fixed in test 32.

The VFS changes should now put the burden of checking for read-only
status of file systems entirely on VFS, and limit the access
permission checks that file systems have to perform, to checking
search permission on directories during lookups. From this point on,
any deviation from that spceification should be considered a bug.
Note that for legacy reasons, the root partition is assumed to be
mounted read-write.
2009-05-18 11:27:12 +00:00
Ben Gras a17d7c827b Al's no-double-empty-lines crusade 2005-08-22 15:08:27 +00:00
Ben Gras 9865aeaa79 Initial revision 2005-04-21 14:53:53 +00:00