[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/16] linux-user: add comments for TARGET_NR_[gs]etgroups{, 32}
From: |
Michael Tokarev |
Subject: |
[PULL 12/16] linux-user: add comments for TARGET_NR_[gs]etgroups{, 32} |
Date: |
Sat, 10 Jun 2023 09:57:50 +0300 |
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>
---
linux-user/syscall.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 83685f0aa5..94256cc262 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -11670,7 +11670,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int
num, abi_long arg1,
case TARGET_NR_setregid:
return get_errno(setregid(low2highgid(arg1), low2highgid(arg2)));
case TARGET_NR_getgroups:
- {
+ { /* the same code as for TARGET_NR_getgroups32 */
int gidsetsize = arg1;
target_id *target_grouplist;
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;
}
case TARGET_NR_setgroups:
- {
+ { /* the same code as for TARGET_NR_setgroups32 */
int gidsetsize = arg1;
target_id *target_grouplist;
g_autofree gid_t *grouplist = NULL;
@@ -12006,7 +12006,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int
num, abi_long arg1,
#endif
#ifdef TARGET_NR_getgroups32
case TARGET_NR_getgroups32:
- {
+ { /* the same code as for TARGET_NR_getgroups */
int gidsetsize = arg1;
uint32_t *target_grouplist;
g_autofree gid_t *grouplist = NULL;
@@ -12038,7 +12038,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int
num, abi_long arg1,
#endif
#ifdef TARGET_NR_setgroups32
case TARGET_NR_setgroups32:
- {
+ { /* the same code as for TARGET_NR_setgroups */
int gidsetsize = arg1;
uint32_t *target_grouplist;
g_autofree gid_t *grouplist = NULL;
--
2.39.2
- [PULL 01/16] docs: Fix trivial typos in vhost-user.rst, (continued)
- [PULL 01/16] docs: Fix trivial typos in vhost-user.rst, Michael Tokarev, 2023/06/10
- [PULL 03/16] spelling: information, Michael Tokarev, 2023/06/10
- [PULL 02/16] hw/virtio/virtio-qmp.c: spelling: suppoted, Michael Tokarev, 2023/06/10
- [PULL 04/16] hw/remote: Fix vfu_cfg trace offset format, Michael Tokarev, 2023/06/10
- [PULL 05/16] block.c: add newline for "Detected format" warning, Michael Tokarev, 2023/06/10
- [PULL 06/16] meson: install keyboard maps only if necessary, Michael Tokarev, 2023/06/10
- [PULL 07/16] target/m68k/fpu_helper: Use FloatRelation enum to hold comparison result, Michael Tokarev, 2023/06/10
- [PULL 09/16] hw/i386/microvm: Simplify using object_dynamic_cast(), Michael Tokarev, 2023/06/10
- [PULL 08/16] hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro, Michael Tokarev, 2023/06/10
- [PULL 10/16] hw/pci/pci: Simplify pci_bar_address() using MACHINE_GET_CLASS() macro, Michael Tokarev, 2023/06/10
- [PULL 12/16] linux-user: add comments for TARGET_NR_[gs]etgroups{, 32},
Michael Tokarev <=
- [PULL 13/16] linux-user: Return EINVAL for getgroups() with negative gidsetsize, Michael Tokarev, 2023/06/10
- [PULL 15/16] linux-user: elfload: s/min_mmap_addr/mmap_min_addr/, Michael Tokarev, 2023/06/10
- [PULL 14/16] vnc: move assert in vnc_worker_thread_loop, Michael Tokarev, 2023/06/10
- [PULL 11/16] hw/usb/hcd-ehci-pci: Simplify using DEVICE_GET_CLASS() macro, Michael Tokarev, 2023/06/10
- [PULL 16/16] linux-user: elfload: Specify -R is an option for qemu-user binaries, Michael Tokarev, 2023/06/10
- Re: [PULL 00/16] trivial patches 2023-06-10, Richard Henderson, 2023/06/10