/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "cfga_fp.h"
/*
* This file contains the entry points to the plug-in as defined in the
* config_admin(3X) man page.
*/
/*
* Set the version number
*/
/*ARGSUSED*/
const char *ap_id,
const char *options,
struct cfga_confirm *confp,
char **errstring,
{
int portIndex;
}
/* Check for super user priveleges */
if (geteuid() != 0) {
return (CFGA_PRIV);
}
/* Only configure and unconfigure operations are supported */
if (state_change_cmd != CFGA_CMD_CONFIGURE &&
return (CFGA_OPNOTSUPP);
}
}
/* Use getsubopt() if more options get added */
while (*hw_option_p != '\0') {
case OPT_DISABLE_RCM :
break;
case OPT_FORCE_UPDATE_REP :
break;
case OPT_NO_UPDATE_REP :
break;
case OPT_REMOVE_UNUSABLE_FCP_DEV :
if (state_change_cmd != CFGA_CMD_UNCONFIGURE) {
options, 0);
apidt_free(&apidt);
return (CFGA_ERROR);
}
break;
default :
/* process unknonw option. */
options, 0);
apidt_free(&apidt);
return (CFGA_ERROR);
}
}
}
/* invalid option specified. */
apidt_free(&apidt);
return (CFGA_ERROR);
}
/*
* Yes - so change state of the particular device
*
* First Get the WWN in la_wwn_t form
*/
return (err_cvt(FPCFGA_LIB_ERR));
}
FPCFGA_OK) {
}
} else {
/* Change state of all devices on FCA and the FCA itself */
}
apidt_free(&apidt);
}
/*ARGSUSED*/
const char *func,
const char *ap_id,
const char *options,
struct cfga_confirm *confp,
char **errstring,
{
}
if (geteuid() != 0) {
return (CFGA_PRIV);
}
return (CFGA_OPNOTSUPP);
}
/*ARGSUSED*/
const char *ap_id,
const char *options,
char **errstring,
{
}
if (geteuid() != 0) {
return (CFGA_PRIV);
}
return (CFGA_OPNOTSUPP);
}
/*ARGSUSED*/
const char *ap_id,
int *nlistp,
const char *options,
const char *listopts,
char **errstring,
{
"show_FCP_dev", NULL};
}
/* Check for super user privileges */
if (geteuid() != 0) {
return (CFGA_PRIV);
}
return (CFGA_ERROR);
}
*ap_id_list = NULL;
*nlistp = 0;
/* Use getsubopt() if more options get added */
while (*hw_option_p != '\0') {
case OPT_DEVINFO_FORCE :
break;
case OPT_FCP_DEV :
case OPT_SHOW_SCSI_LUN:
fp_flags |= FLAG_FCP_DEV;
break;
default :
/* process unknonw option. */
options, 0);
return (CFGA_ERROR);
}
}
}
/* if force_devinfo is specified check uid = 0 or not. */
(geteuid() != 0)) {
return (CFGA_PRIV);
}
fca = 0;
fca = 1;
}
expand = 0;
expand = 1;
}
/*
* We expand published attachment points but not
* dynamic attachment points
*/
if (!fca) { /* Stat a single device - no expansion for devices */
} else if (!expand) { /* Stat only the HBA */
} else { /* Expand HBA attachment point */
}
ldatalistp = NULL;
nelem = 0;
}
} else {
!= FPCFGA_OK) {
}
}
apidt_free(&apidt);
}
apidt_free(&apidt);
}
} else {
}
}
/*ARGSUSED*/
{
return (CFGA_OK);
}
/*ARGSUSED*/
int
{
int i = 0;
long long ret;
return (0);
}
/* Return a negative value */
} else {
}
}
/*
* Search for first different char
*/
i++;
if ((ap_id1[i] == '\0') &&
return (0);
} else if ((ap_id2[i] == '\0') &&
return (0);
}
/*
* If one of the char is a digit, back up to where the
* number started, compare the number.
*/
i--;
if (ret > 0) {
return (1);
} else if (ret < 0) {
return (-1);
} else {
return (0);
}
}
}
/* One of them isn't a number, compare the char */
}