Skip to content
Commit 975c3025 authored by Signed-off by Yi Yang's avatar Signed-off by Yi Yang Committed by Len Brown
Browse files

ACPI: detect invalid argument written to /proc/acpi/alarm



/proc/acpi/alarm can't be set correctly, here is a sample:

[root@localhost /]# echo "2006 09" > /proc/acpi/alarm
[root@localhost /]# cat /proc/acpi/alarm
2007-12-09 09:09:09
[root@localhost /]# echo "2006 04" > /proc/acpi/alarm
[root@localhost /]# cat /proc/acpi/alarm
2007-12-04 04:04:04
[root@localhost /]#

Obviously, it is wrong, it should consider it as an invalid input.

after this patch:

[root@localhost /]# echo "2008 09" > /proc/acpi/alarm
-bash: echo: write error: Invalid argument
[root@localhost /]#

Signed-off-by: default avatarYi Yang <yi.y.yang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent c68cb23d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment