Message types for VFS statvfs
Change-Id: If84f53577510399aa1238cfcd0b8aa1fb13c2490
This commit is contained in:
parent
ea84447ccd
commit
fd32afa654
8 changed files with 21 additions and 13 deletions
|
@ -430,6 +430,13 @@ typedef struct {
|
|||
} mess_vfs_fs_stat;
|
||||
_ASSERT_MSG_SIZE(mess_vfs_fs_stat);
|
||||
|
||||
typedef struct {
|
||||
cp_grant_id_t grant;
|
||||
|
||||
uint8_t data[52];
|
||||
} mess_vfs_fs_statvfs;
|
||||
_ASSERT_MSG_SIZE(mess_vfs_fs_statvfs);
|
||||
|
||||
typedef struct {
|
||||
ino_t inode;
|
||||
|
||||
|
@ -547,6 +554,7 @@ typedef struct {
|
|||
mess_vfs_fs_rename m_vfs_fs_rename;
|
||||
mess_vfs_fs_slink m_vfs_fs_slink;
|
||||
mess_vfs_fs_stat m_vfs_fs_stat;
|
||||
mess_vfs_fs_statvfs m_vfs_fs_statvfs;
|
||||
mess_vfs_fs_unlink m_vfs_fs_unlink;
|
||||
mess_vfs_fs_utime m_vfs_fs_utime;
|
||||
mess_vfs_utimens m_vfs_utimens;
|
||||
|
|
|
@ -97,8 +97,8 @@ int fs_statvfs(void)
|
|||
st.f_flag |= ST_NOTRUNC;
|
||||
|
||||
/* 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));
|
||||
r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
|
||||
(vir_bytes) &st, (phys_bytes) sizeof(st));
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ int do_statvfs(void)
|
|||
statvfs.f_bavail = statvfs.f_bfree;
|
||||
statvfs.f_namemax = NAME_MAX;
|
||||
|
||||
return sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, 0,
|
||||
(vir_bytes) &statvfs, sizeof(statvfs));
|
||||
return sys_safecopyto(m_in.m_source, m_in.m_vfs_fs_statvfs.grant, 0,
|
||||
(vir_bytes) &statvfs, sizeof(statvfs));
|
||||
}
|
||||
|
|
|
@ -68,6 +68,6 @@ int fs_statvfs(void)
|
|||
statvfs.f_flag = ST_NOTRUNC;
|
||||
statvfs.f_namemax = PNAME_MAX;
|
||||
|
||||
return sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
|
||||
(vir_bytes) &statvfs, sizeof(statvfs));
|
||||
return sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant,
|
||||
0, (vir_bytes) &statvfs, sizeof(statvfs));
|
||||
}
|
||||
|
|
|
@ -101,8 +101,8 @@ int fs_statvfs()
|
|||
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));
|
||||
r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
|
||||
(vir_bytes) &st, (phys_bytes) sizeof(st));
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
|
|
@ -109,8 +109,8 @@ int fs_statvfs()
|
|||
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));
|
||||
r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
|
||||
(vir_bytes) &st, (phys_bytes) sizeof(st));
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
|
|
@ -113,8 +113,8 @@ int fs_statvfs()
|
|||
st.f_namemax = MFS_DIRSIZ;
|
||||
|
||||
/* 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));
|
||||
r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
|
||||
(vir_bytes) &st, (phys_bytes) sizeof(st));
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ int req_statvfs(endpoint_t fs_e, struct statvfs *buf)
|
|||
|
||||
/* Fill in request message */
|
||||
m.m_type = REQ_STATVFS;
|
||||
m.REQ_GRANT = grant_id;
|
||||
m.m_vfs_fs_statvfs.grant = grant_id;
|
||||
|
||||
/* Send/rec request */
|
||||
r = fs_sendrec(fs_e, &m);
|
||||
|
|
Loading…
Reference in a new issue