changeset 11050:be69f645ce17

6894028 Some fm libraries are not lint clean 6897387 IPMI facility provider methods not registered on some platforms 6893713 Some fm cmds are not lint clean
author Robert Johnston <Robert.Johnston@Sun.COM>
date Wed, 11 Nov 2009 18:52:48 -0800
parents a871ea89ffe5
children 1fa7a981a543
files usr/src/cmd/fm/eversholt/common/eftwrite.c usr/src/cmd/fm/eversholt/common/io.c usr/src/cmd/fm/fmadm/common/faulty.c usr/src/cmd/fm/fmtopo/common/fmtopo.c usr/src/cmd/fm/ipmitopo/common/ipmitopo.c usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c usr/src/lib/fm/libfmd_snmp/common/debug_subr.c usr/src/lib/fm/libfmd_snmp/common/init.c usr/src/lib/fm/libfmd_snmp/common/module.c usr/src/lib/fm/libfmd_snmp/common/problem.c usr/src/lib/fm/libfmd_snmp/common/resource.c usr/src/lib/fm/topo/libtopo/common/mod.c usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml usr/src/lib/fm/topo/modules/common/disk/disk_common.c usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
diffstat 17 files changed, 179 insertions(+), 168 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/fm/eversholt/common/eftwrite.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/eversholt/common/eftwrite.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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 @@
 {
 	FILE *fp = (FILE *)arg;
 
-	fwrite(s, strlen(s) + 1, 1, fp);
+	(void) fwrite(s, strlen(s) + 1, 1, fp);
 }
 
 /*ARGSUSED*/
@@ -94,7 +92,7 @@
 {
 	FILE *fp = (FILE *)arg;
 
-	fwrite(s, strlen(s) + 1, 1, fp);
+	(void) fwrite(s, strlen(s) + 1, 1, fp);
 }
 
 void
@@ -161,7 +159,7 @@
 	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 @@
 	}
 	if (ferror(tfp))
 		out(O_DIE|O_SYS, "fread on tmpfile");
-	fclose(tfp);
-	fclose(fp);
+	(void) fclose(tfp);
+	(void) fclose(fp);
 }
--- a/usr/src/cmd/fm/eversholt/common/io.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/eversholt/common/io.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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
--- a/usr/src/cmd/fm/fmadm/common/faulty.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/fmadm/common/faulty.c	Wed Nov 11 18:52:48 2009 -0800
@@ -445,7 +445,7 @@
 		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 @@
 			rt = FMADM_EXIT_ERROR;
 			opt_p = 0;
 		} else {
-			dup2(fileno(fp), 1);
+			(void) dup2(fileno(fp), 1);
 			setbuf(stdout, NULL);
 			(void) fclose(fp);
 		}
--- a/usr/src/cmd/fm/fmtopo/common/fmtopo.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/fmtopo/common/fmtopo.c	Wed Nov 11 18:52:48 2009 -0800
@@ -287,7 +287,7 @@
 		default: tstr = "unknown type";
 	}
 
-	printf("    %-17s %-8s ", propn, tstr);
+	(void) printf("    %-17s %-8s ", propn, tstr);
 
 	/*
 	 * Get property value
@@ -496,14 +496,15 @@
 	}
 
 	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 @@
 	} else if (pcnt > 0)
 		print_props(thp, node);
 
-	printf("\n");
+	(void) printf("\n");
 
 	return (TOPO_WALK_NEXT);
 }
@@ -974,7 +975,7 @@
 		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 @@
 		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 @@
 				opt_b++;
 				break;
 			case 'C':
-				atexit(abort);
+				(void) atexit(abort);
 				break;
 			case 'd':
 				opt_d++;
--- a/usr/src/cmd/fm/ipmitopo/common/ipmitopo.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/ipmitopo/common/ipmitopo.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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 @@
 		(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,
--- a/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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 @@
 	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 @@
 		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 @@
 		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 @@
 		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 @@
 		}
 		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 @@
 		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);
--- a/usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/cmd/fm/modules/common/snmp-trapgen/snmp.c	Wed Nov 11 18:52:48 2009 -0800
@@ -279,7 +279,7 @@
 	 */
 	snmp_store(SNMP_SUPPCONF);
 	snmp_alarm_unregister_all();
-	snmp_close_sessions();
+	(void) snmp_close_sessions();
 	shutdown_mib();
 	unregister_all_config_handlers();
 	netsnmp_ds_shutdown();
--- a/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/libfmd_snmp/common/debug_subr.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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);
--- a/usr/src/lib/fm/libfmd_snmp/common/init.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/libfmd_snmp/common/init.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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 @@
 			    "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);
 		}
--- a/usr/src/lib/fm/libfmd_snmp/common/module.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/libfmd_snmp/common/module.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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 @@
 		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 @@
 
 	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 @@
 	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 @@
 
 	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 @@
 
 	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 @@
 
 		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 @@
 		}
 		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 @@
 
 	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;
--- a/usr/src/lib/fm/libfmd_snmp/common/problem.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/libfmd_snmp/common/problem.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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 @@
 		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 @@
 
 	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 @@
 	++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 @@
 	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 @@
 	    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 @@
 
 	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 @@
 		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 @@
 		}
 	}
 
-	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 @@
 			    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 @@
 				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 @@
 		}
 		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 @@
 	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 @@
 		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 @@
 		}
 		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 @@
 	{
 		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 @@
 		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 @@
 		(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 @@
 		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 @@
 		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 @@
 		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 @@
 			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 @@
 		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;
 	}
--- a/usr/src/lib/fm/libfmd_snmp/common/resource.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/libfmd_snmp/common/resource.c	Wed Nov 11 18:52:48 2009 -0800
@@ -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->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 @@
 
 	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 @@
 	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 @@
 	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 @@
 	    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 @@
 
 	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 @@
 	    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 @@
 
 	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 @@
 
 	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 @@
 
 		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 @@
 		}
 		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 @@
 
 	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 @@
 			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 @@
 	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);
--- a/usr/src/lib/fm/topo/libtopo/common/mod.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/topo/libtopo/common/mod.c	Wed Nov 11 18:52:48 2009 -0800
@@ -149,13 +149,13 @@
 		}
 		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);
--- a/usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/topo/maps/i86pc/chip-hc-topology.xml	Wed Nov 11 18:52:48 2009 -0800
@@ -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' >
--- a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml	Wed Nov 11 18:52:48 2009 -0800
@@ -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>
--- a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c	Wed Nov 11 18:52:48 2009 -0800
@@ -580,7 +580,7 @@
 
 	/* 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 @@
 		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;
 			}
 
--- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c	Thu Nov 12 10:27:19 2009 +0800
+++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c	Wed Nov 11 18:52:48 2009 -0800
@@ -90,7 +90,10 @@
 	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 @@
 				    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 {