ap.c revision 2
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A#include <libdevinfo.h>
2N/A#define CFGA_PLUGIN_LIB
2N/A#include <config_admin.h>
goto done;
phys = 0;
goto done;
if (phys) {
goto done;
s = base;
goto done;
a->inst = i;
a->minor = s;
if (t != NULL)
len = 0;
goto done;
a->cid = p;
goto done;
goto done;
goto done;
goto done;
a->cnum = i;
done:
switch (rc) {
case ERR_NONE:
case ERR_CM_INVAL:
ap_cmd_names[] = {
ap_cmd_name(int i)
ap_opt_names[] = {
ap_opt_name(int i)
return (ap_opt_names[i]);
int cmd;
} ap_cmd_t;
#define NULOPT 0
static ap_cmd_t
ap_cmds[] = {
{CMD_NONE, 0, 0, 0, 0, 0, 0, 0 }
#define AP_VMASK (\
#if SBD_DEBUG
int rc;
case CFGA_CMD_CONNECT:
c = CMD_CONNECT;
case CFGA_CMD_DISCONNECT:
c = CMD_DISCONNECT;
case CFGA_CMD_CONFIGURE:
c = CMD_CONFIGURE;
case CFGA_CMD_UNCONFIGURE:
c = CMD_UNCONFIGURE;
case CFGA_CMD_LOAD:
case CFGA_CMD_UNLOAD:
c = CMD_NONE;
c = CMD_NONE;
*cmd = c;
return (rc);
return (CMD_NONE);
if (*p == NULL)
i = CMD_NONE;
char *optstr;
int opt;
int omask;
char *value;
char *optname;
switch (opt) {
case OPT_SIM:
case OPT_PARSABLE:
case OPT_UNASSIGN:
case OPT_CODE:
if (p > value)
case OPT_MID:
case OPT_ERR:
if (p > value)
case OPT_NOPOWEROFF:
case OPT_PLATFORM:
static ap_cmd_t *
return (NULL);
return (acp);
int all;
int tgt;
int target;
#ifdef _SBD_DEBUG
ap_cmds_dump();
return (rc);
* option being specified or if we are configuring/unconfiguring
case CMD_STATUS:
case CMD_CONFIGURE:
case CMD_UNCONFIGURE:
case CMD_CONNECT:
case CMD_DISCONNECT:
a->statonly = 0;
all = 0;
a->statonly = 0;
return (rc);
if (c == CMD_STATUS)
#ifdef __x86
case CMD_STATUS:
case CMD_CONFIGURE:
case CMD_PASSTHRU:
if (cmd)
*cmd = c;
return (rc);
int cnt;
return (cnt);