Commit 50171d42 authored by 陳韋任's avatar 陳韋任 Committed by Riku Voipio

linux-user/main.c: Add option to user-mode emulation so that user can specify log file name

  QEMU linux user-mode's default log file name is "/tmp/qemu.log". In order to
change the log file name, user need to modify the source code then recompile
QEMU. This patch allow user use "-D logfile" option to specify the log file
Signed-off-by: default avatarChen Wen-Ren <>
Signed-off-by: default avatarRiku Voipio <>
parent 257450ee
......@@ -2945,6 +2945,11 @@ static void handle_arg_log(const char *arg)
static void handle_arg_log_filename(const char *arg)
static void handle_arg_set_env(const char *arg)
char *r, *p, *token;
......@@ -3125,6 +3130,8 @@ struct qemu_argument arg_table[] = {
{"d", "QEMU_LOG", true, handle_arg_log,
"options", "activate log"},
{"D", "QEMU_LOG_FILENAME", true, handle_arg_log_filename,
"logfile", "override default logfile location"},
{"p", "QEMU_PAGESIZE", true, handle_arg_pagesize,
"pagesize", "set the host page size to 'pagesize'"},
{"singlestep", "QEMU_SINGLESTEP", false, handle_arg_singlestep,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment