naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
2aacef
From e611a79647dd2ec68b8d5553d8aa566e79cd9f6e Mon Sep 17 00:00:00 2001
2aacef
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
2aacef
Date: Tue, 29 Nov 2022 09:00:16 +0100
2aacef
Subject: [PATCH] coredump: adjust whitespace
2aacef
2aacef
(cherry picked from commit 510a146634f3e095b34e2a26023b1b1f99dcb8c0)
2aacef
2aacef
Related: #2155517
2aacef
---
2aacef
 src/coredump/coredump.c | 56 ++++++++++++++++++++---------------------
2aacef
 1 file changed, 28 insertions(+), 28 deletions(-)
2aacef
2aacef
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
2aacef
index 98e7492811..7a181bdeeb 100644
2aacef
--- a/src/coredump/coredump.c
2aacef
+++ b/src/coredump/coredump.c
2aacef
@@ -110,16 +110,16 @@ enum {
2aacef
 };
2aacef
 
2aacef
 static const char * const meta_field_names[_META_MAX] = {
2aacef
-        [META_ARGV_PID]          = "COREDUMP_PID=",
2aacef
-        [META_ARGV_UID]          = "COREDUMP_UID=",
2aacef
-        [META_ARGV_GID]          = "COREDUMP_GID=",
2aacef
-        [META_ARGV_SIGNAL]       = "COREDUMP_SIGNAL=",
2aacef
-        [META_ARGV_TIMESTAMP]    = "COREDUMP_TIMESTAMP=",
2aacef
-        [META_ARGV_RLIMIT]       = "COREDUMP_RLIMIT=",
2aacef
-        [META_ARGV_HOSTNAME]     = "COREDUMP_HOSTNAME=",
2aacef
-        [META_COMM]              = "COREDUMP_COMM=",
2aacef
-        [META_EXE]               = "COREDUMP_EXE=",
2aacef
-        [META_UNIT]              = "COREDUMP_UNIT=",
2aacef
+        [META_ARGV_PID]       = "COREDUMP_PID=",
2aacef
+        [META_ARGV_UID]       = "COREDUMP_UID=",
2aacef
+        [META_ARGV_GID]       = "COREDUMP_GID=",
2aacef
+        [META_ARGV_SIGNAL]    = "COREDUMP_SIGNAL=",
2aacef
+        [META_ARGV_TIMESTAMP] = "COREDUMP_TIMESTAMP=",
2aacef
+        [META_ARGV_RLIMIT]    = "COREDUMP_RLIMIT=",
2aacef
+        [META_ARGV_HOSTNAME]  = "COREDUMP_HOSTNAME=",
2aacef
+        [META_COMM]           = "COREDUMP_COMM=",
2aacef
+        [META_EXE]            = "COREDUMP_EXE=",
2aacef
+        [META_UNIT]           = "COREDUMP_UNIT=",
2aacef
 };
2aacef
 
2aacef
 typedef struct Context {
2aacef
@@ -138,9 +138,9 @@ typedef enum CoredumpStorage {
2aacef
 } CoredumpStorage;
2aacef
 
2aacef
 static const char* const coredump_storage_table[_COREDUMP_STORAGE_MAX] = {
2aacef
-        [COREDUMP_STORAGE_NONE] = "none",
2aacef
+        [COREDUMP_STORAGE_NONE]     = "none",
2aacef
         [COREDUMP_STORAGE_EXTERNAL] = "external",
2aacef
-        [COREDUMP_STORAGE_JOURNAL] = "journal",
2aacef
+        [COREDUMP_STORAGE_JOURNAL]  = "journal",
2aacef
 };
2aacef
 
2aacef
 DEFINE_PRIVATE_STRING_TABLE_LOOKUP(coredump_storage, CoredumpStorage);
2aacef
@@ -156,13 +156,13 @@ static uint64_t arg_max_use = UINT64_MAX;
2aacef
 
2aacef
 static int parse_config(void) {
2aacef
         static const ConfigTableItem items[] = {
2aacef
-                { "Coredump", "Storage",          config_parse_coredump_storage,           0, &arg_storage           },
2aacef
-                { "Coredump", "Compress",         config_parse_bool,                       0, &arg_compress          },
2aacef
-                { "Coredump", "ProcessSizeMax",   config_parse_iec_uint64,                 0, &arg_process_size_max  },
2aacef
-                { "Coredump", "ExternalSizeMax",  config_parse_iec_uint64_infinity,        0, &arg_external_size_max },
2aacef
-                { "Coredump", "JournalSizeMax",   config_parse_iec_size,                   0, &arg_journal_size_max  },
2aacef
-                { "Coredump", "KeepFree",         config_parse_iec_uint64,                 0, &arg_keep_free         },
2aacef
-                { "Coredump", "MaxUse",           config_parse_iec_uint64,                 0, &arg_max_use           },
2aacef
+                { "Coredump", "Storage",          config_parse_coredump_storage,     0, &arg_storage           },
2aacef
+                { "Coredump", "Compress",         config_parse_bool,                 0, &arg_compress          },
2aacef
+                { "Coredump", "ProcessSizeMax",   config_parse_iec_uint64,           0, &arg_process_size_max  },
2aacef
+                { "Coredump", "ExternalSizeMax",  config_parse_iec_uint64_infinity,  0, &arg_external_size_max },
2aacef
+                { "Coredump", "JournalSizeMax",   config_parse_iec_size,             0, &arg_journal_size_max  },
2aacef
+                { "Coredump", "KeepFree",         config_parse_iec_uint64,           0, &arg_keep_free         },
2aacef
+                { "Coredump", "MaxUse",           config_parse_iec_uint64,           0, &arg_max_use           },
2aacef
                 {}
2aacef
         };
2aacef
 
2aacef
@@ -208,15 +208,15 @@ static int fix_acl(int fd, uid_t uid) {
2aacef
 static int fix_xattr(int fd, const Context *context) {
2aacef
 
2aacef
         static const char * const xattrs[_META_MAX] = {
2aacef
-                [META_ARGV_PID]          = "user.coredump.pid",
2aacef
-                [META_ARGV_UID]          = "user.coredump.uid",
2aacef
-                [META_ARGV_GID]          = "user.coredump.gid",
2aacef
-                [META_ARGV_SIGNAL]       = "user.coredump.signal",
2aacef
-                [META_ARGV_TIMESTAMP]    = "user.coredump.timestamp",
2aacef
-                [META_ARGV_RLIMIT]       = "user.coredump.rlimit",
2aacef
-                [META_ARGV_HOSTNAME]     = "user.coredump.hostname",
2aacef
-                [META_COMM]              = "user.coredump.comm",
2aacef
-                [META_EXE]               = "user.coredump.exe",
2aacef
+                [META_ARGV_PID]       = "user.coredump.pid",
2aacef
+                [META_ARGV_UID]       = "user.coredump.uid",
2aacef
+                [META_ARGV_GID]       = "user.coredump.gid",
2aacef
+                [META_ARGV_SIGNAL]    = "user.coredump.signal",
2aacef
+                [META_ARGV_TIMESTAMP] = "user.coredump.timestamp",
2aacef
+                [META_ARGV_RLIMIT]    = "user.coredump.rlimit",
2aacef
+                [META_ARGV_HOSTNAME]  = "user.coredump.hostname",
2aacef
+                [META_COMM]           = "user.coredump.comm",
2aacef
+                [META_EXE]            = "user.coredump.exe",
2aacef
         };
2aacef
 
2aacef
         int r = 0;