aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-31 20:45:13 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-31 20:45:13 +0000
commit99c475abf16b10923baac09682a9d801ae421ac6 (patch)
tree3e1d1433c7f6f6e530bf50577625df75eb03274e /linux-user
parentdfe86665b8d61659f2c24f7365f75fe89f4705ac (diff)
armv5te support (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1258 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/arm/syscall.h4
-rw-r--r--linux-user/syscall.c28
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: