mirror of https://github.com/xemu-project/xemu.git
linux-user: add comments for TARGET_NR_[gs]etgroups{,32}
There are 2 pairs of identical code (with different types) for TARGET_NR_setgroups & TARGET_NR_setgroups32, and for TARGET_NR_getgroups & TARGET_NR_getgroups32. Add comments stating this fact, so that further modifications are done in two places. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
4c030dd00f
commit
725160fe56
|
@ -11670,7 +11670,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
|
||||||
case TARGET_NR_setregid:
|
case TARGET_NR_setregid:
|
||||||
return get_errno(setregid(low2highgid(arg1), low2highgid(arg2)));
|
return get_errno(setregid(low2highgid(arg1), low2highgid(arg2)));
|
||||||
case TARGET_NR_getgroups:
|
case TARGET_NR_getgroups:
|
||||||
{
|
{ /* the same code as for TARGET_NR_getgroups32 */
|
||||||
int gidsetsize = arg1;
|
int gidsetsize = arg1;
|
||||||
target_id *target_grouplist;
|
target_id *target_grouplist;
|
||||||
g_autofree gid_t *grouplist = NULL;
|
g_autofree gid_t *grouplist = NULL;
|
||||||
|
@ -11701,7 +11701,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
case TARGET_NR_setgroups:
|
case TARGET_NR_setgroups:
|
||||||
{
|
{ /* the same code as for TARGET_NR_setgroups32 */
|
||||||
int gidsetsize = arg1;
|
int gidsetsize = arg1;
|
||||||
target_id *target_grouplist;
|
target_id *target_grouplist;
|
||||||
g_autofree gid_t *grouplist = NULL;
|
g_autofree gid_t *grouplist = NULL;
|
||||||
|
@ -12006,7 +12006,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
|
||||||
#endif
|
#endif
|
||||||
#ifdef TARGET_NR_getgroups32
|
#ifdef TARGET_NR_getgroups32
|
||||||
case TARGET_NR_getgroups32:
|
case TARGET_NR_getgroups32:
|
||||||
{
|
{ /* the same code as for TARGET_NR_getgroups */
|
||||||
int gidsetsize = arg1;
|
int gidsetsize = arg1;
|
||||||
uint32_t *target_grouplist;
|
uint32_t *target_grouplist;
|
||||||
g_autofree gid_t *grouplist = NULL;
|
g_autofree gid_t *grouplist = NULL;
|
||||||
|
@ -12038,7 +12038,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
|
||||||
#endif
|
#endif
|
||||||
#ifdef TARGET_NR_setgroups32
|
#ifdef TARGET_NR_setgroups32
|
||||||
case TARGET_NR_setgroups32:
|
case TARGET_NR_setgroups32:
|
||||||
{
|
{ /* the same code as for TARGET_NR_setgroups */
|
||||||
int gidsetsize = arg1;
|
int gidsetsize = arg1;
|
||||||
uint32_t *target_grouplist;
|
uint32_t *target_grouplist;
|
||||||
g_autofree gid_t *grouplist = NULL;
|
g_autofree gid_t *grouplist = NULL;
|
||||||
|
|
Loading…
Reference in New Issue