Message ID | 5355C202.9040603@gmail.com |
---|---|
State | New |
Headers | show |
22.04.2014 05:12, Chen Gang wrotr: > 'writeconfig' supports output to stdout (with '-'); when that happens, > we must not close stdout, or further command line options that also use > stdout will be impacted. (Although 'writeconfig' was copied from > 'readconfig', the latter does not have the problem because it does not > support reading from '-') Thanks, applied to -trivial. /mjt
diff --git a/vl.c b/vl.c index 9975e5a..215467f 100644 --- a/vl.c +++ b/vl.c @@ -3855,7 +3855,9 @@ int main(int argc, char **argv, char **envp) } } qemu_config_write(fp); - fclose(fp); + if (fp != stdout) { + fclose(fp); + } break; } case QEMU_OPTION_qtest: