qemu-e2k/bsd-user
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
..
freebsd
i386
netbsd
openbsd
sparc
sparc64
x86_64
bsd-mman.h
bsdload.c
elfload.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
errno_defs.h
main.c log: Fix qemu_set_log_filename() error handling 2016-06-20 16:39:08 +02:00
Makefile.objs
mmap.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
qemu.h cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
signal.c
strace.c
syscall_defs.h
syscall.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
uaccess.c