]> xenbits.xensource.com Git - xenclient/kernel.git/commit
Fix CMOS time error after writing /proc/acpi/alarm
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 27 Jun 2008 13:46:41 +0000 (14:46 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 27 Jun 2008 13:46:41 +0000 (14:46 +0100)
commit559e4069be2b9ecaebe83d1f41370dc4929378dd
treebeef020d6c8fa4327ca0554d7a29e6d29ea64d7c
parentc22e256abfad0181b195ed9f0e7b92e0c1824bbf
Fix CMOS time error after writing /proc/acpi/alarm

When writing /proc/acpi/alarm in adjust mode, e.g.
        echo "+0000-00-00 00:00:15" >/proc/acpi/alarm
The "century" field should be read and added to "year" field before
writing, otherwise the CMOS time will go back to 2000 years ago, e.g.
        # cat /proc/acpi/alarm
        0008-06-21 11:38:46=20
Then the system time may be reset to the date of manufacture after
rebooting. This patch fixes this issue.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
drivers/acpi/sleep/proc.c