[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 21/23] bsd-user: replace fprintf(stderr, ...) with
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 21/23] bsd-user: replace fprintf(stderr, ...) with error_report() |
Date: |
Mon, 26 May 2014 11:20:09 +0400 |
From: Le Tan <address@hidden>
Replace fprintf(stderr,...) with error_report() in files bsd-user/*.
The trailing "\n"s of the @fmt argument have been removed
because @fmt of error_report() should not contain newline.
Signed-off-by: Le Tan <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
bsd-user/bsdload.c | 2 +-
bsd-user/elfload.c | 2 +-
bsd-user/main.c | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 2abc713..6b52e08 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload.c
@@ -183,7 +183,7 @@ int loader_exec(const char * filename, char ** argv, char
** envp,
&& bprm.buf[3] == 'F') {
retval = load_elf_binary(&bprm,regs,infop);
} else {
- fprintf(stderr, "Unknown binary format\n");
+ error_report("Unknown binary format");
return -1;
}
}
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index 93fd9e4..95652b1 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -628,7 +628,7 @@ static abi_ulong copy_elf_strings(int argc,char ** argv,
void **page,
while (argc-- > 0) {
tmp = argv[argc];
if (!tmp) {
- fprintf(stderr, "VFS: argc is wrong");
+ error_report("VFS: argc is wrong");
exit(-1);
}
tmp1 = tmp;
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 4ba61da..de74d17 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -378,8 +378,8 @@ void cpu_loop(CPUX86State *env)
#endif
default:
pc = env->segs[R_CS].base + env->eip;
- fprintf(stderr, "qemu: 0x%08lx: unhandled CPU exception 0x%x -
aborting\n",
- (long)pc, trapnr);
+ error_report("qemu: 0x%08lx: unhandled CPU exception 0x%x"
+ " - aborting", (long)pc, trapnr);
abort();
}
process_pending_signals(env);
@@ -752,7 +752,7 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);
if ((envlist = envlist_create()) == NULL) {
- (void) fprintf(stderr, "Unable to allocate envlist\n");
+ error_report("Unable to allocate envlist");
exit(1);
}
@@ -794,7 +794,7 @@ int main(int argc, char **argv)
} else if (!strcmp(r, "ignore-environment")) {
envlist_free(envlist);
if ((envlist = envlist_create()) == NULL) {
- (void) fprintf(stderr, "Unable to allocate envlist\n");
+ error_report("Unable to allocate envlist");
exit(1);
}
} else if (!strcmp(r, "U")) {
@@ -816,7 +816,7 @@ int main(int argc, char **argv)
qemu_host_page_size = atoi(argv[optind++]);
if (qemu_host_page_size == 0 ||
(qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
- fprintf(stderr, "page size must be a power of two\n");
+ error_report("page size must be a power of two");
exit(1);
}
} else if (!strcmp(r, "g")) {
@@ -910,7 +910,7 @@ int main(int argc, char **argv)
qemu_host_page_size */
env = cpu_init(cpu_model);
if (!env) {
- fprintf(stderr, "Unable to find CPU definition\n");
+ error_report("Unable to find CPU definition");
exit(1);
}
cpu = ENV_GET_CPU(env);
@@ -1012,7 +1012,7 @@ int main(int argc, char **argv)
#ifndef TARGET_ABI32
/* enable 64 bit mode if possible */
if (!(env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM)) {
- fprintf(stderr, "The selected x86 CPU does not support 64 bit mode\n");
+ error_report("The selected x86 CPU does not support 64 bit mode");
exit(1);
}
env->cr[4] |= CR4_PAE_MASK;
--
1.7.10.4
- [Qemu-trivial] [PULL 00/23] Trivial patches for 2014-05-26, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 02/23] iohandler.c: Properly initialize sigaction struct, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 05/23] configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 04/23] nbd: Miscellaneous typo fixes., Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 07/23] jazz_led: Add missing break in switch case, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 01/23] libcacard: g_malloc cleanups, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 08/23] pci: move dereferencing of root only after verifying valid root pointer, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 10/23] dma-helpers: avoid calling dma_bdrv_unmap() twice, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 13/23] libcacard/vscclient: Bury some dead code, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 21/23] bsd-user: replace fprintf(stderr, ...) with error_report(),
Michael Tokarev <=
- [Qemu-trivial] [PULL 20/23] audio: replace fprintf(stderr, ...) with error_report() in audio, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 19/23] libcacard: fix wrong array expansion logic, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 14/23] libcacard: Plug memory leaks around vreader_get_reader_list(), Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 09/23] arch_init: replace fprintf(stderr, ...) with error_report(), Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 15/23] libcacard/vreader: Drop broken recovery from failed assertion, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 16/23] libcacard/vreader: Tighten assertion to clarify intent, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 23/23] libcacard: remove useless initializers, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 12/23] vl: fix 'name' option to work with -readconfig, Michael Tokarev, 2014/05/26
- [Qemu-trivial] [PULL 06/23] bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc, Michael Tokarev, 2014/05/26