#define NR_VFS_CALLS 49 /* highest number from base plus one */
-/* Field names for the stat(2) and lstat(2) calls. */
-#define VFS_STAT_NAME m1_p1 /* const char * */
-#define VFS_STAT_LEN m1_i1 /* size_t */
-#define VFS_STAT_BUF m1_p2 /* struct stat * */
-
/* Field names for the fstat(2) call. */
#define VFS_FSTAT_FD m1_i1 /* int */
#define VFS_FSTAT_BUF m1_p1 /* struct stat * */
} mess_lc_vfs_select;
_ASSERT_MSG_SIZE(mess_lc_vfs_select);
+typedef struct {
+ size_t len;
+ vir_bytes name; /* const char * */
+ vir_bytes buf; /* struct stat * */
+
+ uint8_t padding[44];
+} mess_lc_vfs_stat;
+_ASSERT_MSG_SIZE(mess_lc_vfs_stat);
+
typedef struct {
int fd;
int flags;
mess_lc_vfs_pipe2 m_lc_vfs_pipe2;
mess_lc_vfs_readlink m_lc_vfs_readlink;
mess_lc_vfs_select m_lc_vfs_select;
+ mess_lc_vfs_stat m_lc_vfs_stat;
mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
mess_lc_vfs_truncate m_lc_vfs_truncate;
mess_lc_vfs_umask m_lc_vfs_umask;
message m;
memset(&m, 0, sizeof(m));
- m.VFS_STAT_LEN = strlen(name) + 1;
- m.VFS_STAT_NAME = (char *) __UNCONST(name);
- m.VFS_STAT_BUF = (char *) buffer;
+ m.m_lc_vfs_stat.len = strlen(name) + 1;
+ m.m_lc_vfs_stat.name = (vir_bytes)name;
+ m.m_lc_vfs_stat.buf = (vir_bytes)buffer;
return _syscall(VFS_PROC_NR, VFS_STAT, &m);
}
message m;
memset(&m, 0, sizeof(m));
- m.VFS_STAT_LEN = strlen(name) + 1;
- m.VFS_STAT_NAME = (char *) __UNCONST(name);
- m.VFS_STAT_BUF = (char *) buffer;
+ m.m_lc_vfs_stat.len = strlen(name) + 1;
+ m.m_lc_vfs_stat.name = (vir_bytes)name;
+ m.m_lc_vfs_stat.buf = (vir_bytes)buffer;
return _syscall(VFS_PROC_NR, VFS_LSTAT, &m);
}
vir_bytes vname1, statbuf;
size_t vname1_length;
- vname1 = (vir_bytes) job_m_in.VFS_STAT_NAME;
- vname1_length = (size_t) job_m_in.VFS_STAT_LEN;
- statbuf = (vir_bytes) job_m_in.VFS_STAT_BUF;
+ vname1 = job_m_in.m_lc_vfs_stat.name;
+ vname1_length = job_m_in.m_lc_vfs_stat.len;
+ statbuf = job_m_in.m_lc_vfs_stat.buf;
lookup_init(&resolve, fullpath, PATH_NOFLAGS, &vmp, &vp);
resolve.l_vmnt_lock = VMNT_READ;
vir_bytes vname1, statbuf;
size_t vname1_length;
- vname1 = (vir_bytes) job_m_in.VFS_STAT_NAME;
- vname1_length = (size_t) job_m_in.VFS_STAT_LEN;
- statbuf = (vir_bytes) job_m_in.VFS_STAT_BUF;
+ vname1 = job_m_in.m_lc_vfs_stat.name;
+ vname1_length = job_m_in.m_lc_vfs_stat.len;
+ statbuf = job_m_in.m_lc_vfs_stat.buf;
lookup_init(&resolve, fullpath, PATH_RET_SYMLINK, &vmp, &vp);
resolve.l_vmnt_lock = VMNT_READ;