From 0c675a67c5684252e3a228c824b0accb9f3ab5d7 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 26 May 2025 16:25:15 -0400 Subject: [PATCH] debugfs: return after printing the usage message in the e2freefrag command Signed-off-by: Theodore Ts'o --- misc/e2freefrag.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c index 437f011..7e095be 100644 --- a/misc/e2freefrag.c +++ b/misc/e2freefrag.c @@ -397,6 +397,9 @@ int main(int argc, char *argv[]) fprintf(stderr, "%s: bad chunk size '%s'\n", progname, optarg); usage(progname); +#ifdef DEBUFS + return; +#endif } if (chunk_info.chunkbytes & (chunk_info.chunkbytes - 1)) { @@ -409,6 +412,9 @@ int main(int argc, char *argv[]) case 'h': default: usage(progname); +#ifdef DEBUGFS + return; +#endif break; } } @@ -417,6 +423,9 @@ int main(int argc, char *argv[]) if (optind == argc) { fprintf(stderr, "%s: missing device name.\n", progname); usage(progname); +#ifdef DEBUGFS + return; +#endif } device_name = argv[optind]; -- 1.8.3.1