From 396545c2ea073144d5cd905bc8bcfb0080549f6d Mon Sep 17 00:00:00 2001
From: Integral <integral@archlinuxcn.org>
Date: Fri, 28 Mar 2025 10:42:22 +0800
Subject: [PATCH] bcachefs-tools: hide FUSE in usage when BCACHEFS_FUSE
 disabled

When BCACHEFS_FUSE is disabled or not defined, FUSE section shouldn't
be displayed in bcachefs usage (--help).

Signed-off-by: Integral <integral@archlinuxcn.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 c_src/bcachefs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/c_src/bcachefs.c b/c_src/bcachefs.c
index aed9c261..f2a1449e 100644
--- a/c_src/bcachefs.c
+++ b/c_src/bcachefs.c
@@ -93,9 +93,11 @@ void bcachefs_usage(void)
 	     "  list                     List filesystem metadata in textual form\n"
 	     "  list_journal             List contents of journal\n"
 	     "\n"
+#ifdef BCACHEFS_FUSE
 	     "FUSE:\n"
 	     "  fusemount                Mount a filesystem via FUSE\n"
 	     "\n"
+#endif
 	     "Miscellaneous:\n"
          "  completions              Generate shell completions\n"
 	     "  version                  Display the version of the invoked bcachefs tool\n");