/*
* 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 (c) 2010, Intel Corporation.
* All rights reserved.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <config_admin.h>
#include <strings.h>
#include <syslog.h>
#include <libsysevent.h>
#include <libdevinfo.h>
#include <libnvpair.h>
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <stropts.h>
#include <sys/sbd_ioctl.h>
#define STATUS_INPROGRESS 0
static char *s_status_array[] = {
};
extern void debug_print(int, const char *, ...);
/*ARGSUSED*/
static int
{
return (0);
}
/*ARGSUSED*/
static int
{
return (CFGA_OK);
}
static char *
{
char *opt;
if (cmd == SBD_CMD_PASSTHRU) {
}
} else {
}
}
return (opt);
}
static int
char *acpi_event_type, int status,
{
char *plat_opts;
debug_print(0,
"failed to generate platform option string for cfgadm");
return (-1);
}
switch (cmd) {
case SBD_CMD_CONNECT:
debug_print(0, "cfgadm('connect', '%s') failed, "
}
break;
case SBD_CMD_CONFIGURE:
debug_print(0, "cfgadm('configure', '%s') failed, "
}
break;
case SBD_CMD_ASSIGN:
debug_print(0, "cfgadm('assign', '%s') failed, "
}
break;
case SBD_CMD_POWERON:
debug_print(0, "cfgadm('poweron', '%s') failed, "
}
break;
case SBD_CMD_PASSTHRU:
debug_print(0, "cfgadm('passthru', '%s') failed, "
}
break;
default:
ret = CFGA_ERROR;
break;
}
}
static int
{
debug_print(2,
"Event is not supported (ap_id = %s, req = %s)",
return (-1);
}
goto L_ERR;
}
"board '%s' has been assigned successfully", ap_id);
goto L_ERR_SIG;
}
"board '%s' has been powered on successfully", ap_id);
goto L_ERR_SIG;
}
"board '%s' has been connected successfully", ap_id);
goto L_ERR_SIG;
}
"board '%s' has been configured successfully", ap_id);
(void) system(PMCONFIG_PATH);
"board '%s' has been added into system successfully", ap_id);
return (0);
return (-1);
}
void
{
debug_print(2,
"vendor id of message is not '%s'", SUNW_VENDOR);
goto L_EXIT;
}
goto L_EXIT;
}
debug_print(2,
debug_print(2,
"subclass of message is not '%s'", ESC_DR_REQ);
goto L_EXIT;
}
debug_print(2,
"can't retrieve attribute list from DR message");
goto L_EXIT;
}
debug_print(2,
"can't retrieve '%s' property from attribute list",
DR_AP_ID);
goto L_EXIT;
}
goto L_EXIT;
}
debug_print(2,
"can't retrieve '%s' property from attribute list",
goto L_EXIT;
}
goto L_EXIT;
}
&acpi_event_type) != 0) {
debug_print(2,
"can't retrieve '%s' property from attribute list",
goto L_EXIT;
}
goto L_EXIT;
}
}
}
/* No need to free class & subclass. */
}