diff options
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/arm/syscall.h | 4 | ||||
-rw-r--r-- | linux-user/syscall.c | 28 |
2 files changed, 28 insertions, 4 deletions
diff --git a/linux-user/arm/syscall.h b/linux-user/arm/syscall.h index 645036174d..f74d765289 100644 --- a/linux-user/arm/syscall.h +++ b/linux-user/arm/syscall.h @@ -30,7 +30,7 @@ struct target_pt_regs { #define ARM_NR_cacheflush (ARM_SYSCALL_BASE + 0xf0000 + 2) #if defined(TARGET_WORDS_BIGENDIAN) -#define UNAME_MACHINE "armv4b" +#define UNAME_MACHINE "armv5teb" #else -#define UNAME_MACHINE "armv4l" +#define UNAME_MACHINE "armv5tel" #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9c7992e0b8..bb609dec86 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2944,11 +2944,35 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, #endif #ifdef TARGET_NR_getgroups32 case TARGET_NR_getgroups32: - goto unimplemented; + { + int gidsetsize = arg1; + uint32_t *target_grouplist = (void *)arg2; + gid_t *grouplist; + int i; + + grouplist = alloca(gidsetsize * sizeof(gid_t)); + ret = get_errno(getgroups(gidsetsize, grouplist)); + if (!is_error(ret)) { + for(i = 0;i < gidsetsize; i++) + put_user(grouplist[i], &target_grouplist[i]); + } + } + break; #endif #ifdef TARGET_NR_setgroups32 case TARGET_NR_setgroups32: - goto unimplemented; + { + int gidsetsize = arg1; + uint32_t *target_grouplist = (void *)arg2; + gid_t *grouplist; + int i; + + grouplist = alloca(gidsetsize * sizeof(gid_t)); + for(i = 0;i < gidsetsize; i++) + get_user(grouplist[i], &target_grouplist[i]); + ret = get_errno(setgroups(gidsetsize, grouplist)); + } + break; #endif #ifdef TARGET_NR_fchown32 case TARGET_NR_fchown32: |