fault.c revision b695575577bae0337af339d76949713bfe1c9013
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <fmdump.h>
#include <stdio.h>
#include <strings.h>
/*ARGSUSED*/
static int
{
}
}
}
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;
}
return (0);
}
/*
* 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",
}, {
"TIME UUID SUNW-MSG-ID",
}, {
NULL,
}, {
NULL,
} }
};