diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-07 14:57:31 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-07 14:57:31 +0000 |
commit | b79a45e9c02e6aa5d768a932280ce55b5c77d212 (patch) | |
tree | c988375dc9d4d8b2c7307d68e12e625b0bd10eb2 | |
parent | Remove. (diff) | |
download | rtems-b79a45e9c02e6aa5d768a932280ce55b5c77d212.tar.bz2 |
2010-06-05 Bharath Suri <bharath.s.jois@gmail.com>
* libcsupport/include/rtems/libio_.h: Removed macros
rtems_filesystem_is_separator
rtems_filesystem_get_start_loc
rtems_filesystem_get_sym_start_loc
and added them as files under libcsupport/src/
* libcsupport/src/: Added new files
libcsupport/src/sup_fs_get_start_loc.c
libcsupport/src/sup_fs_get_sym_start_loc.c
libcsupport/src/sup_fs_is_separator.c
* libcsupport/Makefile.am: Changes to accommodate new
files under libcsupport/src/
-rw-r--r-- | cpukit/ChangeLog | 16 | ||||
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio_.h | 64 |
3 files changed, 37 insertions, 45 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 28e50cf04d..05ad0d77a3 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,19 @@ +2010-06-07 Bharath Suri <bharath.s.jois@gmail.com> + + * libcsupport/include/rtems/libio_.h: Removed macros + rtems_filesystem_is_separator + rtems_filesystem_get_start_loc + rtems_filesystem_get_sym_start_loc + and added them as files under libcsupport/src/ + + * libcsupport/src/: Added new files + libcsupport/src/sup_fs_get_start_loc.c + libcsupport/src/sup_fs_get_sym_start_loc.c + libcsupport/src/sup_fs_is_separator.c + + * libcsupport/Makefile.am: Changes to accommodate new + files under libcsupport/src/ + 2010-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de> * score/include/rtems/score/heap.h: Declare diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index c9729c289b..6b74f0e052 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -110,6 +110,8 @@ BSD_LIBC_C_FILES = src/strlcpy.c src/strlcat.c src/issetugid.c libcsupport_a_SOURCES = src/gxx_wrappers.c src/getchark.c src/printk.c \ src/printk_plugin.c src/putk.c src/vprintk.c \ + src/sup_fs_is_separator.c src/sup_fs_get_start_loc.c \ + src/sup_fs_get_sym_start_loc.c \ $(BSD_LIBC_C_FILES) $(BASE_FS_C_FILES) $(MALLOC_C_FILES) \ $(ERROR_C_FILES) $(ASSOCIATION_C_FILES) diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h index 22f498b98a..ad00f8785f 100644 --- a/cpukit/libcsupport/include/rtems/libio_.h +++ b/cpukit/libcsupport/include/rtems/libio_.h @@ -1,4 +1,4 @@ -/** +/* * @file rtems/libio_.h */ @@ -90,7 +90,7 @@ extern rtems_libio_t *rtems_libio_iop_freelist; #define rtems_libio_check_fd(_fd) \ do { \ - if ((uint32_t) (_fd) >= rtems_libio_number_iops) { \ + if ((uint32_t) (_fd) >= rtems_libio_number_iops) { \ errno = EBADF; \ return -1; \ } \ @@ -129,12 +129,12 @@ extern rtems_libio_t *rtems_libio_iop_freelist; * Macro to check if a file descriptor is open for this operation. */ -#define rtems_libio_check_permissions(_iop, _flag) \ - do { \ - if (((_iop)->flags & (_flag)) == 0) { \ +#define rtems_libio_check_permissions(_iop, _flag) \ + do { \ + if (((_iop)->flags & (_flag)) == 0) { \ rtems_set_errno_and_return_minus_one( EINVAL ); \ - return -1; \ - } \ + return -1; \ + } \ } while (0) /* @@ -150,44 +150,6 @@ extern rtems_libio_t *rtems_libio_iop_freelist; (*(_node)->ops->freenod_h)( (_node) ); \ } while (0) -/* - * rtems_filesystem_is_separator - * - * Macro to determine if a character is a path name separator. - * - * NOTE: This macro handles MS-DOS and UNIX style names. - */ - -#define rtems_filesystem_is_separator( _ch ) \ - ( ((_ch) == '/') || ((_ch) == '\\') || ((_ch) == '\0')) - -/* - * rtems_filesystem_get_start_loc - * - * Macro to determine if path is absolute or relative. - */ - -#define rtems_filesystem_get_start_loc( _path, _index, _loc ) \ - do { \ - if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \ - *(_loc) = rtems_filesystem_root; \ - *(_index) = 1; \ - } else { \ - *(_loc) = rtems_filesystem_current; \ - *(_index) = 0; \ - } \ - } while (0) - -#define rtems_filesystem_get_sym_start_loc( _path, _index, _loc ) \ - do { \ - if ( rtems_filesystem_is_separator( (_path)[ 0 ] ) ) { \ - *(_loc) = rtems_filesystem_root; \ - *(_index) = 1; \ - } else { \ - *(_index) = 0; \ - } \ - } while (0) - /* * External structures @@ -271,6 +233,18 @@ int rtems_filesystem_prefix_separators( void rtems_filesystem_initialize(void); +int init_fs_mount_table(void); + +int rtems_filesystem_is_separator(char ch); + +void rtems_filesystem_get_start_loc(const char *path, + int *index, + rtems_filesystem_location_info_t *loc); + +void rtems_filesystem_get_sym_start_loc(const char *path, + int *index, + rtems_filesystem_location_info_t *loc); + #ifdef __cplusplus } #endif |