From 25781d86ba6d19fd45d95cc35b588d025b4a99cc Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Sat, 21 Aug 2010 11:57:10 +0300 Subject: [PATCH] Parser: Remove support for parsing processes by name This is no longer needed since process names are converted to pids already in main.c function. Signed-off-by: Timo Kokkonen --- pagemap.h | 1 - parse.c | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/pagemap.h b/pagemap.h index 3754063..4bb1302 100644 --- a/pagemap.h +++ b/pagemap.h @@ -102,7 +102,6 @@ struct process { #define PARSE_PID 0x1 #define PARSE_MAP_NAME 0x2 -#define PARSE_PROCESS_NAME 0x4 #define PARSE_DUMP 0x8 #define PARSE_NOADD_TREE 0x10 diff --git a/parse.c b/parse.c index 6434b72..b3c87e2 100644 --- a/parse.c +++ b/parse.c @@ -107,12 +107,6 @@ static int should_scan_process(struct parse_opts *opts, struct process *process) int match = 0; char *name; - if (is_parse_option(opts, PARSE_PROCESS_NAME)) { - name = get_name_by_pid(process->pid); - if (!strcmp(opts->name, name ? name : "")) - match = 1; - } - if (is_parse_option(opts, PARSE_PID)) { list_for_each_entry(pid, &opts->pidlist, list) { if (pid->pid == process->pid) { @@ -342,15 +336,6 @@ int scan_all_pids(struct pageframe *pf, struct process *process_list, int pid; int count = 0; - if (is_parse_option(opts, PARSE_PROCESS_NAME)) { - while ((pid = get_next_pid_by_name(&dir, opts->name))) { - count += read_pageframe_with_threads(pid, pf, - process_list, - opts); - } - dir = NULL; - } - if (is_parse_option(opts, PARSE_PID)) { list_for_each_entry(pidlist, &opts->pidlist, list) { count += read_pageframe_with_threads(pidlist->pid, pf, -- 2.45.0