#define NR_VFS_CALLS 49 /* highest number from base plus one */
-/* 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 * */
-#define VFS_STATVFS1_FD m1_i1 /* int */
-#define VFS_STATVFS1_BUF m1_p2 /* struct statvfs * */
-#define VFS_STATVFS1_FLAGS m1_i2 /* int */
-
/* Field names for the mount(2) call. */
#define VFS_MOUNT_FLAGS m11_i1 /* int */
#define VFS_MOUNT_DEVLEN m11_s1 /* size_t */
} mess_lc_vfs_select;
_ASSERT_MSG_SIZE(mess_lc_vfs_select);
+typedef struct {
+ int fd;
+ int flags;
+ size_t len;
+ vir_bytes name;
+ vir_bytes buf;
+
+ uint8_t padding[36];
+} mess_lc_vfs_statvfs1;
+_ASSERT_MSG_SIZE(mess_lc_vfs_statvfs1);
+
typedef struct {
dev_t device;
off_t seek_pos;
mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat;
mess_lc_vfs_select m_lc_vfs_select;
+ mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;
mess_vfs_fs_chmod m_vfs_fs_chmod;
message m;
memset(&m, 0, sizeof(m));
- m.VFS_STATVFS1_FD = fd;
- m.VFS_STATVFS1_BUF = (char *) buffer;
- m.VFS_STATVFS1_FLAGS = flags;
+ m.m_lc_vfs_statvfs1.fd = fd;
+ m.m_lc_vfs_statvfs1.buf = (vir_bytes)buffer;
+ m.m_lc_vfs_statvfs1.flags = flags;
return(_syscall(VFS_PROC_NR, VFS_FSTATVFS1, &m));
}
message m;
memset(&m, 0, sizeof(m));
- m.VFS_STATVFS1_LEN = strlen(name) + 1;
- m.VFS_STATVFS1_NAME = (char *) __UNCONST(name);
- m.VFS_STATVFS1_BUF = (char *) buffer;
- m.VFS_STATVFS1_FLAGS = flags;
+ m.m_lc_vfs_statvfs1.len = strlen(name) + 1;
+ m.m_lc_vfs_statvfs1.name = (vir_bytes)name;
+ m.m_lc_vfs_statvfs1.buf = (vir_bytes)buffer;
+ m.m_lc_vfs_statvfs1.flags = flags;
return(_syscall(VFS_PROC_NR, VFS_STATVFS1, &m));
}
vir_bytes vname1, statbuf;
size_t vname1_length;
- vname1 = (vir_bytes) job_m_in.VFS_STATVFS1_NAME;
- vname1_length = (size_t) job_m_in.VFS_STATVFS1_LEN;
- statbuf = (vir_bytes) job_m_in.VFS_STATVFS1_BUF;
- flags = job_m_in.VFS_STATVFS1_FLAGS;
+ vname1 = job_m_in.m_lc_vfs_statvfs1.name;
+ vname1_length = job_m_in.m_lc_vfs_statvfs1.len;
+ statbuf = job_m_in.m_lc_vfs_statvfs1.buf;
+ flags = job_m_in.m_lc_vfs_statvfs1.flags;
lookup_init(&resolve, fullpath, PATH_NOFLAGS, &vmp, &vp);
resolve.l_vmnt_lock = VMNT_READ;
int r, rfd, flags;
vir_bytes statbuf;
- rfd = job_m_in.VFS_STATVFS1_FD;
- statbuf = (vir_bytes) job_m_in.VFS_STATVFS1_BUF;
- flags = job_m_in.VFS_STATVFS1_FLAGS;
+ rfd = job_m_in.m_lc_vfs_statvfs1.fd;
+ statbuf = job_m_in.m_lc_vfs_statvfs1.buf;
+ flags = job_m_in.m_lc_vfs_statvfs1.flags;
/* Is the file descriptor valid? */
if ((rfilp = get_filp(rfd, VNODE_READ)) == NULL) return(err_code);