summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/fm/eversholt/common/eftwrite.c14
-rw-r--r--usr/src/cmd/fm/eversholt/common/io.c17
-rw-r--r--usr/src/cmd/fm/fmadm/common/faulty.c4
-rw-r--r--usr/src/cmd/fm/fmtopo/common/fmtopo.c17
-rw-r--r--usr/src/cmd/fm/ipmitopo/common/ipmitopo.c7
-rw-r--r--usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c56
-rw-r--r--usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c2
-rw-r--r--usr/src/lib/fm/libfmd_snmp/common/debug_subr.c6
-rw-r--r--usr/src/lib/fm/libfmd_snmp/common/init.c6
-rw-r--r--usr/src/lib/fm/libfmd_snmp/common/module.c43
-rw-r--r--usr/src/lib/fm/libfmd_snmp/common/problem.c88
-rw-r--r--usr/src/lib/fm/libfmd_snmp/common/resource.c63
-rw-r--r--usr/src/lib/fm/topo/libtopo/common/mod.c4
-rw-r--r--usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml5
-rw-r--r--usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml4
-rw-r--r--usr/src/lib/fm/topo/modules/common/disk/disk_common.c4
-rw-r--r--usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c7
17 files changed, 179 insertions, 168 deletions
diff --git a/usr/src/cmd/fm/eversholt/common/eftwrite.c b/usr/src/cmd/fm/eversholt/common/eftwrite.c
index 4f0cb11aea..9b0e833282 100644
--- a/usr/src/cmd/fm/eversholt/common/eftwrite.c
+++ b/usr/src/cmd/fm/eversholt/common/eftwrite.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* eftwrite.c -- routines for writing .eft files
@@ -29,8 +29,6 @@
* was given on the command line.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <string.h>
#include <strings.h>
@@ -85,7 +83,7 @@ ident_printer(const char *s, void *rhs, void *arg)
{
FILE *fp = (FILE *)arg;
- fwrite(s, strlen(s) + 1, 1, fp);
+ (void) fwrite(s, strlen(s) + 1, 1, fp);
}
/*ARGSUSED*/
@@ -94,7 +92,7 @@ dict_printer(const char *s, void *rhs, void *arg)
{
FILE *fp = (FILE *)arg;
- fwrite(s, strlen(s) + 1, 1, fp);
+ (void) fwrite(s, strlen(s) + 1, 1, fp);
}
void
@@ -161,7 +159,7 @@ eftwrite(const char *fname)
hdr.dictlen = htonl(hdr.dictlen);
hdr.csum = htonl(hdr.csum);
- fwrite(&hdr, sizeof (hdr), 1, fp);
+ (void) fwrite(&hdr, sizeof (hdr), 1, fp);
if (ferror(fp))
out(O_DIE|O_SYS, "%s: can't write header", fname);
stats_counter_add(Outbytes, sizeof (hdr));
@@ -182,6 +180,6 @@ eftwrite(const char *fname)
}
if (ferror(tfp))
out(O_DIE|O_SYS, "fread on tmpfile");
- fclose(tfp);
- fclose(fp);
+ (void) fclose(tfp);
+ (void) fclose(fp);
}
diff --git a/usr/src/cmd/fm/eversholt/common/io.c b/usr/src/cmd/fm/eversholt/common/io.c
index 9aa755657c..56d73c2491 100644
--- a/usr/src/cmd/fm/eversholt/common/io.c
+++ b/usr/src/cmd/fm/eversholt/common/io.c
@@ -2,9 +2,8 @@
* 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.
+ * 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
* or http://www.opensolaris.org/os/licensing.
@@ -20,42 +19,40 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* io.c -- io wrapper functions, replacable in more constrained
* environments, such as within a DE.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
void
io_abort(const char *buf)
{
- fprintf(stderr, "%s\n", buf);
+ (void) fprintf(stderr, "%s\n", buf);
abort();
}
void
io_die(const char *buf)
{
- fprintf(stderr, "%s\n", buf);
+ (void) fprintf(stderr, "%s\n", buf);
exit(1);
}
void
io_err(const char *buf)
{
- fprintf(stderr, "%s\n", buf);
+ (void) fprintf(stderr, "%s\n", buf);
}
void
io_out(const char *buf)
{
- printf("%s\n", buf);
+ (void) printf("%s\n", buf);
}
void
diff --git a/usr/src/cmd/fm/fmadm/common/faulty.c b/usr/src/cmd/fm/fmadm/common/faulty.c
index 503b4d5cc3..d90ad1450f 100644
--- a/usr/src/cmd/fm/fmadm/common/faulty.c
+++ b/usr/src/cmd/fm/fmadm/common/faulty.c
@@ -445,7 +445,7 @@ get_fmri_label(char *fru)
twp = topo_walk_init(topo_handle, FM_FMRI_SCHEME_HC,
tgetlabel, &td, &err);
if (twp) {
- topo_walk_step(twp, TOPO_WALK_CHILD);
+ (void) topo_walk_step(twp, TOPO_WALK_CHILD);
topo_walk_fini(twp);
}
}
@@ -1832,7 +1832,7 @@ cmd_faulty(fmd_adm_t *adm, int argc, char *argv[])
rt = FMADM_EXIT_ERROR;
opt_p = 0;
} else {
- dup2(fileno(fp), 1);
+ (void) dup2(fileno(fp), 1);
setbuf(stdout, NULL);
(void) fclose(fp);
}
diff --git a/usr/src/cmd/fm/fmtopo/common/fmtopo.c b/usr/src/cmd/fm/fmtopo/common/fmtopo.c
index 0ea7796124..43ec004cf5 100644
--- a/usr/src/cmd/fm/fmtopo/common/fmtopo.c
+++ b/usr/src/cmd/fm/fmtopo/common/fmtopo.c
@@ -287,7 +287,7 @@ print_prop_nameval(topo_hdl_t *thp, tnode_t *node, nvlist_t *nvl)
default: tstr = "unknown type";
}
- printf(" %-17s %-8s ", propn, tstr);
+ (void) printf(" %-17s %-8s ", propn, tstr);
/*
* Get property value
@@ -496,14 +496,15 @@ print_pgroup(topo_hdl_t *thp, tnode_t *node, const char *pgn, char *dstab,
}
if (dstab == NULL || nstab == NULL || version == -1) {
- printf(" group: %-30s version: - stability: -/-\n", pgn);
+ (void) printf(" group: %-30s version: - stability: -/-\n",
+ pgn);
} else if (!opt_V && strlen(pgn) > 30) {
(void) snprintf(buf, 26, "%s", pgn);
(void) snprintf(&buf[27], 4, "%s", DOTS);
- printf(" group: %-30s version: %-3d stability: %s/%s\n",
+ (void) printf(" group: %-30s version: %-3d stability: %s/%s\n",
buf, version, nstab, dstab);
} else {
- printf(" group: %-30s version: %-3d stability: %s/%s\n",
+ (void) printf(" group: %-30s version: %-3d stability: %s/%s\n",
pgn, version, nstab, dstab);
}
@@ -872,7 +873,7 @@ walk_node(topo_hdl_t *thp, tnode_t *node, void *arg)
} else if (pcnt > 0)
print_props(thp, node);
- printf("\n");
+ (void) printf("\n");
return (TOPO_WALK_NEXT);
}
@@ -974,7 +975,7 @@ walk_topo(topo_hdl_t *thp, char *uuid)
char buf[32];
time_t tod = time(NULL);
- printf("TIME UUID\n");
+ (void) printf("TIME UUID\n");
(void) strftime(buf, sizeof (buf), "%b %d %T", localtime(&tod));
(void) printf("%-15s %-32s\n", buf, uuid);
(void) printf("\n");
@@ -1095,7 +1096,7 @@ print_fmri(topo_hdl_t *thp, char *uuid)
return;
}
- printf("TIME UUID\n");
+ (void) printf("TIME UUID\n");
(void) strftime(buf, sizeof (buf), "%b %d %T", localtime(&tod));
(void) printf("%-15s %-32s\n", buf, uuid);
(void) printf("\n");
@@ -1199,7 +1200,7 @@ main(int argc, char *argv[])
opt_b++;
break;
case 'C':
- atexit(abort);
+ (void) atexit(abort);
break;
case 'd':
opt_d++;
diff --git a/usr/src/cmd/fm/ipmitopo/common/ipmitopo.c b/usr/src/cmd/fm/ipmitopo/common/ipmitopo.c
index 4ab3d6853b..d8cf26db5d 100644
--- a/usr/src/cmd/fm/ipmitopo/common/ipmitopo.c
+++ b/usr/src/cmd/fm/ipmitopo/common/ipmitopo.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <libipmi.h>
#include <stdio.h>
#include <string.h>
@@ -109,7 +107,8 @@ entity_print(ipmi_handle_t *ihp, ipmi_entity_t *ep, void *data)
(void) printf("%*s%-*s %s\n", indentation, "",
24 - indentation, name, present ? "present" : "absent");
}
- ipmi_entity_iter_sdr(ihp, ep, sdr_print, (void *)(indentation + 2));
+ (void) ipmi_entity_iter_sdr(ihp, ep, sdr_print,
+ (void *)(indentation + 2));
if (ep->ie_children != 0)
(void) ipmi_entity_iter_children(ihp, ep, entity_print,
diff --git a/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c b/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c
index 91d6dbe4c5..913f16c6b5 100644
--- a/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c
+++ b/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/mdb_modapi.h>
#include <lut.h>
@@ -231,8 +229,10 @@ ipath_node(uintptr_t addr, const void *data, void *arg)
struct ipath *ipath = (struct ipath *)data;
char buf[128];
- mdb_readstr(buf, (size_t)sizeof (buf), (uintptr_t)ipath->s);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf), (uintptr_t)ipath->s) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ ipath->s);
+
mdb_printf("/%s=%d", buf, ipath->i);
return (DCMD_OK);
}
@@ -291,8 +291,11 @@ eft_count(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_ERR);
}
- mdb_readstr(buf, (size_t)sizeof (buf), (uintptr_t)istat_entry.ename);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf),
+ (uintptr_t)istat_entry.ename) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ istat_entry.ename);
+
mdb_printf("%s@", buf);
(void) ipath((uintptr_t)istat_entry.ipath, DCMD_ADDRSPEC, 0, NULL);
mdb_printf(" %d\n", count.fmd_stats.fmds_value.i32);
@@ -377,8 +380,11 @@ eft_node(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_ERR);
}
if (opt_v) {
- mdb_readstr(buf, (size_t)sizeof (buf), (uintptr_t)node.file);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf),
+ (uintptr_t)node.file) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ node.file);
+
mdb_printf("%s len %d\n", buf, node.line);
}
switch (node.t) {
@@ -386,9 +392,11 @@ eft_node(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
mdb_printf("nothing");
break;
case T_NAME: /* identifiers, sometimes chained */
- mdb_readstr(buf, (size_t)sizeof (buf),
- (uintptr_t)node.u.name.s);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf),
+ (uintptr_t)node.u.name.s) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ node.u.name.s);
+
mdb_printf("%s", buf);
if (node.u.name.cp) {
struct config cp;
@@ -424,9 +432,11 @@ eft_node(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
}
break;
case T_GLOBID: /* globals (e.g. $a) */
- mdb_readstr(buf, (size_t)sizeof (buf),
- (uintptr_t)node.u.globid.s);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf),
+ (uintptr_t)node.u.globid.s) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ node.u.globid.s);
+
mdb_printf("$%s", buf);
break;
case T_EVENT: /* class@path{expr} */
@@ -483,15 +493,19 @@ eft_node(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
mdb_printf("%llu", node.u.ull);
break;
case T_QUOTE: /* quoted string */
- mdb_readstr(buf, (size_t)sizeof (buf),
- (uintptr_t)node.u.quote.s);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf),
+ (uintptr_t)node.u.quote.s) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ node.u.quote.s);
+
mdb_printf("\"%s\"", buf);
break;
case T_FUNC: /* func(arglist) */
- mdb_readstr(buf, (size_t)sizeof (buf),
- (uintptr_t)node.u.func.s);
- buf[sizeof (buf) - 1] = 0;
+ if (mdb_readstr(buf, (size_t)sizeof (buf),
+ (uintptr_t)node.u.func.s) < 0)
+ (void) mdb_snprintf(buf, (size_t)sizeof (buf), "<%p>",
+ node.u.func.s);
+
mdb_printf("%s(", buf);
(void) eft_node((uintptr_t)node.u.func.arglist, DCMD_ADDRSPEC,
0, NULL);
diff --git a/usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c b/usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c
index f67e41faf0..8a4941945b 100644
--- a/usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c
+++ b/usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c
@@ -279,7 +279,7 @@ _fmd_fini(fmd_hdl_t *hdl)
*/
snmp_store(SNMP_SUPPCONF);
snmp_alarm_unregister_all();
- snmp_close_sessions();
+ (void) snmp_close_sessions();
shutdown_mib();
unregister_all_config_handlers();
netsnmp_ds_shutdown();
diff --git a/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c b/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c
index 695f582d58..6b31fd10bf 100644
--- a/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c
+++ b/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
@@ -34,7 +32,7 @@
void
sunFm_vpanic(const char *format, va_list ap)
{
- snmp_vlog(LOG_ERR, format, ap);
+ (void) snmp_vlog(LOG_ERR, format, ap);
#ifdef DEBUG
abort();
exit(1);
diff --git a/usr/src/lib/fm/libfmd_snmp/common/init.c b/usr/src/lib/fm/libfmd_snmp/common/init.c
index f46fe30b75..6a77e57adb 100644
--- a/usr/src/lib/fm/libfmd_snmp/common/init.c
+++ b/usr/src/lib/fm/libfmd_snmp/common/init.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <fm/fmd_snmp.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
@@ -73,7 +71,7 @@ init_sunFM(void)
"registration failure\n", table->t_name);
break;
default:
- snmp_log(LOG_ERR, MODNAME_STR
+ (void) snmp_log(LOG_ERR, MODNAME_STR
": table %s initialization failed: "
"unknown reason\n", table->t_name);
}
diff --git a/usr/src/lib/fm/libfmd_snmp/common/module.c b/usr/src/lib/fm/libfmd_snmp/common/module.c
index 811aef2937..984c1fa143 100644
--- a/usr/src/lib/fm/libfmd_snmp/common/module.c
+++ b/usr/src/lib/fm/libfmd_snmp/common/module.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <fm/fmd_adm.h>
#include <fm/fmd_snmp.h>
#include <net-snmp/net-snmp-config.h>
@@ -185,8 +183,9 @@ modinfo_update_one(const fmd_adm_modinfo_t *modinfo, void *arg)
DEBUGMSGTL((MODNAME_STR, "found new fmd module %s\n",
modinfo->ami_name));
if ((data = SNMP_MALLOC_TYPEDEF(sunFmModule_data_t)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": Out of memory for "
- "new module data at %s:%d\n", __FILE__, __LINE__);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Out of memory "
+ "for new module data at %s:%d\n", __FILE__,
+ __LINE__);
return (1);
}
/*
@@ -252,15 +251,15 @@ modinfo_update(sunFmModule_update_ctx_t *update_ctx)
if ((adm = fmd_adm_open(update_ctx->uc_host, update_ctx->uc_prog,
update_ctx->uc_version)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": Communication with fmd "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Communication with fmd "
"failed: %s\n", strerror(errno));
return (SNMP_ERR_RESOURCEUNAVAILABLE);
}
++valid_stamp;
if (fmd_adm_module_iter(adm, modinfo_update_one, update_ctx) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": fmd module information update "
- "failed: %s\n", fmd_adm_errmsg(adm));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": fmd module information "
+ "update failed: %s\n", fmd_adm_errmsg(adm));
fmd_adm_close(adm);
return (SNMP_ERR_RESOURCEUNAVAILABLE);
}
@@ -348,19 +347,19 @@ sunFmModuleTable_init(void)
int err;
if ((err = pthread_mutex_init(&update_lock, NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": mutex_init failure: %s\n",
- strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": mutex_init failure: "
+ "%s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
if ((err = pthread_cond_init(&update_cv, NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": cond_init failure: %s\n",
- strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": cond_init failure: "
+ "%s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
if ((err = pthread_create(NULL, NULL, (void *(*)(void *))update_thread,
NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": error creating update "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": error creating update "
"thread: %s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
@@ -400,7 +399,7 @@ sunFmModuleTable_init(void)
if ((mod_name_avl = uu_avl_create(mod_name_avl_pool, NULL,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": mod_name_avl creation "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": mod_name_avl creation "
"failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
@@ -422,7 +421,7 @@ sunFmModuleTable_init(void)
if ((mod_index_avl = uu_avl_create(mod_index_avl_pool, NULL,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": mod_index_avl creation "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": mod_index_avl creation "
"failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
@@ -477,8 +476,8 @@ sunFmModuleTable_nextmod(netsnmp_handler_registration *reginfo,
DEBUGMSGTL((MODNAME_STR, "nextmod: no indexes given\n"));
var = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
- snmp_set_var_typed_value(var, ASN_UNSIGNED, (uchar_t *)&index,
- sizeof (index));
+ (void) snmp_set_var_typed_value(var, ASN_UNSIGNED,
+ (uchar_t *)&index, sizeof (index));
(void) memcpy(tmpoid, reginfo->rootoid,
reginfo->rootoid_len * sizeof (oid));
tmpoid[reginfo->rootoid_len] = 1; /* Entry is .1 */
@@ -617,7 +616,7 @@ sunFmModuleTable_return(unsigned int reg, void *arg)
}
break;
default:
- snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request "
"mode %d\n", reqinfo->mode);
netsnmp_free_delegated_cache(cache);
(void) pthread_mutex_unlock(&update_lock);
@@ -626,24 +625,24 @@ sunFmModuleTable_return(unsigned int reg, void *arg)
switch (table_info->colnum) {
case SUNFMMODULE_COL_NAME:
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_ami_name,
strlen(data->d_ami_name));
break;
case SUNFMMODULE_COL_VERSION:
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_ami_vers,
strlen(data->d_ami_vers));
break;
case SUNFMMODULE_COL_STATUS:
modstate = (data->d_ami_flags & FMD_ADM_MOD_FAILED) ?
SUNFMMODULE_STATE_FAILED : SUNFMMODULE_STATE_ACTIVE;
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_INTEGER, (uchar_t *)&modstate,
sizeof (modstate));
break;
case SUNFMMODULE_COL_DESCRIPTION:
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_ami_desc,
strlen(data->d_ami_desc));
break;
diff --git a/usr/src/lib/fm/libfmd_snmp/common/problem.c b/usr/src/lib/fm/libfmd_snmp/common/problem.c
index 41afad413f..b4b38f2624 100644
--- a/usr/src/lib/fm/libfmd_snmp/common/problem.c
+++ b/usr/src/lib/fm/libfmd_snmp/common/problem.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/fm/protocol.h>
#include <fm/fmd_adm.h>
#include <fm/fmd_snmp.h>
@@ -163,14 +161,15 @@ problem_update_one(const fmd_adm_caseinfo_t *acp, void *arg)
DEBUGMSGTL((MODNAME_STR, "found new problem %s\n",
acp->aci_uuid));
if ((data = SNMP_MALLOC_TYPEDEF(sunFmProblem_data_t)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": Out of memory for "
- "new problem data at %s:%d\n", __FILE__, __LINE__);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Out of memory "
+ "for new problem data at %s:%d\n", __FILE__,
+ __LINE__);
return (0);
}
if ((err = nvlist_dup(acp->aci_event, &data->d_aci_event, 0))
!= 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": Problem data setup "
- "failed: %s\n", strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Problem data "
+ "setup failed: %s\n", strerror(err));
SNMP_FREE(data);
return (0);
}
@@ -255,7 +254,7 @@ problem_update(sunFmProblem_update_ctx_t *update_ctx)
if ((adm = fmd_adm_open(update_ctx->uc_host, update_ctx->uc_prog,
update_ctx->uc_version)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": Communication with fmd "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Communication with fmd "
"failed: %s\n", strerror(errno));
return (SNMP_ERR_RESOURCEUNAVAILABLE);
}
@@ -263,8 +262,8 @@ problem_update(sunFmProblem_update_ctx_t *update_ctx)
++valid_stamp;
if (fmd_adm_case_iter(adm, SNMP_URL_MSG, problem_update_one,
update_ctx) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": fmd case information update "
- "failed: %s\n", fmd_adm_errmsg(adm));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": fmd case information "
+ "update failed: %s\n", fmd_adm_errmsg(adm));
fmd_adm_close(adm);
return (SNMP_ERR_RESOURCEUNAVAILABLE);
}
@@ -339,19 +338,19 @@ sunFmProblemTable_init(void)
int err;
if ((err = pthread_mutex_init(&update_lock, NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": mutex_init failure: %s\n",
- strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": mutex_init failure: "
+ "%s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
if ((err = pthread_cond_init(&update_cv, NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": cond_init failure: %s\n",
- strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": cond_init failure: "
+ "%s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
if ((err = pthread_create(NULL, NULL, (void *(*)(void *))update_thread,
NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": error creating update "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": error creating update "
"thread: %s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
@@ -384,7 +383,7 @@ sunFmProblemTable_init(void)
sizeof (sunFmProblem_data_t),
offsetof(sunFmProblem_data_t, d_uuid_avl), problem_compare_uuid,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": problem_uuid avl pool "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": problem_uuid avl pool "
"creation failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
@@ -394,8 +393,8 @@ sunFmProblemTable_init(void)
if ((problem_uuid_avl = uu_avl_create(problem_uuid_avl_pool, NULL,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": problem_uuid avl creation "
- "failed: %s\n", uu_strerror(uu_error()));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": problem_uuid avl "
+ "creation failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
SNMP_FREE(handler);
@@ -487,8 +486,8 @@ sunFmProblemTable_nextpr(netsnmp_handler_registration *reginfo,
snmp_free_varbind(table_info->indexes);
table_info->indexes =
SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
- snmp_set_var_typed_value(table_info->indexes, ASN_OCTET_STR,
- (const uchar_t *)uuid, 0);
+ (void) snmp_set_var_typed_value(table_info->indexes,
+ ASN_OCTET_STR, (const uchar_t *)uuid, 0);
(void) memcpy(tmpoid, reginfo->rootoid,
reginfo->rootoid_len * sizeof (oid));
tmpoid[reginfo->rootoid_len] = 1;
@@ -549,7 +548,7 @@ sunFmProblemTable_nextpr(netsnmp_handler_registration *reginfo,
}
}
- snmp_set_var_typed_value(table_info->indexes, ASN_OCTET_STR,
+ (void) snmp_set_var_typed_value(table_info->indexes, ASN_OCTET_STR,
(uchar_t *)data->d_aci_uuid, strlen(data->d_aci_uuid));
table_info->number_indexes = 1;
@@ -612,7 +611,7 @@ sunFmFaultEventTable_nextfe(netsnmp_handler_registration *reginfo,
index)) != 0 &&
(rv = faultevent_lookup_index_exact(data, index)) !=
NULL) {
- snmp_set_var_typed_value(
+ (void) snmp_set_var_typed_value(
table_info->indexes->next_variable,
ASN_UNSIGNED, (uchar_t *)&index,
sizeof (index));
@@ -634,8 +633,9 @@ sunFmFaultEventTable_nextfe(netsnmp_handler_registration *reginfo,
DEBUGMSG((MODNAME_STR, "\n"));
var =
SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
- snmp_set_var_typed_value(var, ASN_UNSIGNED,
- (uchar_t *)&index, sizeof (index));
+ (void) snmp_set_var_typed_value(var,
+ ASN_UNSIGNED, (uchar_t *)&index,
+ sizeof (index));
(void) memcpy(tmpoid, reginfo->rootoid,
reginfo->rootoid_len * sizeof (oid));
tmpoid[reginfo->rootoid_len] = 1;
@@ -760,8 +760,8 @@ sunFmProblemTable_return(unsigned int reg, void *arg)
}
break;
default:
- snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request mode %d\n",
- reqinfo->mode);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request "
+ "mode %d\n", reqinfo->mode);
netsnmp_free_delegated_cache(cache);
(void) pthread_mutex_unlock(&update_lock);
return;
@@ -770,28 +770,28 @@ sunFmProblemTable_return(unsigned int reg, void *arg)
switch (table_info->colnum) {
case SUNFMPROBLEM_COL_UUID:
{
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_aci_uuid,
strlen(data->d_aci_uuid));
break;
}
case SUNFMPROBLEM_COL_CODE:
{
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_aci_code,
strlen(data->d_aci_code));
break;
}
case SUNFMPROBLEM_COL_URL:
{
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_aci_url,
strlen(data->d_aci_url));
break;
}
case SUNFMPROBLEM_COL_DIAGENGINE:
{
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_diag_engine,
strlen(data->d_diag_engine));
break;
@@ -807,13 +807,13 @@ sunFmProblemTable_return(unsigned int reg, void *arg)
time_t dt_time = (time_t)data->d_diag_time.tv_sec;
uchar_t *dt = date_n_time(&dt_time, &dt_size);
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, dt, dt_size);
break;
}
case SUNFMPROBLEM_COL_SUSPECTCOUNT:
{
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_UNSIGNED, (uchar_t *)&data->d_nsuspects,
sizeof (data->d_nsuspects));
break;
@@ -928,8 +928,8 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
}
break;
default:
- snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request mode %d\n",
- reqinfo->mode);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request "
+ "mode %d\n", reqinfo->mode);
netsnmp_free_delegated_cache(cache);
(void) pthread_mutex_unlock(&update_lock);
return;
@@ -940,11 +940,11 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
{
if ((pdata = sunFmProblemTable_pr(reginfo, table_info))
== NULL) {
- netsnmp_table_build_result(reginfo, request, table_info,
- ASN_OCTET_STR, NULL, 0);
+ (void) netsnmp_table_build_result(reginfo, request,
+ table_info, ASN_OCTET_STR, NULL, 0);
break;
}
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)pdata->d_aci_uuid,
strlen(pdata->d_aci_uuid));
break;
@@ -954,7 +954,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
char *class = "-";
(void) nvlist_lookup_string(data, FM_CLASS, &class);
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)class, strlen(class));
break;
}
@@ -966,7 +966,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
(void) nvlist_lookup_uint8(data, FM_FAULT_CERTAINTY,
&pct);
pl = (ulong_t)pct;
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_UNSIGNED, (uchar_t *)&pl, sizeof (pl));
break;
}
@@ -981,7 +981,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
else
fmri = str;
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)fmri, strlen(fmri));
free(str);
break;
@@ -997,7 +997,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
else
fmri = str;
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)fmri, strlen(fmri));
free(str);
break;
@@ -1013,7 +1013,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
else
fmri = str;
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)fmri, strlen(fmri));
free(str);
break;
@@ -1032,7 +1032,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
pl = SUNFMFAULTEVENT_STATE_REPAIRED;
else if (status & FM_SUSPECT_ACQUITTED)
pl = SUNFMFAULTEVENT_STATE_ACQUITTED;
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_INTEGER, (uchar_t *)&pl, sizeof (pl));
break;
}
@@ -1041,7 +1041,7 @@ sunFmFaultEventTable_return(unsigned int reg, void *arg)
char *location = "-";
(void) nvlist_lookup_string(data, FM_FAULT_LOCATION, &location);
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)location, strlen(location));
break;
}
diff --git a/usr/src/lib/fm/libfmd_snmp/common/resource.c b/usr/src/lib/fm/libfmd_snmp/common/resource.c
index 50b990f293..4ee4e5c032 100644
--- a/usr/src/lib/fm/libfmd_snmp/common/resource.c
+++ b/usr/src/lib/fm/libfmd_snmp/common/resource.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <fm/fmd_adm.h>
#include <fm/fmd_snmp.h>
#include <net-snmp/net-snmp-config.h>
@@ -172,8 +170,9 @@ rsrcinfo_update_one(const fmd_adm_rsrcinfo_t *rsrcinfo, void *arg)
rsrcinfo->ari_fmri));
if ((data = SNMP_MALLOC_TYPEDEF(sunFmResource_data_t)) ==
NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": Out of memory for "
- "new resource data at %s:%d\n", __FILE__, __LINE__);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Out of memory "
+ "for new resource data at %s:%d\n", __FILE__,
+ __LINE__);
return (1);
}
/*
@@ -240,7 +239,7 @@ rsrcinfo_update(sunFmResource_update_ctx_t *update_ctx)
if ((adm = fmd_adm_open(update_ctx->uc_host, update_ctx->uc_prog,
update_ctx->uc_version)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": Communication with fmd "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Communication with fmd "
"failed: %s\n", strerror(errno));
return (SNMP_ERR_RESOURCEUNAVAILABLE);
}
@@ -258,8 +257,8 @@ rsrcinfo_update(sunFmResource_update_ctx_t *update_ctx)
fmd_adm_close(adm);
if (err != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": fmd resource information "
- "update failed: %s\n", fmd_adm_errmsg(adm));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": fmd resource "
+ "information update failed: %s\n", fmd_adm_errmsg(adm));
return (SNMP_ERR_RESOURCEUNAVAILABLE);
}
@@ -345,19 +344,19 @@ sunFmResourceTable_init(void)
int err;
if ((err = pthread_mutex_init(&update_lock, NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": mutex_init failure: %s\n",
- strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": mutex_init failure: "
+ "%s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
if ((err = pthread_cond_init(&update_cv, NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": cond_init failure: %s\n",
- strerror(err));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": cond_init failure: "
+ "%s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
if ((err = pthread_create(NULL, NULL, (void *(*)(void *))update_thread,
NULL)) != 0) {
- snmp_log(LOG_ERR, MODNAME_STR ": error creating update "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": error creating update "
"thread: %s\n", strerror(err));
return (MIB_REGISTRATION_FAILED);
}
@@ -390,8 +389,8 @@ sunFmResourceTable_init(void)
sizeof (sunFmResource_data_t),
offsetof(sunFmResource_data_t, d_fmri_avl), resource_compare_fmri,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": rsrc_fmri avl pool creation "
- "failed: %s\n", uu_strerror(uu_error()));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": rsrc_fmri avl pool "
+ "creation failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
SNMP_FREE(handler);
@@ -399,7 +398,7 @@ sunFmResourceTable_init(void)
if ((rsrc_fmri_avl = uu_avl_create(rsrc_fmri_avl_pool, NULL,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": rsrc_fmri avl creation "
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": rsrc_fmri avl creation "
"failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
@@ -412,8 +411,8 @@ sunFmResourceTable_init(void)
sizeof (sunFmResource_data_t),
offsetof(sunFmResource_data_t, d_index_avl),
resource_compare_index, UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": rsrc_index avl pool creation "
- "failed: %s\n", uu_strerror(uu_error()));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": rsrc_index avl pool "
+ "creation failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
SNMP_FREE(handler);
@@ -423,8 +422,8 @@ sunFmResourceTable_init(void)
if ((rsrc_index_avl = uu_avl_create(rsrc_index_avl_pool, NULL,
UU_AVL_DEBUG)) == NULL) {
- snmp_log(LOG_ERR, MODNAME_STR ": rsrc_index avl creation "
- "failed: %s\n", uu_strerror(uu_error()));
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": rsrc_index avl "
+ "creation failed: %s\n", uu_strerror(uu_error()));
snmp_free_varbind(table_info->indexes);
SNMP_FREE(table_info);
SNMP_FREE(handler);
@@ -448,8 +447,8 @@ sunFmResourceTable_init(void)
if ((err = netsnmp_register_read_only_instance(
netsnmp_create_handler_registration("sunFmResourceCount",
- sunFmResourceCount_handler, sunFmResourceCount_oid,
- OID_LENGTH(sunFmResourceCount_oid), HANDLER_CAN_RONLY))) !=
+ sunFmResourceCount_handler, sunFmResourceCount_oid,
+ OID_LENGTH(sunFmResourceCount_oid), HANDLER_CAN_RONLY))) !=
MIB_REGISTERED_OK) {
/*
* There's no way to unregister the table handler, so we
@@ -490,8 +489,8 @@ sunFmResourceTable_nextrsrc(netsnmp_handler_registration *reginfo,
DEBUGMSGTL((MODNAME_STR, "nextrsrc: no indexes given\n"));
var = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
- snmp_set_var_typed_value(var, ASN_UNSIGNED, (uchar_t *)&index,
- sizeof (index));
+ (void) snmp_set_var_typed_value(var, ASN_UNSIGNED,
+ (uchar_t *)&index, sizeof (index));
(void) memcpy(tmpoid, reginfo->rootoid,
reginfo->rootoid_len * sizeof (oid));
tmpoid[reginfo->rootoid_len] = 1;
@@ -630,8 +629,8 @@ sunFmResourceTable_return(unsigned int reg, void *arg)
}
break;
default:
- snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request mode %d\n",
- reqinfo->mode);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request "
+ "mode %d\n", reqinfo->mode);
netsnmp_free_delegated_cache(cache);
(void) pthread_mutex_unlock(&update_lock);
return;
@@ -639,7 +638,7 @@ sunFmResourceTable_return(unsigned int reg, void *arg)
switch (table_info->colnum) {
case SUNFMRESOURCE_COL_FMRI:
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_ari_fmri,
strlen(data->d_ari_fmri));
break;
@@ -659,12 +658,12 @@ sunFmResourceTable_return(unsigned int reg, void *arg)
rsrcstate = SUNFMRESOURCE_STATE_FAULTED;
break;
}
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_INTEGER, (uchar_t *)&rsrcstate,
sizeof (rsrcstate));
break;
case SUNFMRESOURCE_COL_DIAGNOSISUUID:
- netsnmp_table_build_result(reginfo, request, table_info,
+ (void) netsnmp_table_build_result(reginfo, request, table_info,
ASN_OCTET_STR, (uchar_t *)data->d_ari_case,
strlen(data->d_ari_case));
break;
@@ -749,12 +748,12 @@ sunFmResourceCount_return(unsigned int reg, void *arg)
case MODE_GETNEXT:
DEBUGMSGTL((MODNAME_STR, "resource count is %u\n", rsrc_count));
rsrc_count_long = (ulong_t)rsrc_count;
- snmp_set_var_typed_value(request->requestvb, ASN_GAUGE,
+ (void) snmp_set_var_typed_value(request->requestvb, ASN_GAUGE,
(uchar_t *)&rsrc_count_long, sizeof (rsrc_count_long));
break;
default:
- snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request mode %d\n",
- reqinfo->mode);
+ (void) snmp_log(LOG_ERR, MODNAME_STR ": Unsupported request "
+ "mode %d\n", reqinfo->mode);
}
netsnmp_free_delegated_cache(cache);
diff --git a/usr/src/lib/fm/topo/libtopo/common/mod.c b/usr/src/lib/fm/topo/libtopo/common/mod.c
index 62b1232394..1b26ccf6e6 100644
--- a/usr/src/lib/fm/topo/libtopo/common/mod.c
+++ b/usr/src/lib/fm/topo/libtopo/common/mod.c
@@ -149,13 +149,13 @@ mod_binary_path_get(topo_mod_t *mp, const char *objpath)
}
break;
}
- elf_end(elf);
+ (void) elf_end(elf);
(void) close(fd);
return (0);
mbpg_bail:
if (elf != NULL)
- elf_end(elf);
+ (void) elf_end(elf);
if (fd >= 0)
(void) close(fd);
(void) topo_mod_seterrno(mp, EMOD_METHOD_INVAL);
diff --git a/usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml b/usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml
index cb52cc8662..eda976d721 100644
--- a/usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml
+++ b/usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml
@@ -78,7 +78,8 @@
</set>
<set type='product'
setlist='Sun-Fire-V20z|Sun-Fire-V40z'>
-
+
+ <fac-enum provider='fac_prov_ipmi' />
<propgroup name='protocol' version='1'
name-stability='Private' data-stability='Private' >
@@ -347,6 +348,7 @@
</set>
<set type='product'
setlist='Sun-Fire-X4450|SUN-FIRE-X4450'>
+ <fac-enum provider='fac_prov_ipmi' />
<!--
chip FRU label
-->
@@ -652,6 +654,7 @@
</set>
<set type='product' setlist='Sun-Fire-V20z|Sun-Fire-V40z'>
+ <fac-enum provider='fac_prov_ipmi' />
<propgroup name='protocol' version='1'
name-stability='Private'
data-stability='Private' >
diff --git a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
index 00b771f66d..a8baa3e6b3 100644
--- a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
+++ b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
@@ -58,7 +58,9 @@
</propgroup>
<propgroup name='ipmi' version='1'
name-stability='Private' data-stability='Private' >
- <propval name='entity_ref' type='string' value='MB' />
+ <propval name='entity_ref' type='string_array' >
+ <propitem value='MB' />
+ </propval>
</propgroup>
</set>
diff --git a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
index 867e8a252e..6ae3c4a341 100644
--- a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
+++ b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
@@ -580,7 +580,7 @@ disk_di_node_add(di_node_t node, char *devid, disk_cbdata_t *cbp)
/* Establish the devinfo dpath */
if ((path = di_devfs_path(node)) == NULL) {
- topo_mod_seterrno(mod, errno);
+ (void) topo_mod_seterrno(mod, errno);
goto error;
}
@@ -662,7 +662,7 @@ disk_di_node_add(di_node_t node, char *devid, disk_cbdata_t *cbp)
while ((pnode = di_path_client_next_path(node,
pnode)) != NULL) {
if ((path = di_path_devfs_path(pnode)) == NULL) {
- topo_mod_seterrno(mod, errno);
+ (void) topo_mod_seterrno(mod, errno);
goto error;
}
diff --git a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
index 074c8c98f2..c3e406b486 100644
--- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
+++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
@@ -90,7 +90,10 @@ _topo_init(topo_mod_t *modhdl, topo_version_t version)
if (version != PCI_ENUMR_VERS)
return (topo_mod_seterrno(modhdl, EMOD_VER_NEW));
- topo_mod_register(modhdl, &Pci_info, TOPO_VERSION);
+ if (topo_mod_register(modhdl, &Pci_info, TOPO_VERSION) != 0) {
+ topo_mod_dprintf(modhdl, "failed to register module");
+ return (-1);
+ }
topo_mod_dprintf(modhdl, "PCI Enumr initd\n");
return (0);
@@ -502,7 +505,7 @@ declare_dev_and_fn(topo_mod_t *mod, tnode_t *bus, tnode_t **dev, di_node_t din,
NULL) {
topo_mod_dprintf(mod, "pcibus enum "
"could not load xaui enum\n");
- topo_mod_seterrno(mod,
+ (void) topo_mod_seterrno(mod,
EMOD_PARTIAL_ENUM);
return;
} else {