]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: define a macro for a "short bus call timeout" 5502/head
authorLennart Poettering <lennart@poettering.net>
Wed, 1 Mar 2017 15:00:47 +0000 (16:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 1 Mar 2017 17:13:00 +0000 (18:13 +0100)
I think it would be a good idea to move such fixed, picked values out of
the main sources into the head of a file, to make sure they are
ultimately tunables.

src/coredump/coredumpctl.c

index bffb3d458f0c0b7580ef8bbafdf0975a162e3bc8..114a13fc78c870029ac28c2c80417c72be6421f1 100644 (file)
@@ -51,6 +51,8 @@
 #include "user-util.h"
 #include "util.h"
 
+#define SHORT_BUS_CALL_TIMEOUT_USEC (3 * USEC_PER_SEC)
+
 static usec_t arg_since = USEC_INFINITY, arg_until = USEC_INFINITY;
 
 static enum {
@@ -992,7 +994,7 @@ static int check_units_active(void) {
         if (r < 0)
                 return bus_log_create_error(r);
 
-        r = sd_bus_call(bus, m, 3 * USEC_PER_SEC, &error, &reply);
+        r = sd_bus_call(bus, m, SHORT_BUS_CALL_TIMEOUT_USEC, &error, &reply);
         if (r < 0)
                 return log_error_errno(r, "Failed to check if any systemd-coredump@.service units are running: %s",
                                        bus_error_message(&error, r));