Skip to content

Commit 4fe86ab

Browse files
committed
Implement sysconf(_SC_ARG_MAX) syscall
1 parent 6d7d1fd commit 4fe86ab

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

dtc

Submodule dtc updated from e543880 to 2cdf93a

linux-user/irix/syscall_nr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@
267267

268268

269269
/* syssgi(sysconf, cmd, ...) */
270+
#define TARGET_NR_sysconf_argmax (1)
270271
#define TARGET_NR_sysconf_childmax (2)
271272
#define TARGET_NR_sysconf_clktick (3)
272273
#define TARGET_NR_sysconf_openmax (5)

linux-user/syscall.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14520,6 +14520,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
1452014520
case TARGET_NR_sysconf_mac:
1452114521
ret = 0;
1452214522
break;
14523+
case TARGET_NR_sysconf_argmax:
14524+
ret = get_errno(sysconf(_SC_ARG_MAX));
14525+
break;
1452314526
default:
1452414527
gemu_log("qemu: Unsupported syscall: sysconf(%d)\n", (int)arg2);
1452514528
ret = -TARGET_ENOSYS;

0 commit comments

Comments
 (0)