diff options
author | N Clark <[email protected]> | 2017-04-03 17:23:02 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-04-03 14:23:02 -0700 |
commit | bcdb96a3e197ebe64048464c19f505637b8bb7ba (patch) | |
tree | 6367806e991e3f559efc3b050a350e0951b2c40b /cmd/zed | |
parent | 3f2da6cb739f9d288f81abebb0f4bf94d266075d (diff) |
Additional Information for Zedlets
* Add ZPOOL pool state to zfs_post_common to
allow differentiation between export and destroy
by zedlets.
* Add pool name as standard export This ensures
pool name is exported to zedlets.
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Don Brady <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Nathaniel Clark <[email protected]>
Closes #5942
Diffstat (limited to 'cmd/zed')
-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: |