#define NR_VFS_CALLS 49 /* highest number from base plus one */
-/* Field names for the pipe2(2) call. */
-#define VFS_PIPE2_FD0 m1_i1 /* int */
-#define VFS_PIPE2_FD1 m1_i2 /* int */
-#define VFS_PIPE2_FLAGS m1_i3 /* int */
-
/* Field names for the umask(2) call. */
#define VFS_UMASK_MASK m1_i1 /* mode_t */
} mess_lc_vfs_mount;
_ASSERT_MSG_SIZE(mess_lc_vfs_mount);
+typedef struct {
+ int fd0;
+ int fd1;
+ int flags;
+
+ uint8_t padding[44];
+} mess_lc_vfs_pipe2;
+_ASSERT_MSG_SIZE(mess_lc_vfs_pipe2);
+
typedef struct {
uint32_t nfds;
fd_set *readfds;
mess_lc_vfs_ioctl m_lc_vfs_ioctl;
mess_lc_vfs_lseek m_lc_vfs_lseek;
mess_lc_vfs_mount m_lc_vfs_mount;
+ mess_lc_vfs_pipe2 m_lc_vfs_pipe2;
mess_lc_vfs_select m_lc_vfs_select;
mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
mess_lc_vfs_truncate m_lc_vfs_truncate;
message m;
memset(&m, 0, sizeof(m));
- m.VFS_PIPE2_FLAGS = flags;
+ m.m_lc_vfs_pipe2.flags = flags;
if (_syscall(VFS_PROC_NR, VFS_PIPE2, &m) < 0) return(-1);
- fild[0] = m.VFS_PIPE2_FD0;
- fild[1] = m.VFS_PIPE2_FD1;
+ fild[0] = m.m_lc_vfs_pipe2.fd0;
+ fild[1] = m.m_lc_vfs_pipe2.fd1;
return(0);
}
int r, flags;
int fil_des[2]; /* reply goes here */
- flags = job_m_in.VFS_PIPE2_FLAGS;
+ flags = job_m_in.m_lc_vfs_pipe2.flags;
r = create_pipe(fil_des, flags);
if (r == OK) {
- job_m_out.VFS_PIPE2_FD0 = fil_des[0];
- job_m_out.VFS_PIPE2_FD1 = fil_des[1];
+ job_m_out.m_lc_vfs_pipe2.fd0 = fil_des[0];
+ job_m_out.m_lc_vfs_pipe2.fd1 = fil_des[1];
}
return r;