cfga_rcm.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 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 2003 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * rsrc - Resource name (typically an ap_id) 2N/A * errstring - Error message filled in case of a failure 2N/A * rsrc_fixed - Pointer to fixed path 2N/A * flags - flags to RCM 2N/A * CFGA_IB_OK on success or an appropriate error 2N/A * Offline IB resource consumers. 2N/A DPRINTF(
"ib_rcm_offline: rcm_request_offline failed\n");
2N/A * rsrc - Resource name (typically an ap_id) 2N/A * errstring - Error message filled in case of a failure 2N/A * rsrc_fixed - Pointer to fixed path 2N/A * flags - flags to RCM 2N/A * CFGA_IB_OK on success or an appropriate error 2N/A * Online IB resource consumers that were previously offlined. 2N/A DPRINTF(
"ib_rcm_online: rcm_notify_online failed\n");
2N/A * rsrc - Resource name (typically an ap_id) 2N/A * errstring - Error message filled in case of a failure 2N/A * rsrc_fixed - Pointer to fixed path 2N/A * flags - flags to RCM 2N/A * CFGA_IB_OK on success or an appropriate error 2N/A * Remove IB resource consumers after their kernel removal. 2N/A DPRINTF(
"ib_rcm_remove: rcm_notify_remove failed\n");
2N/A * rsrc - Resource name (typically an ap_id) 2N/A * flags - flags to RCM 2N/A * errstring - Error message filled in case of a failure 2N/A * rflags - Flags filled up in case of a failure 2N/A * CFGA_IB_OK on success or an appropriate error 2N/A * Contains common initialization code for entering a ib_rcm_xx() routine. 2N/A /* Validate the rsrc argument */ 2N/A /* Translate the cfgadm flags to RCM flags */ 2N/A /* Get a handle for the RCM operations */ 2N/A * rinfo - Resource information 2N/A * table - table to be printed 2N/A * CFGA_IB_OK on success or an appropriate error 2N/A * Takes an opaque rcm_info_t pointer and a character pointer, 2N/A * and appends the rcm_info_t data in the form of a table to the 2N/A * given character pointer. 2N/A /* Protect against invalid arguments */ 2N/A /* Set localized table header strings */ 2N/A /* A first pass, to size up the RCM information */ 2N/A /* If nothing was sized up above, stop early */ 2N/A /* Adjust column widths for column headings */ 2N/A * Compute the total line width of each line, 2N/A * accounting for intercolumn spacing. 2N/A /* Allocate space for the table */ 2N/A /* Place a table header into the string */ 2N/A /* The resource header */ 2N/A /* The information header */ 2N/A /* Underline the headers */ 2N/A /* Construct the format string */ 2N/A /* Add the tuples to the table string */