]> Git Repo - linux.git/commit - drivers/acpi/proc.c
ACPI: detect invalid argument written to /proc/acpi/alarm
authorSigned-off by Yi Yang <[email protected]>
Fri, 28 Dec 2007 02:50:42 +0000 (21:50 -0500)
committerLen Brown <[email protected]>
Fri, 28 Dec 2007 03:19:27 +0000 (22:19 -0500)
commit975c30257e75c3d067d4858f60963b80fc6bd0e4
tree27c64337e2109c0704ae6a47a6169618dfb64dea
parentc68cb23dde29fb107575656effa46f7b9440ac04
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: Yi Yang <[email protected]>
Signed-off-by: Len Brown <[email protected]>
drivers/acpi/sleep/proc.c
This page took 0.0484 seconds and 4 git commands to generate.