From 9402f4416a14a399de62956137b38aceec89495e Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Thu, 29 Sep 2011 20:58:09 +0300 Subject: [PATCH] main: Set a reasonable default function if no arguments are given A very useful way to use scan-pagemap is to simply print out memory usage of all processes on the system. Let this be the default behavior of the program if no other options are given. Signed-off-by: Timo Kokkonen --- main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 31fc863..10f1a9e 100644 --- a/main.c +++ b/main.c @@ -163,9 +163,8 @@ int main(int argc, char *argv[]) read_args(argc, argv, &opts); if (argc < 2) { - printf("A pid or process name " - "needs to be given as an argument\n"); - print_help_and_die(argv[0]); + opts.parse_mask = PARSE_MAP_NAME; + opts.name = ""; } clear_pageframe(&pf); -- 2.44.0