subr_power.c (116182) | subr_power.c (124079) |
---|---|
1/*- 2 * Copyright (c) 2001 Mitsuru IWASAKI 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Mitsuru IWASAKI 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/subr_power.c 116182 2003-06-11 00:56:59Z obrien $"); | 28__FBSDID("$FreeBSD: head/sys/kern/subr_power.c 124079 2004-01-02 18:24:13Z njl $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/proc.h> 33 34#include <sys/power.h> 35 36static u_int power_pm_type = POWER_PM_TYPE_NONE; --- 54 unchanged lines hidden (view full) --- 91void 92power_profile_set_state(int state) 93{ 94 int changed; 95 96 if (state != power_profile_state) { 97 power_profile_state = state; 98 changed = 1; | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/proc.h> 33 34#include <sys/power.h> 35 36static u_int power_pm_type = POWER_PM_TYPE_NONE; --- 54 unchanged lines hidden (view full) --- 91void 92power_profile_set_state(int state) 93{ 94 int changed; 95 96 if (state != power_profile_state) { 97 power_profile_state = state; 98 changed = 1; |
99 printf("system power profile changed to '%s'\n", 100 (state == POWER_PROFILE_PERFORMANCE) ? "performance" : "economy"); | 99 if (bootverbose) { 100 printf("system power profile changed to '%s'\n", 101 (state == POWER_PROFILE_PERFORMANCE) ? 102 "performance" : "economy"); 103 } |
101 } else { 102 changed = 0; 103 } 104 105 if (changed) 106 EVENTHANDLER_INVOKE(power_profile_change, 0); 107} 108 | 104 } else { 105 changed = 0; 106 } 107 108 if (changed) 109 EVENTHANDLER_INVOKE(power_profile_change, 0); 110} 111 |