systemctl: show error when help for unknown unit is requested
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 12 Jul 2021 10:32:39 +0000 (12:32 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 12 Jul 2021 14:26:40 +0000 (15:26 +0100)
commit75312ada5324d8adae3f3a0ed97f0acfc8b8bde5
treeafd8dbf39ed6974a3d681d3a940c2b70d7e2c9a7
parentc68c87d023a1cbd56c37b4449a5789996d16e323
systemctl: show error when help for unknown unit is requested

Fixes #20189. We would only log at debug level and return failure, which looks
like a noop for the user.

('help' accepts multiple arguments and will show multiple concatenated man
pages in that case. Actually, it will also show multiple concatenated man pages
if the Documentation= setting lists multiple pages. I don't think it's very
terribly useful, but, meh, I don't think we can do much better. If a user
requests a help for a two services, one known and one unknown, there'll now be
a line in the output. It's not very user friendly, but not exactly wrong too.)
src/systemctl/systemctl-show.c