From 501551e80315b1e50391dbc958bc2c8dcda7cf98 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 1 Mar 2017 16:00:47 +0100 Subject: coredump: define a macro for a "short bus call timeout" 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index bffb3d458f..114a13fc78 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -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)); -- cgit v1.2.3-54-g00ecf