1 diff -Naur util-linux-2.12p/disk-utils/fsck.cramfs.c util-linux-2.12p-new/disk-utils/fsck.cramfs.c
2 --- util-linux-2.12p/disk-utils/fsck.cramfs.c 2004-12-11 14:53:16.000000000 +0000
3 +++ util-linux-2.12p-new/disk-utils/fsck.cramfs.c 2004-12-26 00:53:10.665199086 +0000
10 -#define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
11 -#elif defined __ia64__
12 -#define PAGE_CACHE_SIZE (16384)
13 -#elif defined __alpha__
14 -#define PAGE_CACHE_SIZE (8192)
16 -#define PAGE_CACHE_SIZE (4096)
18 +#define PAGE_CACHE_SIZE page_size
20 /* Guarantee access to at least 8kB at a time */
21 #define ROMBUFFER_BITS 13
23 static unsigned long read_buffer_block = ~0UL;
25 /* Uncompressing data structures... */
26 -static char outbuffer[PAGE_CACHE_SIZE*2];
27 +static char *outbuffer;
30 #endif /* INCLUDE_FS_TESTS */
32 +static size_t page_size;
34 /* Input status of 0 to print help and exit without an error. */
35 static void usage(int status)
38 int c; /* for getopt */
41 + page_size = sysconf(_SC_PAGESIZE);
46 + outbuffer = malloc(page_size * 2);
48 + fprintf(stderr, _("failed to allocate outbuffer\n"));
52 /* command line options */
53 while ((c = getopt(argc, argv, "hx:v")) != EOF) {
55 diff -Naur util-linux-2.12p/disk-utils/mkfs.cramfs.c util-linux-2.12p-new/disk-utils/mkfs.cramfs.c
56 --- util-linux-2.12p/disk-utils/mkfs.cramfs.c 2004-12-11 14:56:01.000000000 +0000
57 +++ util-linux-2.12p-new/disk-utils/mkfs.cramfs.c 2004-12-26 00:53:10.666198928 +0000
59 static const char *progname = "mkcramfs";
60 static int verbose = 0;
63 -#define PAGE_CACHE_SIZE (16384)
64 -#elif defined __alpha__
65 -#define PAGE_CACHE_SIZE (8192)
67 -#define PAGE_CACHE_SIZE (4096)
70 /* The kernel assumes PAGE_CACHE_SIZE as block size. */
71 -static unsigned int blksize = PAGE_CACHE_SIZE; /* settable via -b option */
72 +static unsigned int blksize; /* settable via -b option */
73 static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */
74 static int image_length = 0;
77 u32 crc = crc32(0L, Z_NULL, 0);
80 + blksize = sysconf(_SC_PAGESIZE);