Whamcloud - gitweb
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, 26 May 2025 20:25:15 +0000 (16:25 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e2freefrag.c

index 437f011..7e095be 100644 (file)
@@ -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];