VFS/FS: remove fstatfs(2) and REQ_FSTATFS

The fstatfs(3) call now uses fstatvfs(2).

Change-Id: I3fa5d31f078457b4d80418c23060bb2c148cb460
This commit is contained in:
David van Moolenbroek
2014-02-18 11:25:01 +01:00
committed by sambuc
parent 474b24f91c
commit f10229eafb
28 changed files with 38 additions and 227 deletions
-1
View File
@@ -80,7 +80,6 @@ struct buf *get_block_map(register struct inode *rip, u64_t position);
zone_t rd_indir(struct buf *bp, int index);
/* stadir.c */
int fs_fstatfs(void);
int fs_stat(void);
int fs_statvfs(void);
-23
View File
@@ -2,7 +2,6 @@
#include <string.h>
#include <assert.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
#include "inode.h"
#include "super.h"
@@ -86,28 +85,6 @@ static int stat_inode(
return(r);
}
/*===========================================================================*
* fs_fstatfs *
*===========================================================================*/
int fs_fstatfs()
{
struct statfs st;
struct inode *rip;
int r;
if((rip = find_inode(fs_dev, ROOT_INODE)) == NULL)
return(EINVAL);
st.f_bsize = rip->i_sp->s_block_size;
/* Copy the struct to user space. */
r = sys_safecopyto(fs_m_in.m_source, (cp_grant_id_t) fs_m_in.REQ_GRANT,
(vir_bytes) 0, (vir_bytes) &st, (size_t) sizeof(st));
return(r);
}
/*===========================================================================*
* fs_statvfs *
*===========================================================================*/
+3 -4
View File
@@ -23,7 +23,7 @@ int (*fs_call_vec[])(void) = {
fs_inhibread, /* 7 */
fs_stat, /* 8 */
fs_utime, /* 9 */
fs_fstatfs, /* 10 */
fs_statvfs, /* 10 */
fs_breadwrite, /* 11 */
fs_breadwrite, /* 12 */
fs_unlink, /* 13 */
@@ -45,8 +45,7 @@ int (*fs_call_vec[])(void) = {
no_sys, /* 29 */ /* Was: fs_newnode */
fs_rdlink, /* 30 */
fs_getdents, /* 31 */
fs_statvfs, /* 32 */
fs_readwrite, /* 33 */
fs_bpeek, /* 34 */
fs_readwrite, /* 32 */
fs_bpeek, /* 33 */
};