aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/firejail/firejail.h2
-rw-r--r--src/firejail/main.c6
-rw-r--r--src/firejail/usage.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h
index d76a6c0ee..eb9287f2e 100644
--- a/src/firejail/firejail.h
+++ b/src/firejail/firejail.h
@@ -492,7 +492,7 @@ void tree(void);
492void top(void); 492void top(void);
493 493
494// usage.c 494// usage.c
495void print_version(void); 495void print_version(FILE *stream);
496void print_version_full(void); 496void print_version_full(void);
497void usage(void); 497void usage(void);
498 498
diff --git a/src/firejail/main.c b/src/firejail/main.c
index cc5345ee0..341bac058 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -2957,10 +2957,10 @@ int main(int argc, char **argv, char **envp) {
2957 } 2957 }
2958 EUID_ASSERT(); 2958 EUID_ASSERT();
2959 2959
2960 // Note: Only attempt to print non-debug information to stdout after 2960 // Note: Only attempt to print non-debug information after all profiles
2961 // all profiles have been loaded (because a profile may set arg_quiet) 2961 // have been loaded (because a profile may set arg_quiet)
2962 if (!arg_quiet) 2962 if (!arg_quiet)
2963 print_version(); 2963 print_version(stderr);
2964 2964
2965 // block X11 sockets 2965 // block X11 sockets
2966 if (arg_x11_block) 2966 if (arg_x11_block)
diff --git a/src/firejail/usage.c b/src/firejail/usage.c
index beedb3ce2..8598abd9d 100644
--- a/src/firejail/usage.c
+++ b/src/firejail/usage.c
@@ -320,16 +320,16 @@ static const char *const usage_str =
320 "License GPL version 2 or later\n" 320 "License GPL version 2 or later\n"
321 "Homepage: https://firejail.wordpress.com\n"; 321 "Homepage: https://firejail.wordpress.com\n";
322 322
323void print_version(void) { 323void print_version(FILE *stream) {
324 printf("firejail version %s\n\n", VERSION); 324 fprintf(stream, "firejail version %s\n\n", VERSION);
325} 325}
326 326
327void print_version_full(void) { 327void print_version_full(void) {
328 print_version(); 328 print_version(stdout);
329 print_compiletime_support(); 329 print_compiletime_support();
330} 330}
331 331
332void usage(void) { 332void usage(void) {
333 print_version(); 333 print_version(stdout);
334 puts(usage_str); 334 puts(usage_str);
335} 335}