aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zed/agents
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2022-09-19 20:32:18 -0400
committerGitHub <[email protected]>2022-09-19 17:32:18 -0700
commitf272960d52bdc5689078d3cb7cd9e0233cd1a8cd (patch)
treec5be811a7968648da77377b6713a1dfa36b6cf9d /cmd/zed/agents
parent891ac937beb959cad94a2ba267e4b56dee930a5e (diff)
Fix usage of zed_log_msg() and zfs_panic_recover()
Coverity complained about the format specifiers not matching variables. In one case, the variable is a constant, so we fix it. In another, we were missing an argument (about which coverity also complained). Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #13888
Diffstat (limited to 'cmd/zed/agents')
-rw-r--r--cmd/zed/agents/fmd_api.c2
-rw-r--r--cmd/zed/agents/zfs_mod.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zed/agents/fmd_api.c b/cmd/zed/agents/fmd_api.c
index 9e46e831d..56c134b73 100644
--- a/cmd/zed/agents/fmd_api.c
+++ b/cmd/zed/agents/fmd_api.c
@@ -372,7 +372,7 @@ zed_log_fault(nvlist_t *nvl, const char *uuid, const char *code)
if (code != NULL)
zed_log_msg(LOG_INFO, "\t%s: %s", FM_SUSPECT_DIAG_CODE, code);
if (nvlist_lookup_uint8(nvl, FM_FAULT_CERTAINTY, &byte) == 0)
- zed_log_msg(LOG_INFO, "\t%s: %llu", FM_FAULT_CERTAINTY, byte);
+ zed_log_msg(LOG_INFO, "\t%s: %hhu", FM_FAULT_CERTAINTY, byte);
if (nvlist_lookup_nvlist(nvl, FM_FAULT_RESOURCE, &rsrc) == 0) {
if (nvlist_lookup_string(rsrc, FM_FMRI_SCHEME, &strval) == 0)
zed_log_msg(LOG_INFO, "\t%s: %s", FM_FMRI_SCHEME,
diff --git a/cmd/zed/agents/zfs_mod.c b/cmd/zed/agents/zfs_mod.c
index 7364dd2c6..af6de73a1 100644
--- a/cmd/zed/agents/zfs_mod.c
+++ b/cmd/zed/agents/zfs_mod.c
@@ -364,7 +364,7 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
(vs->vs_state != VDEV_STATE_FAULTED) &&
(vs->vs_state != VDEV_STATE_CANT_OPEN)) {
zed_log_msg(LOG_INFO, " not autoreplacing since disk isn't in "
- "a bad state (currently %d)", vs->vs_state);
+ "a bad state (currently %llu)", vs->vs_state);
return;
}