# HG changeset patch # User Stephen Hanson # Date 1245919908 25200 # Node ID e0258b956de27f3f93b619865fa9de0f505ca6a5 # Parent d4ba9662e3c80ee2ca809a6ed9c95e60a8b8a4f2 6849551 Many duplicated ereports are delivered to the DE diff -r d4ba9662e3c8 -r e0258b956de2 usr/src/cmd/fm/fmd/common/fmd_sysevent.c --- a/usr/src/cmd/fm/fmd/common/fmd_sysevent.c Wed Jun 24 22:52:54 2009 -0700 +++ b/usr/src/cmd/fm/fmd/common/fmd_sysevent.c Thu Jun 25 01:51:48 2009 -0700 @@ -115,14 +115,19 @@ /* construct the event payload */ (void) nvlist_xalloc(&nvl, NV_UNIQUE_NAME, &fmd.d_nva); - (void) nvlist_add_string(nvl, FM_CLASS, fullclass); - (void) nvlist_add_uint8(nvl, FM_VERSION, FM_RSRC_VERSION); if (sysevent_get_attr_list(sep, &attr) == 0) { (void) nvlist_merge(nvl, attr, 0); nvlist_free(attr); } /* + * Add class and version after the nvlist_merge() just in case + * the sysevent has an attribute called class or version. + */ + (void) nvlist_add_string(nvl, FM_CLASS, fullclass); + (void) nvlist_add_uint8(nvl, FM_VERSION, FM_RSRC_VERSION); + + /* * Dispatch the event. Ideally, we'd like to use the same transport * interface as sysev_recv(), but because the legacy sysevent mechanism * puts in a thread outside fmd's control, using the module APIs is