Summary: | [patch] powerd(8) doesn't honor the -n flag | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Axel Gonzalez <loox> | ||||
Component: | bin | Assignee: | Christian Brueffer <brueffer> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 9.0-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Axel Gonzalez
2012-07-11 03:50:10 UTC
I suspect this is correct, but cc'ing acpi@ to see if anyone there has any comments. -- John Baldwin Responsible Changed From-To: freebsd-amd64->freebsd-bugs reclassify. Author: brueffer Date: Tue Feb 11 15:16:49 2014 New Revision: 261773 URL: http://svnweb.freebsd.org/changeset/base/261773 Log: In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez <loox at e-shell.net> Reviewed by: jhb MFC after: 2 weeks Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Tue Feb 11 13:33:03 2014 (r261772) +++ head/usr.sbin/powerd/powerd.c Tue Feb 11 15:16:49 2014 (r261773) @@ -279,6 +279,7 @@ static void acline_init(void) { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: open->patched Committed. thanks! Sorry for the long waiting time. Responsible Changed From-To: freebsd-bugs->brueffer MFC reminder. Author: brueffer Date: Tue Feb 25 07:55:03 2014 New Revision: 262474 URL: http://svnweb.freebsd.org/changeset/base/262474 Log: MFC: r261773 In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez <loox at e-shell.com> Reviewed by: jhb Modified: stable/10/usr.sbin/powerd/powerd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/powerd/powerd.c ============================================================================== --- stable/10/usr.sbin/powerd/powerd.c Tue Feb 25 07:40:37 2014 (r262473) +++ stable/10/usr.sbin/powerd/powerd.c Tue Feb 25 07:55:03 2014 (r262474) @@ -279,6 +279,7 @@ static void acline_init(void) { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Author: brueffer Date: Tue Feb 25 07:57:17 2014 New Revision: 262475 URL: http://svnweb.freebsd.org/changeset/base/262475 Log: MFC: r261773 In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez <loox at e-shell.com> Reviewed by: jhb Modified: stable/9/usr.sbin/powerd/powerd.c Directory Properties: stable/9/usr.sbin/powerd/ (props changed) Modified: stable/9/usr.sbin/powerd/powerd.c ============================================================================== --- stable/9/usr.sbin/powerd/powerd.c Tue Feb 25 07:55:03 2014 (r262474) +++ stable/9/usr.sbin/powerd/powerd.c Tue Feb 25 07:57:17 2014 (r262475) @@ -278,6 +278,7 @@ static void acline_init(void) { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Author: brueffer Date: Tue Feb 25 07:59:33 2014 New Revision: 262476 URL: http://svnweb.freebsd.org/changeset/base/262476 Log: MFC: r261773 In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez <loox at e-shell.com> Reviewed by: jhb Modified: stable/8/usr.sbin/powerd/powerd.c Directory Properties: stable/8/usr.sbin/powerd/ (props changed) Modified: stable/8/usr.sbin/powerd/powerd.c ============================================================================== --- stable/8/usr.sbin/powerd/powerd.c Tue Feb 25 07:57:17 2014 (r262475) +++ stable/8/usr.sbin/powerd/powerd.c Tue Feb 25 07:59:33 2014 (r262476) @@ -274,6 +274,7 @@ static void acline_init() { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: patched->closed Merge to stable branches done. |