systemctl: clarify code - some actions never appear in arg_action (#6638)
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Thu, 31 Aug 2017 08:54:12 +0000 (09:54 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 31 Aug 2017 08:54:12 +0000 (10:54 +0200)
commit081dc6382276072a23bba23fe03ec7d9a27102e6
tree893252af2f084f60d99f78ce6ac2079565c76b77
parent58c6e4a2c00c47d0941cb978ec025b13e1798bf3
systemctl: clarify code - some actions never appear in arg_action (#6638)

ACTION_EMERGENCY and ACTION_DEFAULT would be handled correctly by
start_with_fallback().  However there is no fallback available for
them, and they would never be set in `arg_action` in the first
place.  Remove the unused cases from the switch statement.

@poettering suggested this makes a good place to clarify the point,
explicitly listing all the `arg_action` values which would never be
set.
src/systemctl/systemctl.c