]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs: return after printing the usage message in the e2freefrag command
authorTheodore Ts'o <tytso@mit.edu>
Mon, 26 May 2025 20:25:15 +0000 (16:25 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Jun 2025 20:56:50 +0000 (16:56 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 0c675a67c5684252e3a228c824b0accb9f3ab5d7)

misc/e2freefrag.c

index c66e8f22f3d869767c3222e2941996176cf8fa44..05f703966c903af395c820b92f49300e58ee65bc 100644 (file)
@@ -409,6 +409,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)) {
@@ -421,6 +424,9 @@ int main(int argc, char *argv[])
                case 'h':
                default:
                        usage(progname);
+#ifdef DEBUGFS
+                       return;
+#endif
                        break;
                }
        }
@@ -429,6 +435,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];