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

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