qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH 2/2] linux-user/main.c: Add option to user-mode em


From: Chen Wen-Ren
Subject: [Qemu-trivial] [PATCH 2/2] linux-user/main.c: Add option to user-mode emulation so that user can specify log file name
Date: Sat, 5 Nov 2011 16:18:19 +0800

  Add an option so that user can specify the log file name they want.

Signed-off-by: Chen Wen-Ren <address@hidden>
---
 linux-user/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index d1bbc57..c275c0b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -45,6 +45,7 @@ int gdbstub_port;
 envlist_t *envlist;
 const char *cpu_model;
 unsigned long mmap_min_addr;
+extern const char *logfilename;
 #if defined(CONFIG_USE_GUEST_BASE)
 unsigned long guest_base;
 int have_guest_base;
@@ -2945,6 +2946,11 @@ static void handle_arg_log(const char *arg)
     cpu_set_log(mask);
 }
 
+static void handle_arg_log_filename(const char *arg)
+{
+    logfilename = arg;
+}
+
 static void handle_arg_set_env(const char *arg)
 {
     char *r, *p, *token;
@@ -3125,6 +3131,8 @@ struct qemu_argument arg_table[] = {
 #endif
     {"d",          "QEMU_LOG",         true,  handle_arg_log,
      "options",    "activate log"},
+    {"D",          "QEMU_LOG_FILENAME", true, handle_arg_log_filename,
+     "filename",   "specify log file name"},
     {"p",          "QEMU_PAGESIZE",    true,  handle_arg_pagesize,
      "pagesize",   "set the host page size to 'pagesize'"},
     {"singlestep", "QEMU_SINGLESTEP",  false, handle_arg_singlestep,
-- 
1.7.3.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]