[Toybox] [PATCH] Add rtcwake.

enh enh at google.com
Wed Apr 1 12:35:30 PDT 2020


Some of the bringup folks are debugging RTC issues and asked for this.

Rather than duplicate the weird xtzset dance with mktime, I've factored
that out into a new xmktime that takes a boolean for whether to use UTC
or local time.

Otherwise, the slight cleanup of hwclock.c is entirely optional. The
only functional change there is that util-linux 2.34's hwclock uses ISO
time format, which is the usual toybox preference anyway, so I've
switched it over to that rather than ctime(3).

Bug: http://b/152042947
---
 lib/lib.h              |   1 +
 lib/portability.h      |   1 +
 lib/xwrap.c            |  13 ++++
 toys/other/hwclock.c   |  60 ++++++------------
 toys/pending/rtcwake.c | 134 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 169 insertions(+), 40 deletions(-)
 create mode 100644 toys/pending/rtcwake.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-rtcwake.patch
Type: text/x-patch
Size: 10225 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200401/9bf0174d/attachment-0002.bin>


More information about the Toybox mailing list