mirror of
https://github.com/systemd/systemd.git
synced 2025-03-25 18:50:18 +03:00
Merge pull request #6691 from yuwata/man-journal-remote2
journal-remote: small fixes
This commit is contained in:
commit
30495cb0a7
@ -203,8 +203,7 @@
|
||||
<title>Sinks</title>
|
||||
|
||||
<para>The location of the output journal can be specified
|
||||
with <option>-o</option> or <option>--output=</option>. For "active"
|
||||
sources, this option is required.
|
||||
with <option>-o</option> or <option>--output=</option>.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
@ -261,7 +260,8 @@
|
||||
is used, based on the hostname of the other endpoint of a
|
||||
connection.</para>
|
||||
|
||||
<para>In case of "active" sources, the output file name must
|
||||
<para>In the case that "active" sources are given by the positional
|
||||
arguments or <option>--getter=</option> option, the output file name must
|
||||
always be given explicitly and only <constant>none</constant>
|
||||
is allowed.</para></listitem>
|
||||
</varlistentry>
|
||||
|
@ -66,7 +66,7 @@ static int arg_seal = false;
|
||||
static int http_socket = -1, https_socket = -1;
|
||||
static char** arg_gnutls_log = NULL;
|
||||
|
||||
static JournalWriteSplitMode arg_split_mode = JOURNAL_WRITE_SPLIT_HOST;
|
||||
static JournalWriteSplitMode arg_split_mode = _JOURNAL_WRITE_SPLIT_INVALID;
|
||||
static char* arg_output = NULL;
|
||||
|
||||
static char *arg_key = NULL;
|
||||
@ -1492,9 +1492,17 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!IN_SET(arg_split_mode, JOURNAL_WRITE_SPLIT_NONE, _JOURNAL_WRITE_SPLIT_INVALID)) {
|
||||
log_error("For active sources, only --split-mode=none is allowed.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
arg_split_mode = JOURNAL_WRITE_SPLIT_NONE;
|
||||
}
|
||||
|
||||
if (arg_split_mode == _JOURNAL_WRITE_SPLIT_INVALID)
|
||||
arg_split_mode = JOURNAL_WRITE_SPLIT_HOST;
|
||||
|
||||
if (arg_split_mode == JOURNAL_WRITE_SPLIT_NONE && arg_output) {
|
||||
if (is_dir(arg_output, true) > 0) {
|
||||
log_error("For SplitMode=none, output must be a file.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user