From aa958b4d6e9e63c989dc11cfc152bd60a2bc3371 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Wed, 30 Sep 2015 22:13:21 +0200 Subject: signaltest: call process_options before calling check_privs Call process_options beforeing checking priviledges so that process_options can display help for a normal user as designed. This was already fixed in cyclictest. I also tested everywhere else to make sure this is now fixed everywhere. I fixed some small white spaces problems at the same time. Signed-off-by: John Kacur --- src/signaltest/signaltest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c index 61259a0..791df0e 100644 --- a/src/signaltest/signaltest.c +++ b/src/signaltest/signaltest.c @@ -317,18 +317,18 @@ int main(int argc, char **argv) struct thread_stat *stat; int i, ret = -1; + process_options(argc, argv); + if (check_privs()) exit(-1); - process_options(argc, argv); - /* lock all memory (prevent paging) */ if (lockall) if (mlockall(MCL_CURRENT|MCL_FUTURE) == -1) { perror("mlockall"); goto out; } - + check_kernel(); sigemptyset(&sigset); -- cgit 1.2.3-korg