diff options
author | Simon Rettberg | 2017-11-27 16:55:17 +0100 |
---|---|---|
committer | Your Name | 2017-11-27 16:55:17 +0100 |
commit | 336c8ad9ab471a8ad98c42308270553587de7c71 (patch) | |
tree | c5878530cde5a9e3c7f32ac25c33aec1ccfed8e8 /core/modules/busybox | |
parent | ganz klasse (diff) | |
download | mltk-336c8ad9ab471a8ad98c42308270553587de7c71.tar.gz mltk-336c8ad9ab471a8ad98c42308270553587de7c71.tar.xz mltk-336c8ad9ab471a8ad98c42308270553587de7c71.zip |
[busybox] Giving up on clean patches; add huge compat patch (to util-linux)
- Introduce 'no' option for -m to just set alarm without standby
- Introduce 'disable' option for -m to delete any current alarm
- When unsetting alarm, apply same logic as in setup_alarm regarding
which kind of alarm to set (or disable in this case). Note that
"-m disable" will clear both alarm types.
- Default to /dev/rtc0 since using /dev/rtc was broken (couldn't determine
wake support and bailed out).
Diffstat (limited to 'core/modules/busybox')
-rw-r--r-- | core/modules/busybox/module.build | 5 | ||||
-rw-r--r-- | core/modules/busybox/rtcwake-default-rtc0.patch | 13 | ||||
-rw-r--r-- | core/modules/busybox/rtcwake-mode-no.patch | 16 |
3 files changed, 1 insertions, 33 deletions
diff --git a/core/modules/busybox/module.build b/core/modules/busybox/module.build index 3124de81..c6557f91 100644 --- a/core/modules/busybox/module.build +++ b/core/modules/busybox/module.build @@ -13,10 +13,7 @@ fetch_source() { git apply "${MODULE_DIR}/fbsplash-fillbg.patch" || perror "Could not apply busybox patch for fbsplash background filling" fi if ! grep -q 'suspend.*"no"' "util-linux/rtcwake.c"; then - git apply "${MODULE_DIR}/rtcwake-mode-no.patch" || perror "Could not apply busybox patch for rtcwake 'no'-mode" - fi - if ! grep -q 'rtc0' "util-linux/rtcwake.c"; then - git apply "${MODULE_DIR}/rtcwake-default-rtc0.patch" || perror "Could not apply busybox patch for rtcwake default to rtc0" + git apply "${MODULE_DIR}/rtcwake-compat.patch" || perror "Could not apply busybox patch for rtcwake compat with util-linux" fi cd .. || perror "cd .. failed" } diff --git a/core/modules/busybox/rtcwake-default-rtc0.patch b/core/modules/busybox/rtcwake-default-rtc0.patch deleted file mode 100644 index cc411cd5..00000000 --- a/core/modules/busybox/rtcwake-default-rtc0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c -index 8aee0cf..6693305 100644 ---- a/util-linux/rtcwake.c -+++ b/util-linux/rtcwake.c -@@ -122,7 +122,7 @@ int rtcwake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int rtcwake_main(int argc UNUSED_PARAM, char **argv) - { - unsigned opt; -- const char *rtcname = NULL; -+ const char *rtcname = "/dev/rtc0"; - const char *suspend = "standby"; - const char *opt_seconds; - const char *opt_time; diff --git a/core/modules/busybox/rtcwake-mode-no.patch b/core/modules/busybox/rtcwake-mode-no.patch deleted file mode 100644 index 49c61f89..00000000 --- a/core/modules/busybox/rtcwake-mode-no.patch +++ /dev/null @@ -1,16 +0,0 @@ -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 { |