2011-11-04 Chris Johns <chrisj@rtems.org>

* libfs/src/rfs/rtems-rfs-dir.h: Commit the missing change. Part
        of removing the hardcoded dir string.
This commit is contained in:
Chris Johns
2011-11-03 22:02:01 +00:00
parent 6167a5b572
commit 1e0f63b52c
2 changed files with 29 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2011-11-04 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-dir.h: Commit the missing change. Part
of removing the hardcoded dir string.
2011-11-03 Chris Johns <chrisj@rtems.org>
PR 1948/filesystem

View File

@@ -28,6 +28,16 @@
#include <rtems/rfs/rtems-rfs-file-system.h>
#include <rtems/rfs/rtems-rfs-inode.h>
/**
* The current directory string as held in directory lists.
*/
#define RTEMS_RFS_CURRENT_DIR_STR "."
/**
* The size of the current directory.
*/
#define RTEMS_RFS_CURRENT_DIR_SIZE (1)
/**
* Test if the path provided is a current directory.
*
@@ -35,7 +45,18 @@
* @return bool True if the path is a current directory.
*/
#define rtems_rfs_current_dir(_p) \
((_p[0] == '.') && ((_p[1] == '\0') || rtems_filesystem_is_separator (_p[1])))
((_p[0] == RTEMS_RFS_CURRENT_DIR_STR[0]) && \
((_p[1] == '\0') || rtems_filesystem_is_separator (_p[1])))
/**
* The parent directory string as held in directory lists.
*/
#define RTEMS_RFS_PARENT_DIR_STR ".."
/**
* The size of the parent directory.
*/
#define RTEMS_RFS_PARENT_DIR_SIZE (2)
/**
* Test if the path provided is a parent directory.
@@ -44,7 +65,8 @@
* @return bool True if the path is a parent directory.
*/
#define rtems_rfs_parent_dir(_p) \
((_p[0] == '.') && (_p[1] == '.') && \
((_p[0] == RTEMS_RFS_PARENT_DIR_STR[0]) && \
(_p[1] == RTEMS_RFS_PARENT_DIR_STR[1]) && \
((_p[2] == '\0') || rtems_filesystem_is_separator (_p[2])))
/**