]> git.itanic.dy.fi Git - scan-pagemap/blobdiff - main.c
Show full process argument list instead only executable name
[scan-pagemap] / main.c
diff --git a/main.c b/main.c
index 10f1a9eb5c21e1ad4b5ee690b400a52ceffd1ce9..e092874b10e082e9502e92eabd23bef590653026 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Timo Kokkonen <kaapeli@itanic.dy.fi>
+ * Copyright (C) 2010 Timo Kokkonen <timo.t.kokkonen@iki.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -149,7 +149,7 @@ void read_args(int argc, char *argv[], struct parse_opts *opts)
 
 int main(int argc, char *argv[])
 {
-       struct pageframe pf;
+       struct rb_root root;
        struct process process_list;
        struct parse_opts opts;
 
@@ -167,22 +167,25 @@ int main(int argc, char *argv[])
                opts.name = "";
        }
 
-       clear_pageframe(&pf);
-
+       memset(&root, 0, sizeof(root));
        memset(&process_list, 0, sizeof(process_list));
        INIT_LIST_HEAD(&process_list.list);
 
-       if (scan_all_pids(&pf, &process_list, &opts))
+       printf("Scanning all process IDs\n");
+
+       if (scan_all_pids(&root, &process_list, &opts))
                return 1;
 
-       update_kpageflags(&pf);
+       printf("Updating kpageflags\n");
+       update_kpageflags(&root);
 
+       printf("Preparing to print out results\n");
        if (opts.parse_mask & PARSE_DUMP)
-               dump_process_maps(&pf, &process_list, &opts);
+               dump_process_maps(&root, &process_list, &opts);
        else
-               print_pid_stats(&pf, &process_list, &opts);
+               print_pid_stats(&root, &process_list, &opts);
 
-       print_page_stats(&pf);
+       print_page_stats(&root);
 
        return 0;
 }