@@ -17,6 +17,7 @@
#include "qemu/guest-random.h"
#include "qemu/units.h"
#include "qemu/selfmap.h"
+#include "qemu/cutils.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "target_signal.h"
@@ -2790,7 +2791,8 @@ static void pgb_reserved_va(const char *image_name, abi_ulong guest_loaddr,
error_report("Unable to reserve 0x%lx bytes of virtual address "
"space at %p (%s) for use as guest address space (check your "
"virtual memory ulimit setting, min_mmap_addr or reserve less "
- "using -R option)", reserved_va + 1, test, strerror(errno));
+ "using -R option)", reserved_va + 1, test,
+ qemu_strerror(errno));
exit(EXIT_FAILURE);
}
@@ -3583,7 +3585,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
g_free(scratch);
if (!bprm->p) {
- fprintf(stderr, "%s: %s\n", bprm->filename, strerror(E2BIG));
+ fprintf(stderr, "%s: %s\n", bprm->filename, qemu_strerror(E2BIG));
exit(-1);
}
@@ -746,7 +746,8 @@ int main(int argc, char **argv, char **envp)
if (execfd == 0) {
execfd = open(exec_path, O_RDONLY);
if (execfd < 0) {
- printf("Error while loading %s: %s\n", exec_path, strerror(errno));
+ printf("Error while loading %s: %s\n", exec_path,
+ qemu_strerror(errno));
_exit(EXIT_FAILURE);
}
}
@@ -892,7 +893,7 @@ int main(int argc, char **argv, char **envp)
ret = loader_exec(execfd, exec_path, target_argv, target_environ, regs,
info, &bprm);
if (ret != 0) {
- printf("Error while loading %s: %s\n", exec_path, strerror(-ret));
+ printf("Error while loading %s: %s\n", exec_path, qemu_strerror(-ret));
_exit(EXIT_FAILURE);
}
@@ -581,7 +581,7 @@ const char *target_strerror(int err)
return "Successful exit from sigreturn";
}
- return strerror(target_to_host_errno(err));
+ return qemu_strerror(target_to_host_errno(err));
}
static int check_zeroed_user(abi_long addr, size_t ksize, size_t usize)