From b26c0b68a4fb98f1f18a3d918bf2d48d37bc1dc8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 7 Aug 2019 12:50:42 +0200 Subject: [PATCH] format-table: add UID/GID output support to format-table.h --- src/shared/format-table.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared/format-table.h b/src/shared/format-table.h index aacf978978..80f319d054 100644 --- a/src/shared/format-table.h +++ b/src/shared/format-table.h @@ -53,6 +53,12 @@ typedef enum TableDataType { #define TABLE_PID TABLE_INT32 assert_cc(sizeof(pid_t) == sizeof(int32_t)); +/* UIDs/GIDs are just 32bit unsigned integers on Linux */ +#define TABLE_UID TABLE_UINT32 +#define TABLE_GID TABLE_UINT32 +assert_cc(sizeof(uid_t) == sizeof(uint32_t)); +assert_cc(sizeof(gid_t) == sizeof(uint32_t)); + typedef struct Table Table; typedef struct TableCell TableCell;