/[qemu]/qemu/linux-user/syscall.c
ViewVC logotype

Diff of /qemu/linux-user/syscall.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by bellard, Sun Jan 30 22:59:18 2005 UTC revision 1.57 by bellard, Mon Jan 31 20:45:13 2005 UTC
# Line 2944  long do_syscall(void *cpu_env, int num, Line 2944  long do_syscall(void *cpu_env, int num,
2944  #endif  #endif
2945  #ifdef TARGET_NR_getgroups32  #ifdef TARGET_NR_getgroups32
2946      case TARGET_NR_getgroups32:      case TARGET_NR_getgroups32:
2947          goto unimplemented;          {
2948                int gidsetsize = arg1;
2949                uint32_t *target_grouplist = (void *)arg2;
2950                gid_t *grouplist;
2951                int i;
2952    
2953                grouplist = alloca(gidsetsize * sizeof(gid_t));
2954                ret = get_errno(getgroups(gidsetsize, grouplist));
2955                if (!is_error(ret)) {
2956                    for(i = 0;i < gidsetsize; i++)
2957                        put_user(grouplist[i], &target_grouplist[i]);
2958                }
2959            }
2960            break;
2961  #endif  #endif
2962  #ifdef TARGET_NR_setgroups32  #ifdef TARGET_NR_setgroups32
2963      case TARGET_NR_setgroups32:      case TARGET_NR_setgroups32:
2964          goto unimplemented;          {
2965                int gidsetsize = arg1;
2966                uint32_t *target_grouplist = (void *)arg2;
2967                gid_t *grouplist;
2968                int i;
2969                
2970                grouplist = alloca(gidsetsize * sizeof(gid_t));
2971                for(i = 0;i < gidsetsize; i++)
2972                    get_user(grouplist[i], &target_grouplist[i]);
2973                ret = get_errno(setgroups(gidsetsize, grouplist));
2974            }
2975            break;
2976  #endif  #endif
2977  #ifdef TARGET_NR_fchown32  #ifdef TARGET_NR_fchown32
2978      case TARGET_NR_fchown32:      case TARGET_NR_fchown32:

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26