iso9660fs - statvfs call, by Buccapatnam Tirumala, Gautam.
This commit is contained in:
parent
13b5dd4a82
commit
4b496e29bd
3 changed files with 31 additions and 1 deletions
|
@ -63,6 +63,7 @@ _PROTOTYPE( int read_chunk, (struct dir_record *rip, u64_t position,
|
|||
/* stadir.c */
|
||||
_PROTOTYPE( int fs_stat, (void) );
|
||||
_PROTOTYPE( int fs_fstatfs, (void) );
|
||||
_PROTOTYPE( int fs_statvfs, (void) );
|
||||
|
||||
/* super.c */
|
||||
_PROTOTYPE(int release_v_pri, (struct iso9660_vd_pri *v_pri) );
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "inc.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <minix/com.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
@ -98,3 +99,31 @@ PUBLIC int fs_fstatfs()
|
|||
return(r);
|
||||
}
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_statvfs *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_statvfs()
|
||||
{
|
||||
struct statvfs st;
|
||||
int r;
|
||||
|
||||
|
||||
st.f_bsize = v_pri.logical_block_size_l;
|
||||
st.f_frsize = st.f_bsize;
|
||||
st.f_blocks = v_pri.volume_space_size_l;
|
||||
st.f_bfree = 0;
|
||||
st.f_bavail = 0;
|
||||
st.f_files = 0;
|
||||
st.f_ffree = 0;
|
||||
st.f_favail = 0;
|
||||
st.f_fsid = fs_dev;
|
||||
st.f_flag = ST_RDONLY;
|
||||
st.f_namemax = NAME_MAX;
|
||||
|
||||
/* Copy the struct to user space. */
|
||||
r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
|
||||
(phys_bytes) sizeof(st), D);
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
|
|
@ -40,5 +40,5 @@ PUBLIC _PROTOTYPE (int (*fs_call_vec[]), (void) ) = {
|
|||
no_sys, /* 52: not used */
|
||||
no_sys, /* 53: not used */
|
||||
fs_getdents, /* 54 */
|
||||
no_sys, /* 32 */
|
||||
fs_statvfs, /* 32 */
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue