fault.c revision f6e214c7418f43af38bd8c3a557e3d0a1d311cfa
/*
* 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
*/
/*
*/
#include <fmdump.h>
#include <stdio.h>
#include <strings.h>
/*ARGSUSED*/
static int
{
static const struct {
const char *class;
const char *tag;
} tags[] = {
{ FM_LIST_SUSPECT_CLASS, "Diagnosed" },
{ FM_LIST_REPAIRED_CLASS, "Repaired" },
{ FM_LIST_RESOLVED_CLASS, "Resolved" },
{ FM_LIST_UPDATED_CLASS, "Updated" },
{ FM_LIST_ISOLATED_CLASS, "Isolated" },
};
int i;
break;
}
}
}
return (0);
}
static int
{
if (size != 0) {
}
for (i = 0; i < size; i++) {
== 0) {
sizeof (FM_FMRI_LEGACY_HC_PREFIX)) == 0)
}
if (ba[i] & FM_SUSPECT_FAULTY)
else if (ba[i] & FM_SUSPECT_NOT_PRESENT)
else if (ba[i] & FM_SUSPECT_REPLACED)
else if (ba[i] & FM_SUSPECT_REPAIRED)
else if (ba[i] & FM_SUSPECT_ACQUITTED)
else
}
return (0);
}
static int
{
uint_t i;
}
}
}
}
if (pctl)
else
return (0);
}
static int
{
}
static int
{
int rc;
}
return (rc);
}
/*
* There is a lack of uniformity in how the various entries in our diagnosis
* are terminated. Some end with one newline, others with two. This makes the
* output of fmdump -m look a bit ugly. Therefore we postprocess the message
* before printing it, removing consecutive occurences of newlines.
*/
static void
postprocess_msg(char *msg)
{
int i = 0, j = 0;
char *buf;
return;
}
buf[j] = '\0';
}
/*ARGSUSED*/
static int
{
char *msg;
g_errs++;
return (-1);
} else {
}
return (0);
}
const fmdump_ops_t fmdump_flt_ops = {
"fault", {
{
"TIME UUID SUNW-MSG-ID "
"EVENT",
}, {
"TIME UUID SUNW-MSG-ID "
"EVENT",
}, {
"TIME UUID"
" SUNW-MSG-ID",
}, {
"TIME UUID"
" SUNW-MSG-ID",
}, {
NULL,
} }
};