Merge pull request #12661 from mrc0mmand/debug-journalctl-flush

journal: disable varlink timeout for journalctl --flush or friends
This commit is contained in:
Yu Watanabe
2019-06-05 00:46:29 +09:00
committed by GitHub
+6 -2
View File
@@ -1952,10 +1952,14 @@ static int simple_varlink_call(const char *option, const char *method) {
return log_error_errno(r, "Failed to connect to /run/systemd/journal/io.systemd.journal: %m");
(void) varlink_set_description(link, "journal");
(void) varlink_set_relative_timeout(link, USEC_INFINITY);
r = varlink_call(link, method, NULL, NULL, &error, NULL);
if (r < 0)
return log_error_errno(r, "Failed to execute varlink call: %s", error);
return log_error_errno(r, "Failed to execute varlink call: %m");
if (error)
return log_error_errno(SYNTHETIC_ERRNO(ENOANO),
"Failed to execute varlink call: %s", error);
return 0;
}
@@ -1965,7 +1969,7 @@ static int flush_to_var(void) {
}
static int relinquish_var(void) {
return simple_varlink_call("--relinquish-var", "io.systemd.Journal.RelinquishVar");
return simple_varlink_call("--relinquish-var/--smart-relinquish-var", "io.systemd.Journal.RelinquishVar");
}
static int rotate(void) {