diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-05-31 06:18:44 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-07-17 18:14:32 +0200 |
commit | a99935557a664d6e70dc03944216834c224532b1 (patch) | |
tree | bcc7e876016efde38c77847426202b444bb27369 /src/sleep | |
parent | core/dbus-unit: add an explicit bus error when unit is frozen by parent (diff) | |
download | systemd-a99935557a664d6e70dc03944216834c224532b1.tar.xz systemd-a99935557a664d6e70dc03944216834c224532b1.zip |
sleep: explicitly list valid sleep operations in switch
To follow our usual coding style.
Diffstat (limited to 'src/sleep')
-rw-r--r-- | src/sleep/sleep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index d8491ca7b3..88fb5ecab2 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -631,10 +631,13 @@ static int run(int argc, char *argv[]) { break; - default: + case SLEEP_SUSPEND: + case SLEEP_HIBERNATE: r = execute(sleep_config, arg_operation, NULL); break; + default: + assert_not_reached(); } if (user_slice_freezer) |