summaryrefslogtreecommitdiff
path: root/sys-utils/rtcwake.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-26rtcwake: use err.h routinesKarel Zak1-71/+57
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26rtcwake: add 'show' mode for rtc alarmMarek Otahal1-20/+90
The 'show' mode prints information on current alarm setting. [kzak@redhat.com: - code clean up - don't setup alarm on 'disable' mode] Signed-off-by: Marek Otahal <markotahal@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-01sys-utils: make use xalloc wrappersDavidlohr Bueso1-5/+2
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-04-23rtcwake : add disable action for rtc alarmMarek Otahal1-1/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-08rtcwake: add --dry-run optionKarel Zak1-17/+31
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-08rtcwake: does miss the "off" optionKarel Zak1-5/+19
Reported-by: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=580296 Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-07rtcwake: ignore the tm_isdst field returned from the RTCPaul Fox1-1/+1
Signed-off-by: Paul Fox <pgf@laptop.org>
2009-09-07rtcwake: add S5 supportKarel Zak1-1/+23
Based on patch from Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> at https://bugzilla.redhat.com/show_bug.cgi?id=449115 Piergiorgio's note about S5: > According to the ACPI specifications, chapter 4.7.2.4 "Real Time > Clock Alarm", the wakeup from RTC, when supported, should work from > *sleep* state S1-S3 and, optionally, from S4. > > Note 3 (same chapter) says that S5 is *not* a sleep state and should > not be supported. Actually it also says that: "The OS will disable > the RTC_EN bit prior to entering the G2/S5 or G3 states regardless." > > Nevertheless, on all PC supporting the RTC wakeup I tested, all were > able to wake from S5. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-08-21replace usleep() for systems that don't have themDaniel Mierswa1-0/+1
This function is marked obsolete in POSIX.1-2001 and removed in POSIX.1-2008. Conditionally replaced with nanosleep(). Signed-off-by: Daniel Mierswa <impulze@impulze.org>
2009-01-26rtcwake: support not suspendingMarco d'Itri1-4/+8
People usually want to use pm-utils to suspend the system instead of the raw kernel interface, so I added an option to just exit after configuring the wakeup time. Actually I think that all the suspend code should be removed from rtcwake, since it does not really belong there. Signed-off-by: Marco d'Itri <md@linux.it>
2008-08-06rtcwake: cleanup return codesKarel Zak1-14/+14
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-06rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SETGabriel Burt1-18/+17
rtcwake: Prefer RTC_WKALM_SET over RTC_ALM_SET, fixing bug with not waking up with new RTCs. Also, return error if unable to set the alarm. Signed-off-by: Gabriel Burt <gburt@novell.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2008-06-09rtcwake: fix the default mode to "standby"Paulius Zaleckas1-1/+1
Writing "suspend" to /sys/power/state does nothing. Even "man rtcwake" says that default should be "standby" :) Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: Karel Zak <kzak@redhat.com>
2008-02-15rtcwake: fix typo SATE -> STATEMike Frysinger1-3/+3
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-02-15rtcwake: include libgen.h for basename prototypeMike Frysinger1-0/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-02-08rtcwake: fix UTC time usageDavid Brownell1-1/+11
Timezone handling is broken in this version since it's always passing UTC time into the kernel, even on systems where the RTC uses the local timezone. I think that bug must come from bugs in how the system used to to originally develop this code handled the RTC timezone. Both RTCs should have been kept in UTC ... but only one of them was. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2007-12-03rtcwake: misc cleanupsDavid Brownell1-20/+28
Cleanups for rtcwake: - Minor doc updates: highlight the framebuffer problem, give correct history of this code - Improve debug output - Fix some linelength bugs Note that this code predated the sysfs "wakealarm" mechanism, and works around several now-fixed bugs in the kernel RTC framework. Nowadays it would make sense to make this program use only the sysfs interface to the RTC, using "since_epoch" instead of RTC_RD_TIME and "wakealarm" instead of the four other ioctls. That could simplify the mess involved in timezone handling. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-11rtcwake: fix typoKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-04rtcwake: fix verbose messageKarel Zak1-2/+2
Just make NLS transtalors more happy. (rh#292081) Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-16misc-util: new rtcwake commandBernhard Walle1-0/+465
Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>