]> git.itanic.dy.fi Git - scan-pagemap/blobdiff - parse.c
parser: Avoid parsing pids completely when not necessary
[scan-pagemap] / parse.c
diff --git a/parse.c b/parse.c
index 2c493742371b01a1b2b652b81572fee2812de092..be38f2fd067fffc523a34fc8ca19c18640553563 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -381,7 +381,8 @@ int scan_all_pids(struct pageframe *pf, struct process *process_list,
        if (is_parse_option(opts, PARSE_DUMP))
                return 0;
 
-       if (is_parse_option(opts, PARSE_MAP_NAME)) {
+       if (is_parse_option(opts, PARSE_MAP_NAME) &&
+               !is_parse_option(opts, PARSE_PID)) {
                while (1) {
                        pid = get_next_pid(&dir);
                        if (pid <= 0)