Mercurial > illumos > illumos-gate
comparison usr/src/cmd/fm/fmd/common/fmd_sysevent.c @ 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 | fe1f7d8cd967 |
children | b91faef0c984 |
comparison
equal
deleted
inserted
replaced
9966:d4ba9662e3c8 | 9967:e0258b956de2 |
---|---|
113 (void) snprintf(fullclass, len + 1, "%s%s.%s", | 113 (void) snprintf(fullclass, len + 1, "%s%s.%s", |
114 SYSEVENT_RSRC_CLASS, class, subclass); | 114 SYSEVENT_RSRC_CLASS, class, subclass); |
115 | 115 |
116 /* construct the event payload */ | 116 /* construct the event payload */ |
117 (void) nvlist_xalloc(&nvl, NV_UNIQUE_NAME, &fmd.d_nva); | 117 (void) nvlist_xalloc(&nvl, NV_UNIQUE_NAME, &fmd.d_nva); |
118 (void) nvlist_add_string(nvl, FM_CLASS, fullclass); | |
119 (void) nvlist_add_uint8(nvl, FM_VERSION, FM_RSRC_VERSION); | |
120 if (sysevent_get_attr_list(sep, &attr) == 0) { | 118 if (sysevent_get_attr_list(sep, &attr) == 0) { |
121 (void) nvlist_merge(nvl, attr, 0); | 119 (void) nvlist_merge(nvl, attr, 0); |
122 nvlist_free(attr); | 120 nvlist_free(attr); |
123 } | 121 } |
122 | |
123 /* | |
124 * Add class and version after the nvlist_merge() just in case | |
125 * the sysevent has an attribute called class or version. | |
126 */ | |
127 (void) nvlist_add_string(nvl, FM_CLASS, fullclass); | |
128 (void) nvlist_add_uint8(nvl, FM_VERSION, FM_RSRC_VERSION); | |
124 | 129 |
125 /* | 130 /* |
126 * Dispatch the event. Ideally, we'd like to use the same transport | 131 * Dispatch the event. Ideally, we'd like to use the same transport |
127 * interface as sysev_recv(), but because the legacy sysevent mechanism | 132 * interface as sysev_recv(), but because the legacy sysevent mechanism |
128 * puts in a thread outside fmd's control, using the module APIs is | 133 * puts in a thread outside fmd's control, using the module APIs is |