diff options
author | malc | 2011-08-05 08:07:10 +0200 |
---|---|---|
committer | malc | 2011-08-05 08:07:10 +0200 |
commit | a67a47d2b559a7733c3f89aeb2d81b19d2c027e4 (patch) | |
tree | 146a7b6eebbee1367453fde501d4462ac6d9f8b4 /linux-user | |
parent | Merge branch 'master' of git://git.qemu.org/qemu (diff) | |
parent | Merge remote-tracking branch 'mst/for_anthony' into staging (diff) | |
download | qemu-a67a47d2b559a7733c3f89aeb2d81b19d2c027e4.tar.gz qemu-a67a47d2b559a7733c3f89aeb2d81b19d2c027e4.tar.xz qemu-a67a47d2b559a7733c3f89aeb2d81b19d2c027e4.zip |
Merge branch 'master' of git://git.qemu.org/qemu
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 11 | ||||
-rw-r--r-- | linux-user/syscall.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 2135b9c714..6a8f4bdc11 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3048,11 +3048,6 @@ int main(int argc, char **argv, char **envp) usage(); } } - if (optind >= argc) - usage(); - filename = argv[optind]; - exec_path = argv[optind]; - /* init debug */ cpu_set_log_filename(log_file); if (log_mask) { @@ -3070,6 +3065,12 @@ int main(int argc, char **argv, char **envp) cpu_set_log(mask); } + if (optind >= argc) { + usage(); + } + filename = argv[optind]; + exec_path = argv[optind]; + /* Zero out regs */ memset(regs, 0, sizeof(struct target_pt_regs)); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1dd7aad43c..73f9baa6f9 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2004,7 +2004,7 @@ static abi_long do_recvfrom(int fd, abi_ulong msg, size_t len, int flags, ret = get_errno(recvfrom(fd, host_msg, len, flags, addr, &addrlen)); } else { addr = NULL; /* To keep compiler quiet. */ - ret = get_errno(recv(fd, host_msg, len, flags)); + ret = get_errno(qemu_recv(fd, host_msg, len, flags)); } if (!is_error(ret)) { if (target_addr) { |