_ASSERT_MSG_SIZE(mess_lc_vfs_path);
typedef struct {
- int fd0;
- int fd1;
+ /*
+ * We are in the process of cleaning up this message, by moving the
+ * flags value from the third integer into the first. Once enough time
+ * has passed, we can get rid of the second and third integer fields.
+ */
int flags;
+ int _unused;
+ int oflags;
uint8_t padding[44];
} mess_lc_vfs_pipe2;
} mess_vfs_fs_utime;
_ASSERT_MSG_SIZE(mess_vfs_fs_utime);
+typedef struct {
+ int fd0;
+ int fd1;
+
+ uint8_t padding[48];
+} mess_vfs_lc_fdpair;
+_ASSERT_MSG_SIZE(mess_vfs_lc_fdpair);
+
typedef struct {
off_t offset;
mess_vfs_fs_statvfs m_vfs_fs_statvfs;
mess_vfs_fs_unlink m_vfs_fs_unlink;
mess_vfs_fs_utime m_vfs_fs_utime;
+ mess_vfs_lc_fdpair m_vfs_lc_fdpair;
mess_vfs_lc_lseek m_vfs_lc_lseek;
mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
memset(&m, 0, sizeof(m));
m.m_lc_vfs_pipe2.flags = flags;
+ m.m_lc_vfs_pipe2.oflags = flags; /* backward compatibility */
if (_syscall(VFS_PROC_NR, VFS_PIPE2, &m) < 0) return(-1);
- fild[0] = m.m_lc_vfs_pipe2.fd0;
- fild[1] = m.m_lc_vfs_pipe2.fd1;
+ fild[0] = m.m_vfs_lc_fdpair.fd0;
+ fild[1] = m.m_vfs_lc_fdpair.fd1;
return(0);
}
int fil_des[2]; /* reply goes here */
flags = job_m_in.m_lc_vfs_pipe2.flags;
+ flags |= job_m_in.m_lc_vfs_pipe2.oflags; /* backward compatibility */
r = create_pipe(fil_des, flags);
if (r == OK) {
- job_m_out.m_lc_vfs_pipe2.fd0 = fil_des[0];
- job_m_out.m_lc_vfs_pipe2.fd1 = fil_des[1];
+ job_m_out.m_vfs_lc_fdpair.fd0 = fil_des[0];
+ job_m_out.m_vfs_lc_fdpair.fd1 = fil_des[1];
}
return r;
if (!failed) {
put_open(proc, "fd", PF_NONAME, "[", ", ");
- put_fd(proc, "rfd", m_in->m_lc_vfs_pipe2.fd0);
- put_fd(proc, "wfd", m_in->m_lc_vfs_pipe2.fd1);
+ put_fd(proc, "rfd", m_in->m_vfs_lc_fdpair.fd0);
+ put_fd(proc, "wfd", m_in->m_vfs_lc_fdpair.fd1);
put_close(proc, "]");
} else
put_field(proc, "fd", "&..");