/* Field names for the exit(2) call. */
#define PM_EXIT_STATUS m1_i1 /* int */
-/* Field names for the execve(2) call. */
-#define PM_EXEC_NAME m1_p1 /* const char * */
-#define PM_EXEC_NAMELEN m1_i1 /* size_t */
-#define PM_EXEC_FRAME m1_p2 /* char * */
-#define PM_EXEC_FRAMELEN m1_i2 /* size_t */
-#define PM_EXEC_PS_STR m1_p3 /* char * */
-
/* Field names for the kill(2), srv_kill(2), and sigaction(2) calls. */
#define PM_SIG_PID m1_i1 /* pid_t */
#define PM_SIG_NR m1_i2 /* int */
} mess_sigcalls;
_ASSERT_MSG_SIZE(mess_sigcalls);
+typedef struct {
+ vir_bytes name;
+ size_t namelen;
+ vir_bytes frame;
+ size_t framelen;
+ vir_bytes ps_str;
+
+ uint8_t padding[36];
+} mess_lc_pm_exec;
+_ASSERT_MSG_SIZE(mess_lc_pm_exec);
+
typedef struct {
pid_t pid;
mess_fs_vfs_readsuper m_fs_vfs_readsuper;
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
+ mess_lc_pm_exec m_lc_pm_exec;
mess_lc_pm_getsid m_lc_pm_getsid;
mess_lc_pm_groups m_lc_pm_groups;
mess_lc_pm_itimer m_lc_pm_itimer;
memset(&m, 0, sizeof(m));
/* We can finally make the system call. */
- m.PM_EXEC_NAME = (char *) __UNCONST(path);
- m.PM_EXEC_NAMELEN = strlen(path) + 1;
- m.PM_EXEC_FRAME = frame;
- m.PM_EXEC_FRAMELEN = frame_size;
- m.PM_EXEC_PS_STR = (char *)(vsp + ((char *)psp - frame));
+ m.m_lc_pm_exec.name = (vir_bytes)path;
+ m.m_lc_pm_exec.namelen = strlen(path) + 1;
+ m.m_lc_pm_exec.frame = (vir_bytes)frame;
+ m.m_lc_pm_exec.framelen = frame_size;
+ m.m_lc_pm_exec.ps_str = (vir_bytes)(vsp + ((char *)psp - frame));
(void) _syscall(PM_PROC_NR, PM_EXEC, &m);
memset(&m, 0, sizeof(m));
m.m_type = VFS_PM_EXEC;
m.VFS_PM_ENDPT = mp->mp_endpoint;
- m.VFS_PM_PATH = m_in.PM_EXEC_NAME;
- m.VFS_PM_PATH_LEN = m_in.PM_EXEC_NAMELEN;
- m.VFS_PM_FRAME = m_in.PM_EXEC_FRAME;
- m.VFS_PM_FRAME_LEN = m_in.PM_EXEC_FRAMELEN;
- m.VFS_PM_PS_STR = (vir_bytes) m_in.PM_EXEC_PS_STR;
+ m.VFS_PM_PATH = (void *)m_in.m_lc_pm_exec.name;
+ m.VFS_PM_PATH_LEN = m_in.m_lc_pm_exec.namelen;
+ m.VFS_PM_FRAME = (void *)m_in.m_lc_pm_exec.frame;
+ m.VFS_PM_FRAME_LEN = m_in.m_lc_pm_exec.framelen;
+ m.VFS_PM_PS_STR = m_in.m_lc_pm_exec.ps_str;
tell_vfs(mp, &m);