summaryrefslogtreecommitdiffstats
path: root/c/src/lib/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-12 19:10:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-12 19:10:46 +0000
commitdd0f32614ceb0dd72f406d8434acdecc5ccff616 (patch)
tree3620ac014837a178fc91eac4b54b7b2e5ceb5c41 /c/src/lib/include
parente2116f900313354f7a2011b20aeaac813910921f (diff)
downloadrtems-dd0f32614ceb0dd72f406d8434acdecc5ccff616.tar.bz2
Added rtems_filesystem_freenode() macro and added calls at appropriate
places to make sure memory allocated for filesystem specifif nodes gets freed.
Diffstat (limited to 'c/src/lib/include')
-rw-r--r--c/src/lib/include/rtems/libio_.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/c/src/lib/include/rtems/libio_.h b/c/src/lib/include/rtems/libio_.h
index 029bb437dd..8c186278fa 100644
--- a/c/src/lib/include/rtems/libio_.h
+++ b/c/src/lib/include/rtems/libio_.h
@@ -161,6 +161,18 @@ extern mode_t rtems_filesystem_umask;
} while (0)
/*
+ * rtems_filesystem_freenode
+ *
+ * Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+ do { \
+ if ( (_node)->ops->freenod ) \
+ (*(_node)->ops->freenod)( (_node) ); \
+ } while (0)
+
+/*
* rtems_filesystem_is_separator
*
* Macro to determine if a character is a path name separator.