diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-24 14:09:11 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-10-25 13:41:49 +0900 |
commit | df7c4eb62a22a5b131007d98ee49f57f6f95483e (patch) | |
tree | fd7edf3e3402c294ebb45a3c60ff0ba91558bca0 /src/nspawn/nspawn-register.c | |
parent | 1c089741d3b56ab096c5c401089f68b293b5fa38 (diff) | |
download | systemd-df7c4eb62a22a5b131007d98ee49f57f6f95483e.tar.gz |
various tools: be more explicit when a glob is passed when not supported
See https://bugzilla.redhat.com/show_bug.cgi?id=1763488: when we say that
'foo@*.service' is not a valid unit name, this is not clear enough. Let's
include the name of the operation that does not support globbing in the
error message:
$ build/systemctl enable 'foo@*.service'
Glob pattern passed to enable, but globs are not supported for this.
Invalid unit name "foo@*.service" escaped as "foo@\x2a.service".
...
Diffstat (limited to 'src/nspawn/nspawn-register.c')
-rw-r--r-- | src/nspawn/nspawn-register.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-register.c b/src/nspawn/nspawn-register.c index 8e2c329665..b2d931a8d3 100644 --- a/src/nspawn/nspawn-register.c +++ b/src/nspawn/nspawn-register.c @@ -258,7 +258,7 @@ int allocate_scope( if (r < 0) return log_error_errno(r, "Could not watch job: %m"); - r = unit_name_mangle_with_suffix(machine_name, 0, ".scope", &scope); + r = unit_name_mangle_with_suffix(machine_name, "as machine name", 0, ".scope", &scope); if (r < 0) return log_error_errno(r, "Failed to mangle scope name: %m"); @@ -350,7 +350,7 @@ int terminate_scope( _cleanup_free_ char *scope = NULL; int r; - r = unit_name_mangle_with_suffix(machine_name, 0, ".scope", &scope); + r = unit_name_mangle_with_suffix(machine_name, "to terminate", 0, ".scope", &scope); if (r < 0) return log_error_errno(r, "Failed to mangle scope name: %m"); |