summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-30 12:33:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-30 12:33:13 +0000
commite5d6705e4631c64c904c29f9358ce1cb1106cdd5 (patch)
tree0e153982cc8362c05a4556c206c74d7db68a05f5 /c/src/lib
parentPatch from Chris Johns <cjohns@cybertec.com.au> to add fchdir() (diff)
downloadrtems-e5d6705e4631c64c904c29f9358ce1cb1106cdd5.tar.bz2
Patch from Chris Johns <cjohns@cybertec.com.au> to add support for
stat()'ing a symbolic link. This is needed to support the port of the BSD commands like ls to RTEMS.
Diffstat (limited to 'c/src/lib')
-rw-r--r--c/src/lib/libc/imfs_handlers_link.c26
-rw-r--r--c/src/lib/libc/imfs_stat.c4
2 files changed, 17 insertions, 13 deletions
diff --git a/c/src/lib/libc/imfs_handlers_link.c b/c/src/lib/libc/imfs_handlers_link.c
index b0a057c068..efa74ef730 100644
--- a/c/src/lib/libc/imfs_handlers_link.c
+++ b/c/src/lib/libc/imfs_handlers_link.c
@@ -20,18 +20,18 @@
*/
rtems_filesystem_file_handlers_r IMFS_link_handlers = {
- NULL, /* open */
- NULL, /* close */
- NULL, /* read */
- NULL, /* write */
- NULL, /* ioctl */
- NULL, /* lseek */
- NULL, /* stat */
- NULL, /* fchmod */
- NULL, /* ftruncate */
- NULL, /* fpathconf */
- NULL, /* fsync */
- NULL, /* fdatasync */
- NULL, /* fcntl */
+ NULL, /* open */
+ NULL, /* close */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* ioctl */
+ NULL, /* lseek */
+ IMFS_stat, /* stat */
+ NULL, /* fchmod */
+ NULL, /* ftruncate */
+ NULL, /* fpathconf */
+ NULL, /* fsync */
+ NULL, /* fdatasync */
+ NULL, /* fcntl */
IMFS_rmnod
};
diff --git a/c/src/lib/libc/imfs_stat.c b/c/src/lib/libc/imfs_stat.c
index f5858498c1..ac8b183ff2 100644
--- a/c/src/lib/libc/imfs_stat.c
+++ b/c/src/lib/libc/imfs_stat.c
@@ -39,6 +39,10 @@ int IMFS_stat(
buf->st_size = the_jnode->info.file.size;
break;
+ case IMFS_SYM_LINK:
+ buf->st_size = 0;
+ break;
+
default:
set_errno_and_return_minus_one( ENOTSUP );
break;