VFS/FS: remove fstatfs(2) and REQ_FSTATFS
The fstatfs(3) call now uses fstatvfs(2). Change-Id: I3fa5d31f078457b4d80418c23060bb2c148cb460
This commit is contained in:
@@ -32,7 +32,6 @@ long sdbm_hash(char *str, int len);
|
||||
|
||||
/* stadir.c */
|
||||
int fs_stat(void);
|
||||
int fs_fstatfs(void);
|
||||
int fs_statvfs(void);
|
||||
|
||||
/* utility.c */
|
||||
|
||||
+1
-18
@@ -3,7 +3,6 @@
|
||||
#include "inc.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -56,23 +55,7 @@ int fs_stat(void)
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_fstatfs *
|
||||
*===========================================================================*/
|
||||
int fs_fstatfs(void)
|
||||
{
|
||||
/* Retrieve file system statistics.
|
||||
*/
|
||||
struct statfs statfs;
|
||||
|
||||
memset(&statfs, 0, sizeof(statfs));
|
||||
|
||||
/* Copy the struct to user space. */
|
||||
return sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
|
||||
(vir_bytes) &statfs, (phys_bytes) sizeof(statfs));
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_fstatfs *
|
||||
* fs_statvfs *
|
||||
*===========================================================================*/
|
||||
int fs_statvfs(void)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ int (*fs_call_vec[])(void) = {
|
||||
do_noop, /* 7 inhibread */
|
||||
fs_stat, /* 8 stat */
|
||||
no_sys, /* 9 utime */
|
||||
fs_fstatfs, /* 10 fstatfs */
|
||||
fs_statvfs, /* 10 statvfs */
|
||||
no_sys, /* 11 bread */
|
||||
no_sys, /* 12 bwrite */
|
||||
no_sys, /* 13 unlink */
|
||||
@@ -36,9 +36,8 @@ int (*fs_call_vec[])(void) = {
|
||||
no_sys, /* 29 newnode */
|
||||
fs_rdlink, /* 30 rdlink */
|
||||
fs_getdents, /* 31 getdents */
|
||||
fs_statvfs, /* 32 statvfs */
|
||||
no_sys, /* 33 peek */
|
||||
no_sys, /* 34 bpeek */
|
||||
no_sys, /* 32 peek */
|
||||
no_sys, /* 33 bpeek */
|
||||
};
|
||||
|
||||
/* This should not fail with "array size is negative": */
|
||||
|
||||
Reference in New Issue
Block a user