Message type for VFS_FSTAT
Change-Id: Ibdedcac120fc4bf78e28291d9c97fe02df1928db
This commit is contained in:
parent
cd0fd5e725
commit
bb2b07940c
4 changed files with 13 additions and 8 deletions
|
@ -232,10 +232,6 @@
|
|||
|
||||
#define NR_VFS_CALLS 49 /* highest number from base plus one */
|
||||
|
||||
/* Field names for the fstat(2) call. */
|
||||
#define VFS_FSTAT_FD m1_i1 /* int */
|
||||
#define VFS_FSTAT_BUF m1_p1 /* struct stat * */
|
||||
|
||||
/* Field names for the fcntl(2) call. */
|
||||
#define VFS_FCNTL_FD m1_i1 /* int */
|
||||
#define VFS_FCNTL_CMD m1_i2 /* int */
|
||||
|
|
|
@ -146,6 +146,14 @@ typedef struct {
|
|||
} mess_sigcalls;
|
||||
_ASSERT_MSG_SIZE(mess_sigcalls);
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
vir_bytes buf; /* struct stat * */
|
||||
|
||||
uint8_t padding[48];
|
||||
} mess_lc_vfs_fstat;
|
||||
_ASSERT_MSG_SIZE(mess_lc_vfs_fstat);
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
|
||||
|
@ -769,6 +777,7 @@ typedef struct {
|
|||
mess_fs_vfs_readsuper m_fs_vfs_readsuper;
|
||||
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
|
||||
|
||||
mess_lc_vfs_fstat m_lc_vfs_fstat;
|
||||
mess_lc_vfs_fsync m_lc_vfs_fsync;
|
||||
mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat;
|
||||
mess_lc_vfs_ioctl m_lc_vfs_ioctl;
|
||||
|
|
|
@ -32,8 +32,8 @@ int fstat(int fd, struct stat *buffer)
|
|||
message m;
|
||||
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.VFS_FSTAT_FD = fd;
|
||||
m.VFS_FSTAT_BUF = (char *) buffer;
|
||||
m.m_lc_vfs_fstat.fd = fd;
|
||||
m.m_lc_vfs_fstat.buf = (vir_bytes)buffer;
|
||||
|
||||
return _syscall(VFS_PROC_NR, VFS_FSTAT, &m);
|
||||
}
|
||||
|
|
|
@ -177,8 +177,8 @@ int do_fstat(void)
|
|||
int r, rfd;
|
||||
vir_bytes statbuf;
|
||||
|
||||
statbuf = (vir_bytes) job_m_in.VFS_FSTAT_BUF;
|
||||
rfd = job_m_in.VFS_FSTAT_FD;
|
||||
statbuf = job_m_in.m_lc_vfs_fstat.buf;
|
||||
rfd = job_m_in.m_lc_vfs_fstat.fd;
|
||||
|
||||
/* Is the file descriptor valid? */
|
||||
if ((rfilp = get_filp(rfd, VNODE_READ)) == NULL) return(err_code);
|
||||
|
|
Loading…
Reference in a new issue