diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-07-17 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-07-17 08:00:00 +0000 |
commit | 894d8c964c6aa1eef89c6d71be11b9c0199c8021 (patch) | |
tree | 0d19a34085ec510c351d0c294870c026facaecb9 | |
parent | 143db76eb2284930414fa35d7442181818fe7b2a (diff) | |
download | strace-894d8c964c6aa1eef89c6d71be11b9c0199c8021.tar.gz |
Use PRINT_FIELD_UID instead of printuid where appropriate
* ipc_msgctl.c: Include "print_fields.h".
(print_msqid_ds): Use PRINT_FIELD_UID instead of printuid.
* ipc_shmctl.c: Include "print_fields.h".
(print_shmid_ds): Use PRINT_FIELD_UID instead of printuid.
* statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_UID instead of printuid.
-rw-r--r-- | ipc_msgctl.c | 10 | ||||
-rw-r--r-- | ipc_shmctl.c | 10 | ||||
-rw-r--r-- | statx.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/ipc_msgctl.c b/ipc_msgctl.c index 92eda115d..920ed72a3 100644 --- a/ipc_msgctl.c +++ b/ipc_msgctl.c @@ -22,6 +22,7 @@ typedef struct NAME_OF_STRUCT_MSQID_DS msqid_ds_t; #include MPERS_DEFS +#include "print_fields.h" #include "xlat/msgctl_flags.h" static void @@ -37,9 +38,8 @@ print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd) if (umove_or_printaddr(tcp, addr, &msqid_ds)) return; - tprints("{msg_perm={"); - printuid("uid=", msqid_ds.msg_perm.uid); - printuid(", gid=", msqid_ds.msg_perm.gid); + PRINT_FIELD_UID("{msg_perm={", msqid_ds.msg_perm, uid); + PRINT_FIELD_UID(", ", msqid_ds.msg_perm, gid); tprints(", mode="); print_numeric_umode_t(msqid_ds.msg_perm.mode); @@ -50,8 +50,8 @@ print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd) tprintf(", key=%u", (unsigned) msqid_ds.msg_perm.NAME_OF_STRUCT_IPC_PERM_KEY); - printuid(", cuid=", msqid_ds.msg_perm.cuid); - printuid(", cgid=", msqid_ds.msg_perm.cgid); + PRINT_FIELD_UID(", ", msqid_ds.msg_perm, cuid); + PRINT_FIELD_UID(", ", msqid_ds.msg_perm, cgid); tprints("}"); tprintf(", msg_stime=%u", (unsigned) msqid_ds.msg_stime); tprintf(", msg_rtime=%u", (unsigned) msqid_ds.msg_rtime); diff --git a/ipc_shmctl.c b/ipc_shmctl.c index 0fb584e3d..83e36f342 100644 --- a/ipc_shmctl.c +++ b/ipc_shmctl.c @@ -22,6 +22,7 @@ typedef struct NAME_OF_STRUCT_SHMID_DS shmid_ds_t; #include MPERS_DEFS +#include "print_fields.h" #include "xlat/shmctl_flags.h" static void @@ -37,9 +38,8 @@ print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd) if (umove_or_printaddr(tcp, addr, &shmid_ds)) return; - tprints("{shm_perm={"); - printuid("uid=", shmid_ds.shm_perm.uid); - printuid(", gid=", shmid_ds.shm_perm.gid); + PRINT_FIELD_UID("{shm_perm={", shmid_ds.shm_perm, uid); + PRINT_FIELD_UID(", ", shmid_ds.shm_perm, gid); tprints(", mode="); print_numeric_umode_t(shmid_ds.shm_perm.mode); @@ -50,8 +50,8 @@ print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd) tprintf(", key=%u", (unsigned) shmid_ds.shm_perm.NAME_OF_STRUCT_IPC_PERM_KEY); - printuid(", cuid=", shmid_ds.shm_perm.cuid); - printuid(", cgid=", shmid_ds.shm_perm.cgid); + PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cuid); + PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cgid); tprints("}"); tprintf(", shm_segsz=%u", (unsigned) shmid_ds.shm_segsz); tprintf(", shm_cpid=%u", (unsigned) shmid_ds.shm_cpid); @@ -60,8 +60,8 @@ SYS_FUNC(statx) if (!abbrev(tcp)) { PRINT_FIELD_U(", ", stx, stx_nlink); - printuid(", stx_uid=", stx.stx_uid); - printuid(", stx_gid=", stx.stx_gid); + PRINT_FIELD_UID(", ", stx, stx_uid); + PRINT_FIELD_UID(", ", stx, stx_gid); } tprints(", stx_mode="); |