Whamcloud - gitweb
libext2fs: check for fallocate symbol before using it
[tools/e2fsprogs.git] / lib / ext2fs / tst_badblocks.c
index c4744b3..3b39ef1 100644 (file)
@@ -4,11 +4,12 @@
  * Copyright (C) 1996 by Theodore Ts'o.
  *
  * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
  * %End-Header%
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #if HAVE_UNISTD_H
@@ -227,7 +228,7 @@ int file_test_invalid(badblocks_list bb)
        fs->super = malloc(SUPERBLOCK_SIZE);
        memset(fs->super, 0, SUPERBLOCK_SIZE);
        fs->super->s_first_data_block = 1;
-       fs->super->s_blocks_count = 100;
+       ext2fs_blocks_count_set(fs->super, 100);
 
        f = tmpfile();
        if (!f) {