Message type for SVRCTL

Change-Id: Ibdb9edb9878e06cf2a641ffc3975f878a6e41dfb
This commit is contained in:
Lionel Sambuc 2014-05-19 11:25:52 +02:00
parent 6c313721d3
commit 948a5389f9
5 changed files with 16 additions and 10 deletions

View file

@ -1235,10 +1235,6 @@
#define SI_WHERE m1_p1 /* void */
#define SI_SIZE m1_i2 /* size_t */
/* Field names for the svrctl(2) call. */
#define SVRCTL_REQ m2_i1 /* int */
#define SVRCTL_ARG m2_p1 /* void * */
/*===========================================================================*
* Internal codes used by several services *
*===========================================================================*/

View file

@ -769,6 +769,14 @@ typedef struct {
} mess_lsys_sched_scheduling_stop;
_ASSERT_MSG_SIZE(mess_lsys_sched_scheduling_stop);
typedef struct {
int request;
vir_bytes arg;
uint8_t padding[48];
} mess_lsys_svrctl;
_ASSERT_MSG_SIZE(mess_lsys_svrctl);
typedef struct {
endpoint_t endpt;
cp_grant_id_t grant;
@ -1368,6 +1376,8 @@ typedef struct {
mess_lsys_sched_scheduling_start m_lsys_sched_scheduling_start;
mess_lsys_sched_scheduling_stop m_lsys_sched_scheduling_stop;
mess_lsys_svrctl m_lsys_svrctl;
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
mess_lsys_vfs_copyfd m_lsys_vfs_copyfd;
mess_lsys_vfs_mapdriver m_lsys_vfs_mapdriver;

View file

@ -11,8 +11,8 @@ int svrctl(int request, void *argp)
message m;
memset(&m, 0, sizeof(m));
m.SVRCTL_REQ = request;
m.SVRCTL_ARG = argp;
m.m_lsys_svrctl.request = request;
m.m_lsys_svrctl.arg = argp;
switch ((request >> 8) & 0xFF) {
case 'M':

View file

@ -305,8 +305,8 @@ int do_svrctl()
} local_param_overrides[MAX_LOCAL_PARAMS];
static int local_params = 0;
req = m_in.SVRCTL_REQ;
ptr = (vir_bytes) m_in.SVRCTL_ARG;
req = m_in.m_lsys_svrctl.request;
ptr = m_in.m_lsys_svrctl.arg;
/* Is the request indeed for the PM? */
if (((req >> 8) & 0xFF) != 'M') return(EINVAL);

View file

@ -779,8 +779,8 @@ int do_svrctl(void)
unsigned int svrctl;
vir_bytes ptr;
svrctl = job_m_in.SVRCTL_REQ;
ptr = (vir_bytes) job_m_in.SVRCTL_ARG;
svrctl = job_m_in.m_lsys_svrctl.request;
ptr = job_m_in.m_lsys_svrctl.arg;
if (((svrctl >> 8) & 0xFF) != 'M') return(EINVAL);
switch (svrctl) {