Print ipc_to in hex. Also print the 'system' call mask.
This commit is contained in:
parent
777dbbe3f7
commit
8dfac43a75
@ -353,8 +353,7 @@ PUBLIC void privileges_dmp()
|
|||||||
register struct proc *rp;
|
register struct proc *rp;
|
||||||
static struct proc *oldrp = BEG_PROC_ADDR;
|
static struct proc *oldrp = BEG_PROC_ADDR;
|
||||||
register struct priv *sp;
|
register struct priv *sp;
|
||||||
static char ipc_to[NR_SYS_PROCS + 1 + NR_SYS_PROCS/8];
|
int r, i, n = 0;
|
||||||
int r, i,j, n = 0;
|
|
||||||
|
|
||||||
/* First obtain a fresh copy of the current process and system table. */
|
/* First obtain a fresh copy of the current process and system table. */
|
||||||
if ((r = sys_getprivtab(priv)) != OK) {
|
if ((r = sys_getprivtab(priv)) != OK) {
|
||||||
@ -366,7 +365,7 @@ PUBLIC void privileges_dmp()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n--nr-id-name---- -flags- -traps- grants -ipc_to mask- ----------------- \n");
|
printf("\n--nr-id-name---- -flags- -traps- grants -ipc_to-- -system calls--\n");
|
||||||
|
|
||||||
for (rp = oldrp; rp < END_PROC_ADDR; rp++) {
|
for (rp = oldrp; rp < END_PROC_ADDR; rp++) {
|
||||||
if (isemptyp(rp)) continue;
|
if (isemptyp(rp)) continue;
|
||||||
@ -380,17 +379,20 @@ PUBLIC void privileges_dmp()
|
|||||||
if (r == -1 && ! (rp->p_rts_flags & SLOT_FREE)) {
|
if (r == -1 && ! (rp->p_rts_flags & SLOT_FREE)) {
|
||||||
sp = &priv[USER_PRIV_ID];
|
sp = &priv[USER_PRIV_ID];
|
||||||
}
|
}
|
||||||
printf("(%02u) %-7.7s %s %s %7d ",
|
printf("(%02u) %-7.7s %s %s %7d",
|
||||||
sp->s_id, rp->p_name,
|
sp->s_id, rp->p_name,
|
||||||
s_flags_str(sp->s_flags), s_traps_str(sp->s_trap_mask),
|
s_flags_str(sp->s_flags), s_traps_str(sp->s_trap_mask),
|
||||||
sp->s_grant_entries);
|
sp->s_grant_entries);
|
||||||
for (i=j=0; i < NR_SYS_PROCS; i++, j++) {
|
for (i=0; i < NR_SYS_PROCS; i += BITCHUNK_BITS) {
|
||||||
ipc_to[j] = get_sys_bit(sp->s_ipc_to, i) ? '1' : '0';
|
printf(" %04x", get_sys_bits(sp->s_ipc_to, i));
|
||||||
if (i % 8 == 7) ipc_to[++j] = ' ';
|
|
||||||
}
|
}
|
||||||
ipc_to[j] = '\0';
|
|
||||||
|
|
||||||
printf(" %s\n", ipc_to);
|
printf(" ");
|
||||||
|
for (i=0; i < NR_SYS_CALLS; i += BITCHUNK_BITS) {
|
||||||
|
printf(" %04x", sp->s_k_call_mask[i/BITCHUNK_BITS]);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (rp == END_PROC_ADDR) rp = BEG_PROC_ADDR; else printf("--more--\r");
|
if (rp == END_PROC_ADDR) rp = BEG_PROC_ADDR; else printf("--more--\r");
|
||||||
oldrp = rp;
|
oldrp = rp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user