2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * Implement Operations for Active Power Management Properties 2N/A/* Property value validation routines for use by setprop */ 2N/A const char *,
void **);
2N/A const char *,
void **);
2N/A const char *,
void **);
2N/A * An error occurred in the SMF layer. Return that information 2N/A * to the caller for processing. 2N/A * Some properties that are returned by the libscf simple 2N/A * interface are actually internal to the SMF implementation. 2N/A * To avoid the user changing their values here, where it is 2N/A * inappropriate, those properties are specifically excluded 2N/A * from the result set. 2N/A /* Add the value, if any, to the result list */ 2N/A "%s property %s has no value. Skipping\n",
2N/A /* Not having a value is OK */ 2N/A "%s property %s is in the exclude list\n",
2N/A /* Check the next property */ 2N/A /* Retrieve all of the SMF properties for property information */ 2N/A * An error occurred in the SMF layer. Return that information 2N/A * to the caller for processing. 2N/A /* Extract the property name from the incoming nvpair */ 2N/A * Find the SMF property that matches this property name. Note that 2N/A * the power service uses multiple property groups, but the property 2N/A * namespace is unique (otherwise this would not be valid) 2N/A /* Check the next property */ 2N/A "%s could not find SMF property %s instance %s\n",
2N/A /* The new value comes in as a string value */ 2N/A * We now have the property from SCF, which is authoritative. 2N/A * Initialize the property vector using this information 2N/A /* Write the property vector to SMF */ 2N/A /* Clean up allocated memory and return to the caller */ 2N/A /* The value was allocated by the property validator */ 2N/A /* Write the property vector to the SMF database */ 2N/A "%s scf_write_propvec prop %s failed %d (%s)\n",
2N/A "%s property %s type %d number of values %d\n",
2N/A /* Retrieve all of the properties from SMF */ 2N/A * An error occurred in the SMF layer. Return that information 2N/A * to the caller for processing. 2N/A /* Find the property in the result list */ 2N/A * The property exists in the result list. Check 2N/A * for a property group name. 2N/A * Could not find the property group name for 2N/A * this property. Add it now. 2N/A "%s adding property group name for " 2N/A "%s could not find property %s in result set\n",
2N/A /* Check the next property */ 2N/A /* Call the validation routine for this property */ 2N/A /* Validate that this property takes a string */ 2N/A /* Validate that the given string is a valid authority */ 2N/A /* The authority is valid. Make a copy and return to the caller */ 2N/A /* Validate that this property takes a boolean */ 2N/A /* Validate that the given string is a valid boolean */ 2N/A "%s invalid boolean \"%s\" for property %s\n",
2N/A /* The boolean is valid. Make a copy and return to the caller */ 2N/A /* Validate that this property takes an integer */ 2N/A * Validate that the given string is a valid integer for the power 2N/A * service (they are all non-negative) 2N/A "%s invalid integer \"%s\" for property %s\n",
2N/A /* The boolean is valid. Make a copy and return to the caller */