qemu/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 bsd-user: Fix syscall format, add strace support for more syscalls 2014-06-11 00:25:06 +01:00
i386 build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-25 16:41:08 +00:00
netbsd
openbsd
sparc build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-25 16:41:08 +00:00
sparc64 build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-25 16:41:08 +00:00
x86_64 build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories 2016-02-25 16:41:08 +00:00
bsd-mman.h
bsdload.c bsd-user: Clean up includes 2016-02-04 17:01:04 +00:00
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 build: move *-user/ objects to nested Makefile.objs 2012-06-07 07:17:33 +02:00
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 bsd-user: Clean up includes 2016-02-04 17:01:04 +00:00
strace.c bsd-user: Clean up includes 2016-02-04 17:01:04 +00:00
syscall_defs.h
syscall.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
uaccess.c bsd-user: Suppress gcc 4.x -Wpointer-sign (included in -Wall) warning 2016-04-05 17:49:41 +01:00