4.10
Last change
on this file since 955a34b5 was
955a34b5,
checked in by Sebastian Huber <sebastian.huber@…>, on 07/01/10 at 15:18:06
|
2010-07-01 Sebastian Huber <sebastian.huber@…>
- libcsupport/include/rtems/libio_.h: Removed
rtems_filesystem_mount_table_control.
- libcsupport/include/rtems/libio.h, libcsupport/src/mount-mgr.c,
libcsupport/src/mount.c libcsupport/src/statvfs.c,
libcsupport/src/unmount.c, libmisc/shell/main_mount.c: Documentation.
Removed rtems_filesystem_mounts_first() and
rtems_filesystem_mounts_next(). Added
rtems_filesystem_mount_iterate(). Changed return type of
rtems_filesystem_iterate(). Removed rtems_filesystem_nodes_equal().
2010-07-01 Sebastian Huber <sebastian.huber@…>
- libfs/src/nfsclient/src/nfs.c, libfs/src/nfsclient/src/nfs.c,
libfs/src/nfsclient/src/librtemsNfs.h: Renamed
rtems_nfsfs_initialize() in rtems_nfs_initialize().
- sapi/include/confdefs.h: Reflect changes above. Renamed
*_miniIMFS in *_MINIIMFS. Renamed *_NFSFS in *_NFS.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[eb649786] | 1 | /* |
---|
| 2 | * COPYRIGHT (c) 2009 Chris Johns <chrisj@rtems.org> |
---|
| 3 | * |
---|
| 4 | * The license and distribution terms for this file may be |
---|
| 5 | * found in the file LICENSE in this distribution or at |
---|
| 6 | * http://www.rtems.com/license/LICENSE. |
---|
| 7 | * |
---|
| 8 | * $Id$ |
---|
| 9 | */ |
---|
| 10 | /* |
---|
| 11 | * The statvfs as defined by the SUS: |
---|
| 12 | * http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/statvfs.h.html |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | #if HAVE_CONFIG_H |
---|
| 16 | #include "config.h" |
---|
| 17 | #endif |
---|
| 18 | |
---|
| 19 | #include <rtems/libio_.h> |
---|
| 20 | #include <rtems/seterr.h> |
---|
| 21 | |
---|
| 22 | #include <sys/statvfs.h> |
---|
| 23 | |
---|
| 24 | int |
---|
| 25 | statvfs (const char *path, struct statvfs *sb) |
---|
| 26 | { |
---|
| 27 | rtems_filesystem_location_info_t loc; |
---|
| 28 | rtems_filesystem_location_info_t *fs_mount_root; |
---|
| 29 | rtems_filesystem_mount_table_entry_t *mt_entry; |
---|
| 30 | int result; |
---|
| 31 | |
---|
| 32 | /* |
---|
| 33 | * Get |
---|
| 34 | * The root node of the mounted filesytem. |
---|
| 35 | * The node for the directory that the fileystem is mounted on. |
---|
| 36 | * The mount entry that is being refered to. |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) |
---|
| 40 | return -1; |
---|
| 41 | |
---|
| 42 | mt_entry = loc.mt_entry; |
---|
| 43 | fs_mount_root = &mt_entry->mt_fs_root; |
---|
| 44 | |
---|
| 45 | if ( !fs_mount_root->ops->statvfs_h ) |
---|
| 46 | rtems_set_errno_and_return_minus_one( ENOTSUP ); |
---|
| 47 | |
---|
| 48 | memset (sb, 0, sizeof (struct statvfs)); |
---|
[18daff9] | 49 | |
---|
[eb649786] | 50 | result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); |
---|
[18daff9] | 51 | |
---|
[eb649786] | 52 | rtems_filesystem_freenode( &loc ); |
---|
| 53 | |
---|
| 54 | return result; |
---|
| 55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.