From dd19c0bb061af5595a970ed3c4f4af3824b65593 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 11 Aug 2000 20:04:27 +0000 Subject: 2000-08-11 Chris Johns * libc/chmod.c: Return ENOTSUP if filesystem does not have handler. * libc/eval.c: Ditto. * libc/fcntl.c: Ditto. * libc/fsync.c: Ditto. * libc/ioctl.c: Ditto. * libc/ioman.c: Ditto. * libc/link.c: Ditto. * libc/memfile.c: Ditto. * libc/mknod.c: Ditto. * libc/symlink.c: Ditto. * libc/libio.h(rtems_filesystem_dev_major_t): New macro. * libc/libio.h(rtems_filesystem_dev_minor_t): New macro. --- cpukit/libcsupport/src/link.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpukit/libcsupport/src/link.c') diff --git a/cpukit/libcsupport/src/link.c b/cpukit/libcsupport/src/link.c index 5bf8f90353..03bdaee343 100644 --- a/cpukit/libcsupport/src/link.c +++ b/cpukit/libcsupport/src/link.c @@ -41,8 +41,16 @@ int link( */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); + + if ( !parent_loc.ops->evalformake ) { + rtems_filesystem_freenode( &existing_loc ); + rtems_filesystem_freenode( &parent_loc ); + set_errno_and_return_minus_one( ENOTSUP ); + } + result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { + rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); set_errno_and_return_minus_one( result ); } -- cgit v1.2.3