1 --- util-linux-2.12p/disk-utils/fsck.cramfs.c 2004-12-11 14:53:16.000000000 +0000
2 +++ util-linux-2.12p-new/disk-utils/fsck.cramfs.c 2004-12-26 00:53:10.665199086 +0000
9 -#define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
10 -#elif defined __ia64__
11 -#define PAGE_CACHE_SIZE (16384)
12 -#elif defined __alpha__
13 -#define PAGE_CACHE_SIZE (8192)
15 -#define PAGE_CACHE_SIZE (4096)
17 +#define PAGE_CACHE_SIZE page_size
19 /* Guarantee access to at least 8kB at a time */
20 #define ROMBUFFER_BITS 13
22 static unsigned long read_buffer_block = ~0UL;
24 /* Uncompressing data structures... */
25 -static char outbuffer[PAGE_CACHE_SIZE*2];
26 +static char *outbuffer;
29 #endif /* INCLUDE_FS_TESTS */
31 +static size_t page_size;
33 /* Input status of 0 to print help and exit without an error. */
34 static void usage(int status)
37 int c; /* for getopt */
40 + page_size = sysconf(_SC_PAGESIZE);
45 + outbuffer = malloc(page_size * 2);
47 + fprintf(stderr, _("failed to allocate outbuffer\n"));
51 /* command line options */
52 while ((c = getopt(argc, argv, "hx:v")) != EOF) {
54 --- util-linux-2.12p/disk-utils/mkfs.cramfs.c 2004-12-11 14:56:01.000000000 +0000
55 +++ util-linux-2.12p-new/disk-utils/mkfs.cramfs.c 2004-12-26 00:53:10.666198928 +0000
57 static const char *progname = "mkcramfs";
58 static int verbose = 0;
61 -#define PAGE_CACHE_SIZE (16384)
62 -#elif defined __alpha__
63 -#define PAGE_CACHE_SIZE (8192)
65 -#define PAGE_CACHE_SIZE (4096)
68 /* The kernel assumes PAGE_CACHE_SIZE as block size. */
69 -static unsigned int blksize = PAGE_CACHE_SIZE; /* settable via -b option */
70 +static unsigned int blksize; /* settable via -b option */
71 static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */
72 static int image_length = 0;
75 u32 crc = crc32(0L, Z_NULL, 0);
78 + blksize = sysconf(_SC_PAGESIZE);