Skip to contentSkip to conversation

ceph: Use str_true_false() helper in status_show()

PATCH Applied Thorsten Blum 2 participants 2 messages Nov 12, 2024 – Nov 18, 2024 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: Use str_true_false() helper in status_show()

Remove hard-coded strings by using the str_true_false() helper function.

---
 fs/ceph/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/debugfs.c +1 -1
index 24c08078f5aa..fdf9dc15eafa 100644
@@ -357,7 +357,7 @@ static int status_show(struct seq_file *s, void *p)
 
 	seq_printf(s, "instance: %s.%lld %s/%u\n", ENTITY_NAME(inst->name),
 		   ceph_pr_addr(client_addr), le32_to_cpu(client_addr->nonce));
-	seq_printf(s, "blocklisted: %s\n", fsc->blocklisted ? "true" : "false");
+	seq_printf(s, "blocklisted: %s\n", str_true_false(fsc->blocklisted));
 
 	return 0;
 }
Signature · 1 line
2.47.0
maintainer Applied
#1 lore raw
Quoted 22 lines · Thorsten Blum

Remove hard-coded strings by using the str_true_false() helper function.

---
 fs/ceph/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/debugfs.c +1 -2
index 24c08078f5aa..fdf9dc15eafa 100644
@@ -357,7 +357,7 @@ static int status_show(struct seq_file *s, void *p)
 
        seq_printf(s, "instance: %s.%lld %s/%u\n", ENTITY_NAME(inst->name),
                   ceph_pr_addr(client_addr), le32_to_cpu(client_addr->nonce));
-       seq_printf(s, "blocklisted: %s\n", fsc->blocklisted ? "true" : "false");
+       seq_printf(s, "blocklisted: %s\n", str_true_false(fsc->blocklisted));
 
        return 0;
 }
--
Quoted 2 lines

2.47.0

Applied.

Thanks,

Ilya