mirror of
https://github.com/systemd/systemd.git
synced 2025-02-28 05:57:33 +03:00
rfkill: Avoid error when state restore is disabled
When the state restore is disabled, we would print: "Unknown verb: load" instead of simply skipping loading the state.
This commit is contained in:
parent
a8d4cac55c
commit
354806fb46
@ -95,9 +95,12 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (streq(argv[1], "load") && shall_restore_state()) {
|
||||
if (streq(argv[1], "load")) {
|
||||
_cleanup_free_ char *value = NULL;
|
||||
|
||||
if (!shall_restore_state())
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
r = read_one_line_file(saved, &value);
|
||||
if (r < 0) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user