summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authoria112686 <none@none>2008-08-01 10:33:09 -0700
committeria112686 <none@none>2008-08-01 10:33:09 -0700
commit2c20fda2feee4850b7ec4297e4120bc72c2bac09 (patch)
tree81df0fd23ea6c3918f9086107500b96b4d1d8e90 /usr/src
parent3518c75f7c65c155b17ccc1c193981a253d6a9f7 (diff)
downloadillumos-joyent-2c20fda2feee4850b7ec4297e4120bc72c2bac09.tar.gz
6729456 fp-scrubber doesn't work in fmsim environment
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c b/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c
index 12241ff2f3..48e747a183 100644
--- a/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c
+++ b/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c
@@ -139,6 +139,8 @@ _fmd_fini(fmd_hdl_t *handle)
void
_fmd_init(fmd_hdl_t *hdl)
{
+ int ret = 0;
+
if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0) {
return;
}
@@ -154,10 +156,15 @@ _fmd_init(fmd_hdl_t *hdl)
fmd_hdl_unregister(hdl);
}
- if (sysevent_evc_subscribe(h_event, SUBSCRIBE_ID, SUBSCRIBE_FLAGS,
- event_transfer, NULL, 0) != 0) {
- fmd_hdl_error(hdl, "Failed to subsrcibe to channel %s",
- CHANNEL);
- fmd_hdl_unregister(hdl);
+ ret = sysevent_evc_subscribe(h_event, SUBSCRIBE_ID,
+ SUBSCRIBE_FLAGS, event_transfer, NULL, 0);
+ if (ret != 0) {
+ if (ret == EEXIST) {
+ fmd_hdl_unregister(hdl);
+ } else {
+ fmd_hdl_error(hdl,
+ "Failed to subsrcibe to channel %s", CHANNEL);
+ fmd_hdl_unregister(hdl);
+ }
}
}