analyze: port verb dispatching to verbs.[ch] API
authorLennart Poettering <lennart@poettering.net>
Tue, 26 Dec 2017 14:58:06 +0000 (15:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Dec 2017 15:04:10 +0000 (16:04 +0100)
commita6bcef29579409872735a2cfbf77d1c61ea91332
tree9f7ae4ae7120b6e6f8a141ad33b5f3a27c26159c
parentdfde7e8c5bd1a7846d9526b63c80d111dbd0c5e7
analyze: port verb dispatching to verbs.[ch] API

Let's unify the code for parsing command line verbs, and reuse the
common verbs.[ch] API in systemd-analyze too.

This adds a couple of error messages when people pass too many
arguments. Moreover thus pushes bus allocation into the verb functions,
which corrects a couple of cases where we previously allocated a bus but
really didn't need to.

Other than that behaviour shouldn't really change.
src/analyze/analyze.c