/*
* 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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <macros.h>
#include <libdevinfo.h>
#define CFGA_PLUGIN_LIB
#include <config_admin.h>
#include "ap.h"
/*ARGSUSED*/
const char *ap_id,
const char *options,
struct cfga_confirm *confp,
char **errstring,
{
int cmd;
const char *name;
apd_t *a;
return (rc);
rc = CFGA_LIB_ERROR;
return (rc);
apd_free(a);
return (rc);
}
/*
* Check if this is a valid -x command.
*/
static int
{
char **f;
static char *
private_funcs[] = {
"assign",
"unassign",
"poweron",
"poweroff",
"passthru",
"errtest",
};
for (f = private_funcs; *f != NULL; f++)
break;
}
/*ARGSUSED*/
const char *function,
const char *ap_id,
const char *options,
struct cfga_confirm *confp,
char **errstring,
{
int cmd;
apd_t *a;
rc = CFGA_LIB_ERROR;
return (rc);
goto done;
goto done;
else if (cmd == CMD_ERRTEST)
else
done:
apd_free(a);
return (rc);
}
/*ARGSUSED*/
const char *ap_id,
const char *options,
char **errstring,
{
int cmd;
const char *f;
apd_t *a;
f = "test";
rc = CFGA_LIB_ERROR;
/*
* A test that is not sequenced by a change
* state operation should be forced.
*/
flags |= CFGA_FLAG_FORCE;
return (rc);
goto done;
else
done:
apd_free(a);
return (rc);
}
/*ARGSUSED*/
const char *ap_id,
int *nlist,
const char *options,
const char *listopts,
char **errstring,
{
int i;
int apcnt;
const char *f;
apd_t *a;
rc = CFGA_LIB_ERROR;
f = ap_cmd_name(CMD_STATUS);
return (rc);
goto done;
rc = CFGA_LIB_ERROR;
goto done;
}
/*
* Initialize the AP specified directly by the caller.
* The target ID for the 0th element already includes
* the (potential) dynamic portion. The dynamic portion
* does need to be appended to the path to form the
* physical apid for components.
*/
/*
* Initialize the components, if any.
*/
ap_cm_init(a, ap, i);
DBG("ap_phys_id=%s ap_log_id=%s\n",
}
} else
ap_cm_init(a, ap, 0);
apd_free(a);
*ap_id_list = aplist;
return (CFGA_OK);
done:
apd_free(a);
return (rc);
}
/*ARGSUSED*/
{
}
/*
* cfga_ap_id_cmp -- use default_ap_id_cmp() in libcfgadm
*/