diff options
author | наб <[email protected]> | 2021-06-05 14:18:37 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-07-26 12:07:26 -0700 |
commit | 90f1c3c9467881ed76fd3a41719bf297e6de708b (patch) | |
tree | 229f6488ed6901179502197735228e2a414bcc6a /cmd/zhack | |
parent | 5dbf6c5a66d3de65f1b0436c8e83097dd49ff059 (diff) |
Prune /*NOTREACHED*/
This includes a simplification of mkbusy and format correctness in zhack
and ztest
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Issue #12201
Diffstat (limited to 'cmd/zhack')
-rw-r--r-- | cmd/zhack/zhack.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/zhack/zhack.c b/cmd/zhack/zhack.c index c1017ec23..b27423f53 100644 --- a/cmd/zhack/zhack.c +++ b/cmd/zhack/zhack.c @@ -56,7 +56,7 @@ static importargs_t g_importargs; static char *g_pool; static boolean_t g_readonly; -static void +static __attribute__((noreturn)) void usage(void) { (void) fprintf(stderr, @@ -81,7 +81,7 @@ usage(void) } -static void +static __attribute__((noreturn)) __attribute__((format(printf, 3, 4))) void fatal(spa_t *spa, void *tag, const char *fmt, ...) { va_list ap; @@ -112,7 +112,6 @@ space_delta_cb(dmu_object_type_t bonustype, const void *data, return (ENOENT); (void) fprintf(stderr, "modifying object that needs user accounting"); abort(); - /* NOTREACHED */ } /* @@ -318,7 +317,8 @@ zhack_do_feature_enable(int argc, char **argv) mos = spa->spa_meta_objset; if (zfeature_is_supported(feature.fi_guid)) - fatal(spa, FTAG, "'%s' is a real feature, will not enable"); + fatal(spa, FTAG, "'%s' is a real feature, will not enable", + feature.fi_guid); if (0 == zap_contains(mos, spa->spa_feat_desc_obj, feature.fi_guid)) fatal(spa, FTAG, "feature already enabled: %s", feature.fi_guid); @@ -412,7 +412,8 @@ zhack_do_feature_ref(int argc, char **argv) if (zfeature_is_supported(feature.fi_guid)) { fatal(spa, FTAG, - "'%s' is a real feature, will not change refcount"); + "'%s' is a real feature, will not change refcount", + feature.fi_guid); } if (0 == zap_contains(mos, spa->spa_feat_for_read_obj, |