[rtems commit] POSIX conformance
Sebastian Huber
sebh at rtems.org
Wed Feb 8 15:05:50 UTC 2012
Module: rtems
Branch: master
Commit: 62d8a5452cde0f1e195504f86b4b6acc6d7ee476
Changeset: http://git.rtems.org/rtems/commit/?id=62d8a5452cde0f1e195504f86b4b6acc6d7ee476
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Feb 8 15:54:54 2012 +0100
POSIX conformance
For symbolic links, the length in bytes of the pathname contained in the
symbolic link should be returned in st_size.
---
cpukit/libfs/src/imfs/imfs_stat.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
index 2b4b2d6..5bc1eae 100644
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ b/cpukit/libfs/src/imfs/imfs_stat.c
@@ -18,6 +18,7 @@
#endif
#include <errno.h>
+#include <string.h>
#include "imfs.h"
#include <rtems/libio_.h>
#include <rtems/seterr.h>
@@ -47,7 +48,7 @@ int IMFS_stat(
break;
case IMFS_SYM_LINK:
- buf->st_size = 0;
+ buf->st_size = strlen( the_jnode->info.sym_link.name );
break;
case IMFS_FIFO:
More information about the vc
mailing list