diff options
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index f3f9c2ea38..536e4513d7 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -56,20 +56,16 @@ extern "C" { typedef _off64_t rtems_off64_t; /** - * @name File System Node Types - * - * @{ + * @brief File system node types. */ - -#define RTEMS_FILESYSTEM_DIRECTORY 1 -#define RTEMS_FILESYSTEM_DEVICE 2 -#define RTEMS_FILESYSTEM_HARD_LINK 3 -#define RTEMS_FILESYSTEM_SYM_LINK 4 -#define RTEMS_FILESYSTEM_MEMORY_FILE 5 - -/** @} */ - -typedef int rtems_filesystem_node_types_t; +typedef enum { + RTEMS_FILESYSTEM_INVALID_NODE_TYPE, + RTEMS_FILESYSTEM_DIRECTORY, + RTEMS_FILESYSTEM_DEVICE, + RTEMS_FILESYSTEM_HARD_LINK, + RTEMS_FILESYSTEM_SYM_LINK, + RTEMS_FILESYSTEM_MEMORY_FILE +} rtems_filesystem_node_types_t; /** * @name File System Node Operations @@ -360,6 +356,10 @@ struct _rtems_filesystem_file_handlers_r { */ rtems_filesystem_rmnod_t rmnod_h; }; + +extern const rtems_filesystem_file_handlers_r +rtems_filesystem_handlers_default; + /** * This method defines the interface to the default open(2) * system call support which is provided by a file system @@ -892,10 +892,29 @@ struct _rtems_filesystem_operations_table { rtems_filesystem_statvfs_t statvfs_h; }; -/* - * @brief Default filesystem evalpath +extern const rtems_filesystem_operations_table +rtems_filesystem_operations_default; + +/** + * @brief Provides a defualt routine for filesystem + * implementation of path evaluation. */ +int rtems_filesystem_default_evalpath( + const char *pathname, + size_t pathnamelen, + int flags, + rtems_filesystem_location_info_t *pathloc +); +/** + * @brief Provides a defualt routine for filesystem + * implementation of path evaluation for make. + */ +int rtems_filesystem_default_evalformake( + const char *path, + rtems_filesystem_location_info_t *pathloc, + const char **name +); /** * @brief Provides a defualt routine for filesystem @@ -918,6 +937,14 @@ int rtems_filesystem_default_unlink( /** * @brief Provides a defualt routine for filesystem + * implementation to determine the node type. + */ +rtems_filesystem_node_types_t rtems_filesystem_default_node_type( + rtems_filesystem_location_info_t *pathloc +); + +/** + * @brief Provides a defualt routine for filesystem * implementation to create a new node. */ int rtems_filesystem_default_mknod( |