]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fsck.cramfs: ifdef unused outbuffer and page_size
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sat, 17 May 2014 12:58:30 +0000 (14:58 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 19 May 2014 07:22:39 +0000 (09:22 +0200)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
disk-utils/fsck.cramfs.c

index 00ea2ab569336a03ea624b50e30ea2c2a9913ca9..58276a41f80e86c5c588ef7172ff3eedb375a608 100644 (file)
@@ -98,12 +98,13 @@ static z_stream stream;
 
 /* Prototypes */
 static void expand_fs(char *, struct cramfs_inode *);
-#endif /* INCLUDE_FS_TESTS */
 
 static char *outbuffer;
 
 static size_t page_size;
 
+#endif /* INCLUDE_FS_TESTS */
+
 /* Input status of 0 to print help and exit without an error. */
 static void __attribute__((__noreturn__)) usage(int status)
 {
@@ -663,10 +664,6 @@ int main(int argc, char **argv)
        textdomain(PACKAGE);
        atexit(close_stdout);
 
-       page_size = getpagesize();
-
-       outbuffer = xmalloc(page_size * 2);
-
        /* command line options */
        while ((c = getopt_long(argc, argv, "ayx:vVh", longopts, NULL)) != EOF)
                switch (c) {
@@ -701,6 +698,8 @@ int main(int argc, char **argv)
        test_super(&start, &length);
        test_crc(start);
 #ifdef INCLUDE_FS_TESTS
+       page_size = getpagesize();
+       outbuffer = xmalloc(page_size * 2);
        test_fs(start);
 #endif