summaryrefslogtreecommitdiffstats
path: root/core/modules/busybox/rtcwake-mode-no.patch
blob: 49c61f89110a859a866baf7cd7c9195449ad379d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index 8aee0cf..0082e29 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -211,6 +211,11 @@ int rtcwake_main(int argc UNUSED_PARAM, char **argv)
 	fflush_all();
 	usleep(10 * 1000);
 
+	if (strcmp(suspend, "no") == 0) {
+		printf("just setting alarm, no powersaving mode requested\n");
+		return EXIT_SUCCESS;
+	}
+
 	if (strcmp(suspend, "on") != 0)
 		xopen_xwrite_close(SYS_POWER_PATH, suspend);
 	else {