Commit Graph

23 Commits

Author SHA1 Message Date
Joel Sherrill
5f8c41c389 Update email address of Fernando Ruiz Casas to <fruizcasas@gmail.com>
This was requested to be executed prior to relicensing to BSD-2.
2022-04-05 13:13:31 -05:00
Joel Sherrill
d90e2dc1e8 cpukit/libcsupport/src/[a-f]*: Change license to BSD-2
Updates #3053.
2022-04-01 10:02:30 -05:00
Sebastian Huber
cfe8f7a9b7 doxygen: Switch @brief and @ingroup
This order change fixes the Latex documentation build via Doxygen.
2020-04-28 09:04:00 +02:00
Sebastian Huber
80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Sebastian Huber
b2ed712d26 Include missing <string.h>
Update #2133.
2017-08-25 10:58:58 +02:00
Sebastian Huber
66fac03fae libio: Fix deadlock in location management
Perform a context-dependent deferred location release to avoid a
deadlock on the file system instance locks, for example during a
chdir().

Update #2936.
2017-03-16 15:33:56 +01:00
Sebastian Huber
e079b33e76 Filesystem: Export most generic path eval function
Add path length parameter to
rtems_filesystem_eval_path_start_with_root_and_current() so that users
may pass paths without a '\0' termination.

Update #2558.
2016-02-02 08:06:10 +01:00
Sebastian Huber
c625a64121 Filesystem: Delete node type operation
Use the fstat handler instead.
2015-01-22 07:52:40 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Mathew Kallada
ceaa99964f libcsupport: Doxygen Enhancement Task #3
http://www.google-melange.com/gci/task/view/google/gci2012/7992210
2012-12-08 15:43:29 -05:00
Sebastian Huber
da154e14f6 Filesystem: Move operations to mount table entry
The scope of the file system operations is the file system instance.
The scope of the file system node handlers is the file location.  The
benefit of moving the operations to the mount table entry is a size
reduction of the file location (rtems_filesystem_location_info_t).  The
code size is slightly increased due to additional load instructions.

Restructure rtems_filesystem_mount_table_entry_t to improve cache
efficiency.
2012-05-15 10:01:43 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Sebastian Huber
2563410019 Filesystem: Rename defines
o Removed RTEMS_LIBIO_PERMS_SEARCH.
 o Renamed RTEMS_LIBIO_PERMS_READ in RTEMS_FS_PERMS_READ.
 o Renamed RTEMS_LIBIO_PERMS_WRITE in RTEMS_FS_PERMS_WRITE.
 o Renamed RTEMS_LIBIO_PERMS_EXEC in RTEMS_FS_PERMS_EXEC.
 o Renamed RTEMS_LIBIO_FOLLOW_HARD_LINK in RTEMS_FS_FOLLOW_HARD_LINK.
 o Renamed RTEMS_LIBIO_FOLLOW_SYM_LINK in RTEMS_FS_FOLLOW_SYM_LINK.
 o Renamed RTEMS_LIBIO_MAKE in RTEMS_FS_MAKE.
 o Renamed RTEMS_LIBIO_EXCLUSIVE in RTEMS_FS_EXCLUSIVE.
 o Renamed RTEMS_LIBIO_ACCEPT_RESIDUAL_DELIMITERS in
   RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS.
 o Renamed RTEMS_LIBIO_REJECT_TERMINAL_DOT in
 RTEMS_FS_REJECT_TERMINAL_DOT.
2012-03-13 12:24:10 +01:00
Sebastian Huber
3b7c123c8d Filesystem: Reference counting for locations
o A new data structure rtems_filesystem_global_location_t was
   introduced to be used for
    o the mount point location in the mount table entry,
    o the file system root location in the mount table entry,
    o the root directory location in the user environment, and
    o the current directory location in the user environment.
   During the path evaluation global start locations are obtained to
   ensure that the current file system instance will be not unmounted in
   the meantime.
 o The user environment uses now reference counting and is protected
   from concurrent access.
 o The path evaluation process was completely rewritten and simplified.
   The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
   method.  Recursive calls in the path evaluation have been replaced
   with iteration to avoid stack overflows.  Only the evaluation of
   symbolic links is recursive.  No dynamic memory allocations and
   intermediate buffers are used in the high level path evaluation.  No
   global locks are held during the file system instance specific path
   evaluation process.
 o Recursive symbolic link evaluation is now limited by
   RTEMS_FILESYSTEM_SYMLOOP_MAX.  Applications can retrieve this value
   via sysconf().
 o The device file system (devFS) uses now no global variables and
   allocation from the workspace.  Node names are allocated from the
   heap.
 o The upper layer lseek() performs now some parameter checks.
 o The upper layer ftruncate() performs now some parameter checks.
 o unmask() is now restricted to the RWX flags and protected from
   concurrent access.
 o The fchmod_h and rmnod_h file system node handlers are now a file
   system operation.
 o The unlink_h operation has been removed.  All nodes are now destroyed
   with the rmnod_h operation.
 o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
   operations.
 o The path evaluation and file system operations are now protected by
   per file system instance lock and unlock operations.
 o Fix and test file descriptor duplicate in fcntl().
 o New test fstests/fsnofs01.
2012-03-13 12:23:37 +01:00
Chris Johns
7baa484300 2009-06-12 Chris Johns <chrisj@rtems.org>
* libblock/src/bdbuf.c: Update comments.
        * libblock/src/bdpart.c, libblock/src/ide_part_table.c: Get the
        device from the rdev field of the stat buf.
        * libcsupport/include/rtems/libio.h: Add a path length to evalpath
        handler. Add parent locations to rmmod and unlink handlers.
        * libcsupport/include/rtems/libio_.h: Add a path length to
        rtems_filesystem_evaluate_path. Add
        rtems_filesystem_evaluate_relative_path, rtems_filesystem_dirname,
        and rtems_filesystem_prefix_separators. Remove
        rtems_filesystem_evaluate_parent.
        * libcsupport/src/base_fs.c, libcsupport/src/chdir.c,
        libcsupport/src/chmod.c, libcsupport/src/chown.c,
        libcsupport/src/chroot.c, libcsupport/src/fchdir.c,
        libcsupport/src/link.c, libcsupport/src/mount.c,
        libcsupport/src/open.c, libcsupport/src/privateenv.c,
        libcsupport/src/readlink.c, libcsupport/src/unmount.c,
        libcsupport/src/utime.c, libcsupport/src/unmount.c,
        libcsupport/src/utime.c, libfs/src/devfs/devfs.h,
        libfs/src/devfs/devfs_eval.c, libfs/src/devfs/devstat.c,
        libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_misc.c,
        libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c,
        libfs/src/imfs/imfs_load_tar.c, libfs/src/imfs/ioman.c,
        libfs/src/pipe/pipe.c, libmisc/fsmount/fsmount.c,
        libnetworking/lib/ftpfs.c: Add the length parameter to the eval
        call.
        * libcsupport/src/eval.c: Add rtems_filesystem_prefix_separators,
        rtems_filesystem_dirname,
        rtems_filesystem_evaluate_relative_path. Add the length parameter
        to the eval call.
        * libcsupport/src/rmdir.c: Find the parent pathloc then the node
        pathloc from that node. Remove the call to find the parent given
        the node pathloc.
        * libcsupport/src/stat.c: Add the length parameter to the eval
        call. Set the device into the rdev field.
        * libcsupport/src/unlink.c: Find the parent pathloc then the node
        pathloc from that node. Remove the call to find the parent given
        the node pathloc.
        * libfs/src/dosfs/fat.c, libfs/src/dosfs/msdos_format.c: Get the
        disk device number from the stat rdev field.
        * libfs/src/dosfs/msdos.h: Add the length parameter to the eval
        call. Add the parent pathloc to the rmnod handler.
        * libfs/src/dosfs/msdos_dir.c: Add the parent pathloc to the rmnod
        handler.
        * libfs/src/dosfs/msdos_eval.c: Add the length parameter to the
        eval and token call.
        * libfs/src/imfs/imfs_directory.c: Add the parent pathloc to the
        rmnod handler.
        * libfs/src/imfs/imfs_fchmod.c: Do not test the mode flags for
        only the allowed flags. Add the missing flags spec'ed in the POSIX
        standard.
        * libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_rmnod.c,
        libfs/src/imfs/imfs_unlink.c, libfs/src/imfs/memfile.c: Add the
        parent node. Currently ignored in the IMFS.
        * libfs/src/imfs/imfs_stat.c: Return the device number in the rdev
        field.
        * libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_symlink.c : Add
        the length parameter to the token call.
        * libfs/src/nfsclient/src/nfs.c: Add the length parameter to the
        eval call and parent node to the rmnod and unlink command.
        * libmisc/shell/internal.h: Remove the libc mounter decl to make
        public.
        * libmisc/shell/main_mount.c: Add support for hooking external
        mount support for new file systems.
        * libmisc/shell/shell.h: Add helper functions for the mount
        command.
2009-06-12 01:53:33 +00:00
Joel Sherrill
46dfa1c7ba 2008-02-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/chroot.c: Formatting.
2008-02-28 16:07:57 +00:00
Ralf Corsepius
50f32b1165 Remove stray white spaces. 2004-04-18 06:05:35 +00:00
Joel Sherrill
0eae36c7c7 2003-09-04 Joel Sherrill <joel@OARcorp.com>
* include/chain.h, include/clockdrv.h, include/console.h,
	include/iosupp.h, include/rtc.h, include/spurious.h,
	include/timerdrv.h, include/vmeintr.h, include/motorola/mc68230.h,
	include/rtems/libcsupport.h, include/rtems/libio.h,
	include/rtems/libio_.h, include/rtems/termiostypes.h,
	include/sys/termios.h, include/zilog/z8036.h, include/zilog/z8530.h,
	include/zilog/z8536.h, src/__brk.c, src/__gettod.c, src/__sbrk.c,
	src/__times.c, src/access.c, src/base_fs.c, src/cfgetispeed.c,
	src/cfgetospeed.c, src/cfsetispeed.c, src/cfsetospeed.c, src/chdir.c,
	src/chmod.c, src/chown.c, src/chroot.c, src/close.c, src/ctermid.c,
	src/dup.c, src/dup2.c, src/eval.c, src/fchdir.c, src/fchmod.c,
	src/fcntl.c, src/fdatasync.c, src/fpathconf.c,
	src/fs_null_handlers.c, src/fstat.c, src/fsync.c, src/ftruncate.c,
	src/getdents.c, src/getpwent.c, src/hosterr.c, src/ioctl.c,
	src/isatty.c, src/libio.c, src/libio_sockets.c, src/link.c,
	src/lseek.c, src/lstat.c, src/malloc.c, src/mallocfreespace.c,
	src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mount.c, src/newlibc.c,
	src/no_libc.c, src/no_posix.c, src/open.c, src/pathconf.c,
	src/pipe.c, src/privateenv.c, src/read.c, src/readlink.c,
	src/rewinddir.c, src/rmdir.c, src/seekdir.c, src/stat.c,
	src/symlink.c, src/sync.c, src/tcdrain.c, src/tcflow.c,
	src/tcflush.c, src/tcgetattr.c, src/tcgetprgrp.c, src/tcsendbreak.c,
	src/tcsetattr.c, src/tcsetpgrp.c, src/telldir.c, src/termios.c,
	src/termiosinitialize.c, src/truncate.c, src/umask.c, src/unixlibc.c,
	src/unlink.c, src/unmount.c, src/utime.c, src/write.c: URL for
	license changed.
2003-09-04 18:54:13 +00:00
Joel Sherrill
d90b74e07b 2003-02-03 Till Straumann <strauman@slac.stanford.edu>
PR 339/filesystem
	* src/chroot.c: Fix violation of FS node object copy semantics.
2003-02-03 22:00:30 +00:00
Joel Sherrill
a02224e0e6 2002-01-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/rtems/libio_.h: Remove set_errno_and_return_minus_one.
	* libc/cfsetispeed.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/cfsetospeed.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chdir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chmod.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chown.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/chroot.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/closedir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/eval.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fchdir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fchmod.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fdatasync.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fpathconf.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fstat.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/fsync.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ftruncate.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/getdents.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ioctl.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/link.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/lseek.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/mknod.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/open.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/read.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/readlink.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/rmdir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/stat.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/symlink.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/tcsetattr.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/telldir.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ttyname.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/ttyname_r.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/unlink.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/unmount.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/utime.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
	* libc/write.c: Include <rtems/seterr.h>.
	Apply rtems_set_errno_and_return_minus_one.
2002-01-04 18:29:37 +00:00
Joel Sherrill
d8a9155512 2001-04-20 Correo Fernando-ruiz <correo@fernando-ruiz.com>
* include/rtems/libio_.h, libc/chroot.c, libc/privateenv.c:
	Private environment and chroot() enhancements and fixes.  Comments:
	  + privateenv has been modified to let at chroot() to be more
	    POSIX like Sergei Organov recommended.
	  + A task owner lets that rtems_set_private_env() will be
	    called twice or more times.
	  + chroot() can be called without a previous
	    rtems_set_private_env(); (transpanrently)
	  + The second call of rtems_set_private_env() makes a internal
	    chroot("/") into global imfs_root.
	  + chroot() runs like chdir() without a previous chdir("/") with
	    the global root.
	  + The current directory can be in a wrong place like Linux and
	    many other Unices.
2001-04-20 21:11:25 +00:00
Joel Sherrill
56f20bacf0 2001-01-26 Joel Sherrill <joel@OARcorp.com>
* libc/chroot.c: Fixed naming problems.  Names were changed
	when the code this depends on was merged.
2001-01-26 14:50:54 +00:00
Joel Sherrill
37535317d9 2001-01-25 Joel Sherrill <joel@OARcorp.com>
* cpu.c, rtems/score/cpu.h: Bug report from Peter Mueller
	<peter.o.mueller@gmx.de> because of not correcting for the ISR
	vector table now being allocated from the workspace.
2001-01-26 14:12:48 +00:00