From bf61751c5a21858305ee643e1b488c70a213dbb7 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Wed, 23 Oct 2002 18:10:27 +0000 Subject: 2002-10-23 * src/mount.c per PR290, add check for ops->node_type_h * src/mknod.c per PR291, remove erroneous call to freenod --- cpukit/libcsupport/ChangeLog | 4 ++++ cpukit/libcsupport/src/mknod.c | 1 - cpukit/libcsupport/src/mount.c | 11 ++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cpukit/libcsupport/ChangeLog b/cpukit/libcsupport/ChangeLog index 436ce4bc73..596ec57ede 100644 --- a/cpukit/libcsupport/ChangeLog +++ b/cpukit/libcsupport/ChangeLog @@ -1,3 +1,7 @@ +2002-10-23 + * src/mount.c per PR290, add check for ops->node_type_h + * src/mknod.c per PR291, remove erroneous call to freenod + 2002-10-21 Ralf Corsepius * .cvsignore: Reformat. diff --git a/cpukit/libcsupport/src/mknod.c b/cpukit/libcsupport/src/mknod.c index 6110b90e1d..7cdfe99533 100644 --- a/cpukit/libcsupport/src/mknod.c +++ b/cpukit/libcsupport/src/mknod.c @@ -49,7 +49,6 @@ int mknod( rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); if ( !temp_loc.ops->evalformake_h ) { - rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index 9ea08b7e2b..ed10d9e749 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -135,13 +135,22 @@ int mount( mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 ) goto cleanup_and_bail; + /* + * Test for node_type_h + */ + + if (!loc.ops->node_type_h) { + errno = ENOTSUP; + goto cleanup_and_bail; + } + /* * Test to see if it is a directory */ loc_to_free = &loc; if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { - errno = ENOTDIR; + errno = ENOTDIR; goto cleanup_and_bail; } -- cgit v1.2.3