1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

Merge pull request #30518 from mrc0mmand/assorted-tweaks

A couple of assorted tweaks
This commit is contained in:
Yu Watanabe 2023-12-19 11:48:40 +09:00 committed by GitHub
commit 03251a0b40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -1855,7 +1855,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
for more details. The patterns are matched against the primary names of
units currently in memory, and patterns which do not match anything
are silently skipped. For example:
<programlisting># systemctl stop sshd@*.service</programlisting>
<programlisting># systemctl stop "sshd@*.service"</programlisting>
will stop all <filename>sshd@.service</filename> instances. Note that alias names of units, and units that aren't
in memory are not considered for glob expansion.
</para>

View File

@ -152,7 +152,7 @@ int verify_set_unit_path(char **filenames) {
* Treat explicit empty path to mean that nothing should be appended. */
old = getenv("SYSTEMD_UNIT_PATH");
if (!streq_ptr(old, "") &&
!strextend_with_separator(&joined, ":", old ?: ""))
!strextend_with_separator(&joined, ":", strempty(old)))
return -ENOMEM;
assert_se(set_unit_path(joined) >= 0);

View File

@ -1088,9 +1088,9 @@ static int parse_argv(int argc, char *argv[]) {
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--since= must be before --until=.");
if (!!arg_cursor + !!arg_after_cursor + !!arg_since_set > 1)
if (!!arg_cursor + !!arg_after_cursor + !!arg_cursor_file + !!arg_since_set > 1)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Please specify only one of --since=, --cursor=, and --after-cursor=.");
"Please specify only one of --since=, --cursor=, --cursor-file=, and --after-cursor=.");
if (arg_follow && arg_reverse)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),

View File

@ -4906,7 +4906,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_PCRLOCK:
if (isempty(optarg) || streq(optarg, "-"))
if (empty_or_dash(optarg))
arg_pcrlock_path = mfree(arg_pcrlock_path);
else {
r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_pcrlock_path);
@ -4918,7 +4918,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_POLICY:
if (isempty(optarg) || streq(optarg, "-"))
if (empty_or_dash(optarg))
arg_policy_path = mfree(arg_policy_path);
else {
r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_policy_path);