Patch from Wayne Bullaughey <wayne@wmi.com>. Comments follow:

I'm working on code to mount my host based file system on the base file
  system (imfs) and have a suggestion for a change to eval.c in the
  c/src/lib/libc directory of the 8/20/1999 snapshot.  The current version
  does not test the result value returned from the evalpath callback (line 47)
  in the case where follow_link is true.  Attached is my suggested change.
  Without this test the node_type callback may be called after evalpath
  failed.  node_type could set the type to some value other then
  RTEMS_FILESYSTEM_HARD_LINK or RTEMS_FILESYSTEM_SYM_LINK but it seems cleaner
  to add the check on result.
This commit is contained in:
Joel Sherrill
1999-10-05 16:34:20 +00:00
parent 6d81ea35e6
commit 0139484fbd
3 changed files with 3 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ int rtems_filesystem_evaluate_path(
* not.
*/
if ( follow_link ) {
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type )
set_errno_and_return_minus_one( ENOTSUP );