summaryrefslogtreecommitdiff
path: root/x86info.c
diff options
context:
space:
mode:
Diffstat (limited to 'x86info.c')
-rw-r--r--x86info.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/x86info.c b/x86info.c
index 9c0ca27..0ba96c3 100644
--- a/x86info.c
+++ b/x86info.c
@@ -333,8 +333,10 @@ int main (int argc, char **argv)
if (getuid() != 0)
user_is_root=0;
- if (need_root && !user_is_root)
+ if (need_root && !user_is_root) {
printf("Need to be root to use specified options.\n");
+ exit(EXIT_FAILURE);
+ }
nrCPUs = sysconf(_SC_NPROCESSORS_ONLN);