qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PULL 2/3] linux-user: Do not report "syscall not implemented" by default
Date: Tue, 10 Jul 2018 08:23:51 +0200	[thread overview]
Message-ID: <20180710062352.9843-3-laurent@vivier.eu> (raw)
In-Reply-To: <20180710062352.9843-1-laurent@vivier.eu>

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

This can still be reported using the "-d unimp" command line option.

Code change produced with:

  git ls-files linux-user | \
  xargs sed -i -E 's/fprintf\(stderr,\s?(".*not implemented\\n")\);/qemu_log_mask(LOG_UNIMP, \1);/g'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180706155127.7483-3-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/cris/signal.c       | 4 ++--
 linux-user/microblaze/signal.c | 4 ++--
 linux-user/nios2/signal.c      | 2 +-
 linux-user/sparc/signal.c      | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/linux-user/cris/signal.c b/linux-user/cris/signal.c
index 0b405247cf..1e02194377 100644
--- a/linux-user/cris/signal.c
+++ b/linux-user/cris/signal.c
@@ -146,7 +146,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
                     target_siginfo_t *info,
                      target_sigset_t *set, CPUCRISState *env)
 {
-    fprintf(stderr, "CRIS setup_rt_frame: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "setup_rt_frame: not implemented\n");
 }
 
 long do_sigreturn(CPUCRISState *env)
@@ -183,6 +183,6 @@ badframe:
 long do_rt_sigreturn(CPUCRISState *env)
 {
     trace_user_do_rt_sigreturn(env, 0);
-    fprintf(stderr, "CRIS do_rt_sigreturn: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "do_rt_sigreturn: not implemented\n");
     return -TARGET_ENOSYS;
 }
diff --git a/linux-user/microblaze/signal.c b/linux-user/microblaze/signal.c
index 712ee522b2..80950c2181 100644
--- a/linux-user/microblaze/signal.c
+++ b/linux-user/microblaze/signal.c
@@ -200,7 +200,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
                     target_siginfo_t *info,
                     target_sigset_t *set, CPUMBState *env)
 {
-    fprintf(stderr, "Microblaze setup_rt_frame: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "setup_rt_frame: not implemented\n");
 }
 
 long do_sigreturn(CPUMBState *env)
@@ -240,6 +240,6 @@ badframe:
 long do_rt_sigreturn(CPUMBState *env)
 {
     trace_user_do_rt_sigreturn(env, 0);
-    fprintf(stderr, "Microblaze do_rt_sigreturn: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "do_rt_sigreturn: not implemented\n");
     return -TARGET_ENOSYS;
 }
diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c
index 4985dc2212..7d535065ed 100644
--- a/linux-user/nios2/signal.c
+++ b/linux-user/nios2/signal.c
@@ -203,7 +203,7 @@ give_sigsegv:
 long do_sigreturn(CPUNios2State *env)
 {
     trace_user_do_sigreturn(env, 0);
-    fprintf(stderr, "do_sigreturn: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "do_sigreturn: not implemented\n");
     return -TARGET_ENOSYS;
 }
 
diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
index 55e9d6f9b2..b4c60aa446 100644
--- a/linux-user/sparc/signal.c
+++ b/linux-user/sparc/signal.c
@@ -278,7 +278,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
                     target_siginfo_t *info,
                     target_sigset_t *set, CPUSPARCState *env)
 {
-    fprintf(stderr, "setup_rt_frame: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "setup_rt_frame: not implemented\n");
 }
 
 long do_sigreturn(CPUSPARCState *env)
@@ -357,7 +357,7 @@ segv_and_exit:
 long do_rt_sigreturn(CPUSPARCState *env)
 {
     trace_user_do_rt_sigreturn(env, 0);
-    fprintf(stderr, "do_rt_sigreturn: not implemented\n");
+    qemu_log_mask(LOG_UNIMP, "do_rt_sigreturn: not implemented\n");
     return -TARGET_ENOSYS;
 }
 
-- 
2.17.1

  parent reply	other threads:[~2018-07-10  6:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10  6:23 [Qemu-devel] [PULL 0/3] Linux user for 3.0 patches Laurent Vivier
2018-07-10  6:23 ` [Qemu-devel] [PULL 1/3] linux-user: Do not report "Unsupported syscall" by default Laurent Vivier
2018-07-10  6:23 ` Laurent Vivier [this message]
2018-07-10  6:23 ` [Qemu-devel] [PULL 3/3] linux-user: Report error message on stderr, rather than stdout Laurent Vivier
2018-07-10  9:51 ` [Qemu-devel] [PULL 0/3] Linux user for 3.0 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180710062352.9843-3-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).