Mercurial > illumos > illumos-gate
changeset 9967:e0258b956de2
6849551 Many duplicated ereports are delivered to the DE
author | Stephen Hanson <Stephen.Hanson@Sun.COM> |
---|---|
date | Thu, 25 Jun 2009 01:51:48 -0700 |
parents | d4ba9662e3c8 |
children | df8bbbb1343b |
files | usr/src/cmd/fm/fmd/common/fmd_sysevent.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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