/* Field names for the getmcontext(2)/setmcontext(2) calls. */
#define PM_MCONTEXT_CTX m1_p1 /* mcontext_t * */
-/* Field names for the reboot(2) call. */
-#define PM_REBOOT_HOW m1_i1 /* int */
-
/*===========================================================================*
* Calls to VFS *
*===========================================================================*/
} mess_pm_lc_ptrace;
_ASSERT_MSG_SIZE(mess_pm_lc_ptrace);
+typedef struct {
+ int how;
+
+ uint8_t padding[52];
+} mess_lc_pm_reboot;
+_ASSERT_MSG_SIZE(mess_lc_pm_reboot);
+
typedef struct {
int req;
int field;
mess_lc_pm_itimer m_lc_pm_itimer;
mess_lc_pm_priority m_lc_pm_priority;
mess_lc_pm_ptrace m_lc_pm_ptrace;
+ mess_lc_pm_reboot m_lc_pm_reboot;
mess_lc_pm_sysuname m_lc_pm_sysuname;
mess_lc_pm_time m_lc_pm_time;
mess_lc_pm_waitpid m_lc_pm_waitpid;
message m;
memset(&m, 0, sizeof(m));
- m.PM_REBOOT_HOW = how;
+ m.m_lc_pm_reboot.how = how;
return _syscall(PM_PROC_NR, PM_REBOOT, &m);
}
if (mp->mp_effuid != SUPER_USER) return(EPERM);
/* See how the system should be aborted. */
- abort_flag = (unsigned) m_in.PM_REBOOT_HOW;
+ abort_flag = m_in.m_lc_pm_reboot.how;
/* notify readclock (some arm systems power off via RTC alarms) */
if (abort_flag & RB_POWERDOWN) {