Message type for VFS_CLOSE
Change-Id: Iebe5f06b0dc95cdca61d95ab875d4fa1171f4f4c
This commit is contained in:
parent
6c61cd5665
commit
2101b4ebc0
4 changed files with 10 additions and 5 deletions
|
@ -232,9 +232,6 @@
|
|||
|
||||
#define NR_VFS_CALLS 49 /* highest number from base plus one */
|
||||
|
||||
/* Field names for the close(2) call. */
|
||||
#define VFS_CLOSE_FD m1_i1 /* int */
|
||||
|
||||
/* Field names for the read(2), write(2), and getdents(2) calls. */
|
||||
#define VFS_READWRITE_FD m1_i1 /* int */
|
||||
#define VFS_READWRITE_BUF m1_p1 /* char * */
|
||||
|
|
|
@ -156,6 +156,13 @@ typedef struct {
|
|||
} mess_lc_vfs_chown;
|
||||
_ASSERT_MSG_SIZE(mess_lc_vfs_chown);
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
|
||||
uint8_t padding[52];
|
||||
} mess_lc_vfs_close;
|
||||
_ASSERT_MSG_SIZE(mess_lc_vfs_close);
|
||||
|
||||
typedef struct {
|
||||
vir_bytes name;
|
||||
size_t len;
|
||||
|
@ -843,6 +850,7 @@ typedef struct {
|
|||
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
|
||||
|
||||
mess_lc_vfs_chown m_lc_vfs_chown;
|
||||
mess_lc_vfs_close m_lc_vfs_close;
|
||||
mess_lc_vfs_creat m_lc_vfs_creat;
|
||||
mess_lc_vfs_fchdir m_lc_vfs_fchdir;
|
||||
mess_lc_vfs_fchmod m_lc_vfs_fchmod;
|
||||
|
|
|
@ -11,6 +11,6 @@ int fd;
|
|||
message m;
|
||||
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.VFS_CLOSE_FD = fd;
|
||||
m.m_lc_vfs_close.fd = fd;
|
||||
return(_syscall(VFS_PROC_NR, VFS_CLOSE, &m));
|
||||
}
|
||||
|
|
|
@ -662,7 +662,7 @@ int do_lseek(void)
|
|||
int do_close(void)
|
||||
{
|
||||
/* Perform the close(fd) system call. */
|
||||
int thefd = job_m_in.VFS_CLOSE_FD;
|
||||
int thefd = job_m_in.m_lc_vfs_close.fd;
|
||||
return close_fd(fp, thefd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue