qemu-irix/include/qemu
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
..
acl.h
atomic.h atomics: do not emit consume barrier for atomic_rcu_read 2016-05-29 09:11:11 +02:00
base64.h
bcd.h
bitmap.h all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
bitops.h bitops.h: Implement half-shuffle and half-unshuffle ops 2016-06-17 15:23:51 +01:00
bswap.h
buffer.h
compatfd.h
compiler.h compiler.h: add QEMU_ALIGNED() to enforce struct alignment 2016-06-11 22:59:33 +00:00
config-file.h
coroutine.h
coroutine_int.h
crc32c.h
cutils.h
envlist.h
error-report.h
event_notifier.h
fifo8.h
fifo32.h hw: Clean up includes 2016-06-07 18:19:23 +03:00
fprintf-fn.h
hbitmap.h
help_option.h
host-utils.h host-utils: Prefer 'false' for bool type 2016-06-07 18:19:24 +03:00
id.h
int128.h
iov.h
log.h log: Fix qemu_set_log_filename() error handling 2016-06-20 16:39:08 +02:00
main-loop.h
memfd.h
mmap-alloc.h
module.h
notify.h
option.h
option_int.h
osdep.h os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
path.h
processor.h include/processor.h: define cpu_relax() 2016-06-11 23:10:17 +00:00
qdist.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
qht.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
queue.h
range.h
ratelimit.h
rcu.h all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
rcu_queue.h
readline.h
rfifolock.h
seqlock.h seqlock: rename write_lock/unlock to write_begin/end 2016-06-11 22:59:34 +00:00
sockets.h
thread-posix.h
thread-win32.h
thread.h qemu-thread: add simple test-and-set spinlock 2016-06-11 23:10:18 +00:00
throttle.h
timed-average.h
timer.h
typedefs.h migration: delete QEMUSizedBuffer struct 2016-05-26 11:31:58 +05:30
unicode.h
uri.h
xattr.h