Skip to content
Snippets Groups Projects
Commit 19b1f638 authored by rsc's avatar rsc
Browse files

cleaner table

parent 453c6a65
No related branches found
No related tags found
No related merge requests found
......@@ -422,12 +422,12 @@ void
procdump(void)
{
static char *states[] = {
"unused",
"embryo",
"sleep ",
"runble",
"run ",
"zombie"
[UNUSED] "unused",
[EMBRYO] "embryo",
[SLEEPING] "sleep ",
[RUNNABLE] "runble",
[RUNNING] "run ",
[ZOMBIE] "zombie"
};
int i;
struct proc *p;
......@@ -437,10 +437,10 @@ procdump(void)
p = &proc[i];
if(p->state == UNUSED)
continue;
if(p->state < 0 || p->state > ZOMBIE)
state = "???";
else
if(p->state >= 0 && p->state < NELEM(states))
state = states[p->state];
else
state = "???";
cprintf("%d %s %s\n", p->pid, state, p->name);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment