Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IRIX pathconf() syscall #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
url = git://git.qemu.org/QemuMacDrivers.git
[submodule "ui/keycodemapdb"]
path = ui/keycodemapdb
url = git://git.qemu.org/keycodemapdb.git
url = https://gitlab.com/qemu-project/keycodemapdb.git
[submodule "capstone"]
path = capstone
url = git://git.qemu.org/capstone.git
Expand Down
2 changes: 1 addition & 1 deletion linux-user/irix/syscall_nr.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
#define TARGET_NR_syssgi_setsid (20)
#define TARGET_NR_syssgi_setpgid (21)
#define TARGET_NR_syssgi_sysconf (22)
#define TARGET_NR_syssgi_pathconf (23)
#define TARGET_NR_syssgi_pathconf (24)
#define TARGET_NR_syssgi_setgroups (40)
#define TARGET_NR_syssgi_getgroups (41)
#define TARGET_NR_syssgi_settimeofday (52)
Expand Down
8 changes: 4 additions & 4 deletions linux-user/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -14527,13 +14527,13 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
break;
case TARGET_NR_syssgi_pathconf:
if (arg3 == 1) {
if (!(p = lock_user_string(arg1)))
if (arg4 == 1) {
if (!(p = lock_user_string(arg2)))
goto efault;
ret = get_errno(pathconf(path(p), target_to_host_pathconf(arg2)));
ret = get_errno(pathconf(path(p), target_to_host_pathconf(arg3)));
unlock_user(p, arg1, 0);
} else
ret = get_errno(fpathconf(arg1, target_to_host_pathconf(arg2)));
ret = get_errno(fpathconf(arg2, target_to_host_pathconf(arg3)));
break;
case TARGET_NR_syssgi_rusage:
{
Expand Down