rename PTQL_PID_SERVICE -> PTQL_PID_SERVICE_NAME

This commit is contained in:
Doug MacEachern 2008-03-26 21:31:54 +00:00
parent 746b9bdddc
commit 5df4850bf3

View File

@ -664,7 +664,7 @@ static int ptql_branch_match_ref(ptql_branch_t *branch, ptql_branch_t *ref)
enum { enum {
PTQL_PID_PID, PTQL_PID_PID,
PTQL_PID_FILE, PTQL_PID_FILE,
PTQL_PID_SERVICE, PTQL_PID_SERVICE_NAME,
PTQL_PID_SERVICE_DISPLAY, PTQL_PID_SERVICE_DISPLAY,
PTQL_PID_SERVICE_PATH PTQL_PID_SERVICE_PATH
}; };
@ -692,7 +692,7 @@ static int ptql_branch_init_service(ptql_parse_branch_t *parsed,
branch->op_flags |= PTQL_OP_FLAG_PID; branch->op_flags |= PTQL_OP_FLAG_PID;
if (strEQ(parsed->attr, "Name")) { if (strEQ(parsed->attr, "Name")) {
branch->flags = PTQL_PID_SERVICE; branch->flags = PTQL_PID_SERVICE_NAME;
} }
else if (strEQ(parsed->attr, "DisplayName")) { else if (strEQ(parsed->attr, "DisplayName")) {
branch->flags = PTQL_PID_SERVICE_DISPLAY; branch->flags = PTQL_PID_SERVICE_DISPLAY;
@ -809,7 +809,7 @@ static int sigar_services_walk(sigar_services_walker_t *walker,
continue; continue;
} }
break; break;
case PTQL_PID_SERVICE: case PTQL_PID_SERVICE_NAME:
default: default:
value = name; value = name;
break; break;
@ -910,7 +910,7 @@ static int ptql_pid_get(sigar_t *sigar,
return errno; return errno;
} }
} }
else if (branch->flags == PTQL_PID_SERVICE) { else if (branch->flags == PTQL_PID_SERVICE_NAME) {
#ifdef WIN32 #ifdef WIN32
int status = int status =
sigar_service_pid_get(sigar, sigar_service_pid_get(sigar,
@ -936,8 +936,8 @@ static int ptql_pid_list_get(sigar_t *sigar,
int status, i; int status, i;
sigar_pid_t match_pid; sigar_pid_t match_pid;
if (branch->flags >= PTQL_PID_SERVICE) { if (branch->flags >= PTQL_PID_SERVICE_NAME) {
if ((branch->flags > PTQL_PID_SERVICE) || if ((branch->flags > PTQL_PID_SERVICE_NAME) ||
(branch->op_name != PTQL_OP_EQ)) (branch->op_name != PTQL_OP_EQ))
{ {
#ifdef WIN32 #ifdef WIN32