summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-22 17:28:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-22 17:33:13 +0100
commitacec386c75801bd80d9c835ab745fe5cab74bcc1 (patch)
treefcf419ee489eb3a60e080f9c560d9b4b2318283c
parentf1738ed619ed01199535410887a81c6ac99e482c (diff)
downloadrtems-acec386c75801bd80d9c835ab745fe5cab74bcc1.tar.bz2
Filesystem: PR1619: Use ENOSYS for default statvfs
POSIX does not specify an error number in case the file system does not support this call. Use the Linux value.
-rw-r--r--cpukit/libfs/src/defaults/default_statvfs.c2
-rw-r--r--testsuites/psxtests/psxstat/psxstat.scn4
-rw-r--r--testsuites/psxtests/psxstat/test.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/libfs/src/defaults/default_statvfs.c b/cpukit/libfs/src/defaults/default_statvfs.c
index e6b8a0a488..ed30ff51b2 100644
--- a/cpukit/libfs/src/defaults/default_statvfs.c
+++ b/cpukit/libfs/src/defaults/default_statvfs.c
@@ -19,5 +19,5 @@ int rtems_filesystem_default_statvfs(
struct statvfs *buf
)
{
- rtems_set_errno_and_return_minus_one( ENOTSUP );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
diff --git a/testsuites/psxtests/psxstat/psxstat.scn b/testsuites/psxtests/psxstat/psxstat.scn
index d29f87dda7..2638c213e0 100644
--- a/testsuites/psxtests/psxstat/psxstat.scn
+++ b/testsuites/psxtests/psxstat/psxstat.scn
@@ -1704,9 +1704,9 @@ lstat( /my_mount_point/symlinks/a_dir_symlink/a_file_symlink ) returned
...st_ctime Sat Dec 31 09:00:35 1988
...st_blksize 0
...st_blocks 0
-statvfs, with invalid path - expect ENOTSUP
+statvfs, with invalid path - expect ENOSYS
create /tmp -- OK
-statvfs, with valid path - expect ENOTSUP
+statvfs, with valid path - expect ENOSYS
statvfs tested!
Exercise the reentrant version - _stat_r - expect EFAULT
Exercise the reentrant version - _lstat_r - expect EFAULT
diff --git a/testsuites/psxtests/psxstat/test.c b/testsuites/psxtests/psxstat/test.c
index 3c35a766eb..f072eab05b 100644
--- a/testsuites/psxtests/psxstat/test.c
+++ b/testsuites/psxtests/psxstat/test.c
@@ -795,10 +795,10 @@ void test_statvfs(void)
status = mkdir( "/tmp", 0777 );
rtems_test_assert( status == 0 );
- puts( "statvfs, with valid path - expect ENOTSUP" );
+ puts( "statvfs, with valid path - expect ENOSYS" );
status = statvfs( "/tmp", &stat );
rtems_test_assert( status == -1 );
- rtems_test_assert( errno == ENOTSUP );
+ rtems_test_assert( errno == ENOSYS );
puts( "statvfs tested!" );
}