/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* PICL Littleneck platform plug-in to create environment tree nodes.
*/
#include <picl.h>
#include <picltree.h>
#include <stdio.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <libintl.h>
#include <limits.h>
#include <ctype.h>
#include <errno.h>
#include <semaphore.h>
#include <syslog.h>
#include <string.h>
#include <sys/systeminfo.h>
#include <psvc_objects.h>
typedef struct {
} picl_psvc_t;
extern struct handle {
} psvc_hdl;
void psvc_psr_plugin_init(void);
void psvc_psr_plugin_fini(void);
"PSVC_PSR",
};
#define PTREE_GET_NODE_ERR \
gettext("%s: ptree_get_node_by_path() failed: %s\n")
extern int ptree_get_node_by_path(const char *, picl_nodehdl_t *);
struct node_file {
} dev_pr_info[] = {
{"/SYSTEM/CPU0_MOD_CARD",
{"/SYSTEM/CPU1_MOD_CARD",
{"/SYSTEM/AT24C64_A0_1",
{"/SYSTEM/AT24C64_A2_1",
{"/SYSTEM/AT24C64_A4_1",
{"/SYSTEM/AT24C64_A6_1",
{"/SYSTEM/AT24C64_A8_1",
{"/SYSTEM/AT24C64_AA_1",
{"/SYSTEM/AT24C64_AC_1",
{"/SYSTEM/AT24C64_AE_1",
};
{
}
void
psvc_psr_plugin_init(void)
{
int32_t i;
int err;
/*
* psvc or picl
*/
if (err != 0) {
}
/*
* Remove nodes whose devices aren't present from the picl tree.
*/
&present);
if (err != PSVC_SUCCESS)
continue;
&features);
if (err != PSVC_SUCCESS)
continue;
(present == PSVC_ABSENT)) {
if (err != 0) {
picl_strerror(err));
return;
}
}
}
/*
* Remove PICL device nodes if their /devices file isn't present or
* if the device file is present but the open returns ENXIO
* which indicates that the node file doesn't represent a device
* tree node and is probably a relic from some previous boot config
*/
for (i = 0; i < DEV_PR_COUNT; ++i) {
int fd;
if (fd != -1) {
continue;
}
continue;
if (err != 0) {
picl_strerror(err));
return;
}
if (err != 0) {
picl_strerror(err));
return;
}
}
}
void
psvc_psr_plugin_fini(void)
{
}
void
psvc_psr_plugin_register(void)
{
}