diff options
Diffstat (limited to 'cmd/zed/zed_event.c')
-rw-r--r-- | cmd/zed/zed_event.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/zed/zed_event.c b/cmd/zed/zed_event.c index b289ebf22..aecdb5146 100644 --- a/cmd/zed/zed_event.c +++ b/cmd/zed/zed_event.c @@ -653,6 +653,16 @@ _zed_event_add_nvpair(uint64_t eid, zed_strings_t *zsp, nvpair_t *nvp) (void) snprintf(alt, sizeof (alt), "%s_str", name); _zed_event_add_var(eid, zsp, prefix, alt, "%s", zpool_state_to_name(i64, VDEV_AUX_NONE)); + } else + /* + * shadow readable strings for pool state + */ + if (strcmp(name, FM_EREPORT_PAYLOAD_ZFS_POOL_STATE) == 0) { + char alt[32]; + + (void) snprintf(alt, sizeof (alt), "%s_str", name); + _zed_event_add_var(eid, zsp, prefix, alt, "%s", + zpool_pool_state_to_name(i32)); } break; case DATA_TYPE_DOUBLE: |