qemu-e2k/trace
Markus Armbruster daa76aa416 log: Fix qemu_set_log_filename() error handling
When qemu_set_log_filename() detects an invalid file name, it reports
an error, closes the log file (if any), and starts logging to stderr
(unless daemonized or nothing is being logged).

This is wrong.  Asking for an invalid log file on the command line
should be fatal.  Asking for one in the monitor should fail without
messing up an existing logfile.

Fix by converting qemu_set_log_filename() to Error.  Pass it
&error_fatal, except for hmp_logfile report errors.

This also permits testing without a subprocess, so do that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1466011636-6112-4-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2016-06-20 16:39:08 +02:00
..
control-internal.h all: Clean up includes 2016-02-23 12:43:05 +00:00
control.c log: Fix qemu_set_log_filename() error handling 2016-06-20 16:39:08 +02:00
control.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
event-internal.h trace: track enabled events in a separate array 2016-02-03 09:19:09 +00:00
ftrace.c all: Clean up includes 2016-02-04 17:41:30 +00:00
ftrace.h all: Clean up includes 2016-02-23 12:43:05 +00:00
Makefile.objs trace: add make dependencies on tracetool source 2016-01-07 16:59:56 +08:00
qmp.c Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
simple.c Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
simple.h all: Clean up includes 2016-02-23 12:43:05 +00:00