Message type for VFS_GETVFSSTAT

Change-Id: I27f1f6dc37832ee4adb9854c7306ce6153e31567
This commit is contained in:
Lionel Sambuc 2014-05-12 11:34:18 +02:00
parent 7332005370
commit ccdf11c7cf
4 changed files with 16 additions and 11 deletions

View file

@ -232,11 +232,6 @@
#define NR_VFS_CALLS 49 /* highest number from base plus one */
/* Field names for the getvfsstat(2) call. */
#define VFS_GETVFSSTAT_BUF m1_p1 /* struct statvfs * */
#define VFS_GETVFSSTAT_LEN m1_i1 /* size_t */
#define VFS_GETVFSSTAT_FLAGS m1_i2 /* int */
/* Field names for the statvfs1(2) and fstatvfs1(2) calls. */
#define VFS_STATVFS1_LEN m1_i1 /* size_t */
#define VFS_STATVFS1_NAME m1_p1 /* const char * */

View file

@ -146,6 +146,15 @@ typedef struct {
} mess_sigcalls;
_ASSERT_MSG_SIZE(mess_sigcalls);
typedef struct {
int32_t flags;
size_t len;
vir_bytes buf; /* struct statvfs */
uint8_t padding[44];
} mess_lc_vfs_getvfsstat;
_ASSERT_MSG_SIZE(mess_lc_vfs_getvfsstat);
typedef struct {
uint32_t nfds;
fd_set *readfds;
@ -608,6 +617,7 @@ typedef struct {
mess_fs_vfs_readsuper m_fs_vfs_readsuper;
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat;
mess_lc_vfs_select m_lc_vfs_select;
mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;

View file

@ -10,8 +10,8 @@ int getvfsstat(struct statvfs *buf, size_t bufsize, int flags)
message m;
memset(&m, 0, sizeof(m));
m.VFS_GETVFSSTAT_BUF = (char *) buf;
m.VFS_GETVFSSTAT_LEN = bufsize;
m.VFS_GETVFSSTAT_FLAGS = flags;
m.m_lc_vfs_getvfsstat.buf = (vir_bytes) buf;
m.m_lc_vfs_getvfsstat.len = bufsize;
m.m_lc_vfs_getvfsstat.flags = flags;
return(_syscall(VFS_PROC_NR, VFS_GETVFSSTAT, &m));
}

View file

@ -356,9 +356,9 @@ int do_getvfsstat(void)
size_t bufsize;
int r, flags, count, do_lock;
buf = (vir_bytes) job_m_in.VFS_GETVFSSTAT_BUF;
bufsize = job_m_in.VFS_GETVFSSTAT_LEN;
flags = job_m_in.VFS_GETVFSSTAT_FLAGS;
buf = job_m_in.m_lc_vfs_getvfsstat.buf;
bufsize = job_m_in.m_lc_vfs_getvfsstat.len;
flags = job_m_in.m_lc_vfs_getvfsstat.flags;
count = 0;