]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: adjust whitespace and formatting 34572/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Sep 2024 18:18:16 +0000 (20:18 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Sep 2024 18:19:58 +0000 (20:19 +0200)
src/shared/bus-print-properties.c
src/shared/bus-unit-util.c
src/systemctl/systemctl-show.c

index 99b1cc7c709922503d4e59bc8753ae0183cad294..7da8cb1b12638b062131a833b0a0d1a6b28a5b24 100644 (file)
@@ -363,8 +363,10 @@ int bus_message_print_all_properties(
                 if (!name_with_equal)
                         return log_oom();
 
-                if (!filter || strv_contains(filter, name) ||
+                if (!filter ||
+                    strv_contains(filter, name) ||
                     (expected_value = strv_find_startswith(filter, name_with_equal))) {
+
                         r = sd_bus_message_peek_type(m, NULL, &contents);
                         if (r < 0)
                                 return r;
index dc92c5f609dd7941abad5df8ea71e14197249987..fc923314364a61377a772dcad2bf5138d205d51f 100644 (file)
@@ -656,9 +656,9 @@ static int bus_append_cgroup_property(sd_bus_message *m, const char *field, cons
                 if (r >= 0) {
                         char *n;
 
-                        /* When this is a percentage we'll convert this into a relative value in the range 0…UINT32_MAX
-                         * and pass it in the MemoryLowScale property (and related ones). This way the physical memory
-                         * size can be determined server-side. */
+                        /* When this is a percentage we'll convert this into a relative value in the range
+                         * 0…UINT32_MAX and pass it in the MemoryLowScale property (and related ones). This
+                         * way the physical memory size can be determined server-side. */
 
                         n = strjoina(field, "Scale");
                         r = sd_bus_message_append(m, "(sv)", n, "u", UINT32_SCALE_FROM_PERMYRIAD(r));
@@ -728,7 +728,10 @@ static int bus_append_cgroup_property(sd_bus_message *m, const char *field, cons
                 return 1;
         }
 
-        if (cgroup_io_limit_type_from_string(field) >= 0 || STR_IN_SET(field, "BlockIOReadBandwidth", "BlockIOWriteBandwidth")) {
+        if (cgroup_io_limit_type_from_string(field) >= 0 ||
+            STR_IN_SET(field, "BlockIOReadBandwidth",
+                              "BlockIOWriteBandwidth")) {
+
                 if (isempty(eq))
                         r = sd_bus_message_append(m, "(sv)", field, "a(st)", 0);
                 else {
index 67a72bdc94a262cca55a0b377877ea0de1a715f1..bdd438bc2ca0a40c9de78293e561f31f3b540486 100644 (file)
@@ -2031,8 +2031,8 @@ typedef enum SystemctlShowMode{
 
 static const char* const systemctl_show_mode_table[_SYSTEMCTL_SHOW_MODE_MAX] = {
         [SYSTEMCTL_SHOW_PROPERTIES] = "show",
-        [SYSTEMCTL_SHOW_STATUS] = "status",
-        [SYSTEMCTL_SHOW_HELP] = "help",
+        [SYSTEMCTL_SHOW_STATUS]     = "status",
+        [SYSTEMCTL_SHOW_HELP]       = "help",
 };
 
 DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(systemctl_show_mode, SystemctlShowMode);