Whamcloud - gitweb
e2freefrag: Clarify e2freefrag's messages
authorTheodore Ts'o <tytso@mit.edu>
Sun, 9 Aug 2009 23:29:30 +0000 (19:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Aug 2009 03:21:17 +0000 (23:21 -0400)
"Free chunks" is confusing since it has nothing to do with the
chunksize; use "free extents" instead.

Also add a missing newline in an error message.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/e2freefrag.8.in
misc/e2freefrag.c

index 9c47e97..77fadd7 100644 (file)
@@ -54,16 +54,16 @@ Total chunks: 5876
 Free chunks: 463 (7.9%)
 .br
 
-Min free chunk: 4 KB
+Min. free extent: 4 KB
 .br
-Max free chunk: 24008 KB
+Max. free extent: 24008 KB
 .br
-Avg free chunk: 252 KB
+Avg. free extent: 252 KB
 .br
 
-HISTOGRAM OF FREE CHUNK SIZES:
+HISTOGRAM OF FREE EXTENT SIZES:
 .br
-Chunk Size Range :   Free chunks   Free Blocks  Percent
+Extent Size Range :   Free extents   Free Blocks  Percent
 .br
     4K...    8K- :           704           704     0.2%
 .br
index df41853..9e7b617 100644 (file)
@@ -156,16 +156,16 @@ errcode_t get_chunk_info(ext2_filsys fs, struct chunk_info *info)
                info->min = 0;
        }
 
-       printf("\nMin free chunk: %lu KB \nMax free chunk: %lu KB\n"
-              "Avg free chunk: %lu KB\n", info->min, info->max, info->avg);
+       printf("\nMin. free extent: %lu KB \nMax. free extent: %lu KB\n"
+              "Avg. free extent: %lu KB\n", info->min, info->max, info->avg);
 
-       printf("\nHISTOGRAM OF FREE CHUNK SIZES:\n");
-       printf("%s :  %12s  %12s  %7s\n", "Chunk Size Range", "Free chunks",
+       printf("\nHISTOGRAM OF FREE EXTENT SIZES:\n");
+       printf("%s :  %12s  %12s  %7s\n", "Extent Size Range", "Free extents",
               "Free Blocks", "Percent");
        for (i = 0; i < MAX_HIST; i++) {
                end = 1 << (i + info->blocksize_bits - units);
                if (info->histogram.fc_chunks[i] != 0)
-                       printf("%5lu%c...%5lu%c- :  %12lu  %12lu  %6.2f%%\n",
+                       printf("%5lu%c...%5lu%c-  :  %12lu  %12lu  %6.2f%%\n",
                               start, *unitp, end, *unitp,
                               info->histogram.fc_chunks[i],
                               info->histogram.fc_blocks[i],
@@ -250,7 +250,7 @@ int main(int argc, char *argv[])
                        if (chunk_info.chunkbytes &
                            (chunk_info.chunkbytes - 1)) {
                                fprintf(stderr, "%s: chunk size must be a "
-                                       "power of 2.", argv[0]);
+                                       "power of 2.\n", argv[0]);
                                usage(progname);
                        }
                        chunk_info.chunkbytes *= 1024;