various tools: be more explicit when a glob is passed when not supported
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Oct 2019 12:09:11 +0000 (14:09 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 25 Oct 2019 04:41:49 +0000 (13:41 +0900)
commitdf7c4eb62a22a5b131007d98ee49f57f6f95483e
treefd7edf3e3402c294ebb45a3c60ff0ba91558bca0
parent1c089741d3b56ab096c5c401089f68b293b5fa38
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".
...
src/analyze/analyze-security.c
src/basic/unit-name.c
src/basic/unit-name.h
src/fstab-generator/fstab-generator.c
src/nspawn/nspawn-register.c
src/run/run.c
src/systemctl/systemctl.c