From 337524a1be87b09404ab17fa00d3259967284351 Mon Sep 17 00:00:00 2001 From: lace <> Date: Sat, 16 Jun 2007 14:02:36 +0000 Subject: [PATCH] New state: STATE_DISK_SLEEP --- debugger.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/debugger.c b/debugger.c index ffea7de..fd6e0f7 100644 --- a/debugger.c +++ b/debugger.c @@ -88,6 +88,7 @@ enum state STATE_PTRACED, STATE_ZOMBIE, STATE_DEAD, + STATE_DISK_SLEEP, STATE_LAST }; @@ -95,14 +96,15 @@ static const char *state_to_name (enum state state) { switch (state) { - case STATE_INSTABLE: return "STATE_INSTABLE"; - case STATE_ENOENT: return "STATE_ENOENT"; - case STATE_SLEEPING: return "STATE_SLEEPING"; - case STATE_RUNNING: return "STATE_RUNNING"; - case STATE_STOPPED: return "STATE_STOPPED"; - case STATE_PTRACED: return "STATE_PTRACED"; - case STATE_ZOMBIE: return "STATE_ZOMBIE"; - case STATE_DEAD: return "STATE_DEAD"; + case STATE_INSTABLE: return "STATE_INSTABLE"; + case STATE_ENOENT: return "STATE_ENOENT"; + case STATE_SLEEPING: return "STATE_SLEEPING"; + case STATE_RUNNING: return "STATE_RUNNING"; + case STATE_STOPPED: return "STATE_STOPPED"; + case STATE_PTRACED: return "STATE_PTRACED"; + case STATE_ZOMBIE: return "STATE_ZOMBIE"; + case STATE_DEAD: return "STATE_DEAD"; + case STATE_DISK_SLEEP: return "STATE_DISK_SLEEP"; default: crash (); } /* NOTREACHED */ @@ -152,6 +154,8 @@ static enum state state_get (pid_t pid) /* FIXME: What does it mean? */ else if (strcmp (line + length, "X (dead)\n") == 0) found = STATE_DEAD; + else if (strcmp (line + length, "D (disk sleep)\n") == 0) + found = STATE_DISK_SLEEP; else { fprintf (stderr, "Found an unknown state: %s", line + length); -- 1.8.3.1