Blame SOURCES/0126-Use-PRINT_FIELD_UID-instead-of-printuid-where-approp.patch

760e82
From 64d04198d3c64756ae8a51646b6eac3dff419cb6 Mon Sep 17 00:00:00 2001
760e82
From: "Dmitry V. Levin" <ldv@altlinux.org>
760e82
Date: Fri, 17 Jul 2020 08:00:00 +0000
760e82
Subject: [PATCH 126/138] Use PRINT_FIELD_UID instead of printuid where
760e82
 appropriate
760e82
760e82
* ipc_msgctl.c: Include "print_fields.h".
760e82
(print_msqid_ds): Use PRINT_FIELD_UID instead of printuid.
760e82
* ipc_shmctl.c: Include "print_fields.h".
760e82
(print_shmid_ds): Use PRINT_FIELD_UID instead of printuid.
760e82
* statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_UID instead of printuid.
760e82
---
760e82
 ipc_msgctl.c | 10 +++++-----
760e82
 ipc_shmctl.c | 10 +++++-----
760e82
 statx.c      |  4 ++--
760e82
 3 files changed, 12 insertions(+), 12 deletions(-)
760e82
760e82
diff --git a/ipc_msgctl.c b/ipc_msgctl.c
760e82
index 92eda11..920ed72 100644
760e82
--- a/ipc_msgctl.c
760e82
+++ b/ipc_msgctl.c
760e82
@@ -22,6 +22,7 @@ typedef struct NAME_OF_STRUCT_MSQID_DS msqid_ds_t;
760e82
 
760e82
 #include MPERS_DEFS
760e82
 
760e82
+#include "print_fields.h"
760e82
 #include "xlat/msgctl_flags.h"
760e82
 
760e82
 static void
760e82
@@ -37,9 +38,8 @@ print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
760e82
 		if (umove_or_printaddr(tcp, addr, &msqid_ds))
760e82
 			return;
760e82
 
760e82
-		tprints("{msg_perm={");
760e82
-		printuid("uid=", msqid_ds.msg_perm.uid);
760e82
-		printuid(", gid=", msqid_ds.msg_perm.gid);
760e82
+		PRINT_FIELD_UID("{msg_perm={", msqid_ds.msg_perm, uid);
760e82
+		PRINT_FIELD_UID(", ", msqid_ds.msg_perm, gid);
760e82
 		tprints(", mode=");
760e82
 		print_numeric_umode_t(msqid_ds.msg_perm.mode);
760e82
 
760e82
@@ -50,8 +50,8 @@ print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
760e82
 
760e82
 		tprintf(", key=%u",
760e82
 			(unsigned) msqid_ds.msg_perm.NAME_OF_STRUCT_IPC_PERM_KEY);
760e82
-		printuid(", cuid=", msqid_ds.msg_perm.cuid);
760e82
-		printuid(", cgid=", msqid_ds.msg_perm.cgid);
760e82
+		PRINT_FIELD_UID(", ", msqid_ds.msg_perm, cuid);
760e82
+		PRINT_FIELD_UID(", ", msqid_ds.msg_perm, cgid);
760e82
 		tprints("}");
760e82
 		tprintf(", msg_stime=%u", (unsigned) msqid_ds.msg_stime);
760e82
 		tprintf(", msg_rtime=%u", (unsigned) msqid_ds.msg_rtime);
760e82
diff --git a/ipc_shmctl.c b/ipc_shmctl.c
760e82
index 0fb584e..83e36f3 100644
760e82
--- a/ipc_shmctl.c
760e82
+++ b/ipc_shmctl.c
760e82
@@ -22,6 +22,7 @@ typedef struct NAME_OF_STRUCT_SHMID_DS shmid_ds_t;
760e82
 
760e82
 #include MPERS_DEFS
760e82
 
760e82
+#include "print_fields.h"
760e82
 #include "xlat/shmctl_flags.h"
760e82
 
760e82
 static void
760e82
@@ -37,9 +38,8 @@ print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
760e82
 		if (umove_or_printaddr(tcp, addr, &shmid_ds))
760e82
 			return;
760e82
 
760e82
-		tprints("{shm_perm={");
760e82
-		printuid("uid=", shmid_ds.shm_perm.uid);
760e82
-		printuid(", gid=", shmid_ds.shm_perm.gid);
760e82
+		PRINT_FIELD_UID("{shm_perm={", shmid_ds.shm_perm, uid);
760e82
+		PRINT_FIELD_UID(", ", shmid_ds.shm_perm, gid);
760e82
 		tprints(", mode=");
760e82
 		print_numeric_umode_t(shmid_ds.shm_perm.mode);
760e82
 
760e82
@@ -50,8 +50,8 @@ print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
760e82
 
760e82
 		tprintf(", key=%u",
760e82
 			(unsigned) shmid_ds.shm_perm.NAME_OF_STRUCT_IPC_PERM_KEY);
760e82
-		printuid(", cuid=", shmid_ds.shm_perm.cuid);
760e82
-		printuid(", cgid=", shmid_ds.shm_perm.cgid);
760e82
+		PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cuid);
760e82
+		PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cgid);
760e82
 		tprints("}");
760e82
 		tprintf(", shm_segsz=%u", (unsigned) shmid_ds.shm_segsz);
760e82
 		tprintf(", shm_cpid=%u", (unsigned) shmid_ds.shm_cpid);
760e82
diff --git a/statx.c b/statx.c
760e82
index 54b6d7c..7b00b8e 100644
760e82
--- a/statx.c
760e82
+++ b/statx.c
760e82
@@ -60,8 +60,8 @@ SYS_FUNC(statx)
760e82
 
760e82
 		if (!abbrev(tcp)) {
760e82
 			PRINT_FIELD_U(", ", stx, stx_nlink);
760e82
-			printuid(", stx_uid=", stx.stx_uid);
760e82
-			printuid(", stx_gid=", stx.stx_gid);
760e82
+			PRINT_FIELD_UID(", ", stx, stx_uid);
760e82
+			PRINT_FIELD_UID(", ", stx, stx_gid);
760e82
 		}
760e82
 
760e82
 		tprints(", stx_mode=");
760e82
-- 
760e82
2.1.4
760e82