From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtKSM-0007tu-P7 for qemu-devel@nongnu.org; Fri, 03 Feb 2012 09:49:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtKSE-0001Tz-VV for qemu-devel@nongnu.org; Fri, 03 Feb 2012 09:49:42 -0500 Received: from afflict.kos.to ([92.243.29.197]:49801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtKSE-0001TZ-Li for qemu-devel@nongnu.org; Fri, 03 Feb 2012 09:49:34 -0500 From: riku.voipio@linaro.org Date: Fri, 3 Feb 2012 16:49:20 +0200 Message-Id: <50171d42071d492b916f737b227bc6f3751fee7c.1328280144.git.riku.voipio@linaro.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 07/19] linux-user/main.c: Add option to user-mode emulation so that user can specify log file name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?=E9=99=B3=E9=9F=8B=E4=BB=BB?= From: =E9=99=B3=E9=9F=8B=E4=BB=BB QEMU linux user-mode's default log file name is "/tmp/qemu.log". In ord= er to change the log file name, user need to modify the source code then recomp= ile QEMU. This patch allow user use "-D logfile" option to specify the log fi= le name. Signed-off-by: Chen Wen-Ren Signed-off-by: Riku Voipio --- linux-user/main.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 64d2208..14bf5f0 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2945,6 +2945,11 @@ static void handle_arg_log(const char *arg) cpu_set_log(mask); } =20 +static void handle_arg_log_filename(const char *arg) +{ + cpu_set_log_filename(arg); +} + static void handle_arg_set_env(const char *arg) { char *r, *p, *token; @@ -3125,6 +3130,8 @@ struct qemu_argument arg_table[] =3D { #endif {"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, --=20 1.7.5.4