Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2009 18:00:53 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191699 - head/sys/dev/acpica
Message-ID:  <200904301800.n3UI0rU9019118@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Thu Apr 30 18:00:53 2009
New Revision: 191699
URL: http://svn.freebsd.org/changeset/base/191699

Log:
  Fix off-by-one bug.  S5 state must be checked as well.

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Thu Apr 30 17:47:52 2009	(r191698)
+++ head/sys/dev/acpica/acpi.c	Thu Apr 30 18:00:53 2009	(r191699)
@@ -3317,7 +3317,7 @@ acpi_sleep_state_sysctl(SYSCTL_HANDLER_A
 	new_state = acpi_sname2sstate(sleep_state);
 	if (new_state < ACPI_STATE_S1)
 	    return (EINVAL);
-	if (new_state < ACPI_S_STATES_MAX && !acpi_sleep_states[new_state])
+	if (new_state < ACPI_S_STATE_COUNT && !acpi_sleep_states[new_state])
 	    return (EOPNOTSUPP);
 	if (new_state != old_state)
 	    *(int *)oidp->oid_arg1 = new_state;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904301800.n3UI0rU9019118>