Introduce sys_getregs call, and let vfs use it
This commit is contained in:
@@ -44,6 +44,7 @@ PUBLIC int do_getinfo(struct proc * caller, message * m_ptr)
|
||||
vir_bytes src_vir;
|
||||
int nr_e, nr, r;
|
||||
int wipe_rnd_bin = -1;
|
||||
struct proc *p;
|
||||
#if !defined(__ELF__)
|
||||
struct exec e_hdr;
|
||||
#endif
|
||||
@@ -112,6 +113,15 @@ PUBLIC int do_getinfo(struct proc * caller, message * m_ptr)
|
||||
src_vir = (vir_bytes) priv_addr(nr_to_id(nr));
|
||||
break;
|
||||
}
|
||||
case GET_REGS: {
|
||||
nr_e = (m_ptr->I_VAL_LEN2_E == SELF) ?
|
||||
caller->p_endpoint : m_ptr->I_VAL_LEN2_E;
|
||||
if(!isokendpt(nr_e, &nr)) return EINVAL; /* validate request */
|
||||
p = proc_addr(nr);
|
||||
length = sizeof(p->p_reg);
|
||||
src_vir = (vir_bytes) &p->p_reg;
|
||||
break;
|
||||
}
|
||||
case GET_WHOAMI: {
|
||||
int len;
|
||||
/* GET_WHOAMI uses m3 and only uses the message contents for info. */
|
||||
|
||||
Reference in New Issue
Block a user