@@ -106,13 +106,17 @@ const char *qemu_uname_release;
106
106
by remapping the process stack directly at the right place */
107
107
unsigned long guest_stack_size = 8 * 1024 * 1024UL ;
108
108
109
+ static int silent ;
110
+
109
111
void gemu_log (const char * fmt , ...)
110
112
{
111
- va_list ap ;
113
+ if (!silent ) {
114
+ va_list ap ;
112
115
113
- va_start (ap , fmt );
114
- vfprintf (stderr , fmt , ap );
115
- va_end (ap );
116
+ va_start (ap , fmt );
117
+ vfprintf (stderr , fmt , ap );
118
+ va_end (ap );
119
+ }
116
120
}
117
121
118
122
#if defined(TARGET_I386 )
@@ -4575,6 +4579,11 @@ static void handle_arg_version(const char *arg)
4575
4579
exit (EXIT_SUCCESS );
4576
4580
}
4577
4581
4582
+ static void handle_arg_silent (const char * arg )
4583
+ {
4584
+ silent = 1 ;
4585
+ }
4586
+
4578
4587
static char * trace_file ;
4579
4588
static void handle_arg_trace (const char * arg )
4580
4589
{
@@ -4635,6 +4644,8 @@ static const struct qemu_argument arg_table[] = {
4635
4644
"" , "[[enable=]<pattern>][,events=<file>][,file=<file>]" },
4636
4645
{"version" , "QEMU_VERSION" , false, handle_arg_version ,
4637
4646
"" , "display version information and exit" },
4647
+ {"silent" , "" , false, handle_arg_silent ,
4648
+ "" , "silence all logging" },
4638
4649
{NULL , NULL , false, NULL , NULL , NULL }
4639
4650
};
4640
4651
0 commit comments