Whamcloud - gitweb
Fix debugfs's dump_unsued commands on filesystems with a 64k blocksize
authorTheodore Ts'o <tytso@mit.edu>
Mon, 29 May 2006 03:42:47 +0000 (23:42 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 29 May 2006 03:42:47 +0000 (23:42 -0400)
Use EXT2_MAX_BLOCK_SIZE instead of a hardcoded blocksize of 32768, since
this will fail on a filesystem with a 64k blocksize.  (Addresses SourceForge
bug #1424311)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/ChangeLog
debugfs/unused.c

index 7fea7b2..faca4a5 100644 (file)
@@ -1,3 +1,10 @@
+2006-05-28  Theodore Tso  <tytso@mit.edu>
+
+       * unused.c (do_dump_unused): Use EXT2_MAX_BLOCK_SIZE instead of a
+               hardcoded blocksize of 32768, since this will fail on a
+               filesystem with a 64k blocksize.  (Addresses SourceForge
+               bug #1424311)
+
 2006-05-21  Theodore Tso  <tytso@mit.edu>
 
        * set_fields.c (parse_time): Fix type warning problem with time_t
index a3de6c8..f9e10ca 100644 (file)
@@ -27,7 +27,7 @@ extern char *optarg;
 void do_dump_unused(int argc EXT2FS_ATTR((unused)), char **argv)
 {
        unsigned long   blk;
-       unsigned char buf[32768];
+       unsigned char buf[EXT2_MAX_BLOCK_SIZE];
        unsigned int    i;
        errcode_t       retval;