diff options
author | Chris Johns <chrisj@rtems.org> | 2011-11-03 22:02:01 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2011-11-03 22:02:01 +0000 |
commit | 1e0f63b52c11871a159a55a915611ae37a65377a (patch) | |
tree | 9e1a104695539e691becff1698eb970602be48ea /cpukit/libfs/src/rfs/rtems-rfs-dir.h | |
parent | 2011-11-03 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-1e0f63b52c11871a159a55a915611ae37a65377a.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/rfs/rtems-rfs-dir.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir.h b/cpukit/libfs/src/rfs/rtems-rfs-dir.h index 1f452460db..6bbe6d6e18 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-dir.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-dir.h @@ -29,13 +29,34 @@ #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. * * @param _p Pointer to the path string. * @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]))) /** |