3
0
forked from pool/util-linux
util-linux/stupid-programmer.diff

39 lines
911 B
Diff

--- disk-utils/fsck.cramfs.c
+++ disk-utils/fsck.cramfs.c
@@ -76,16 +76,7 @@
#define PAD_SIZE 512
-#include <asm/page.h>
-#ifdef PAGE_SIZE
-#define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
-#elif defined __ia64__
-#define PAGE_CACHE_SIZE (16384)
-#elif defined __alpha__
-#define PAGE_CACHE_SIZE (8192)
-#else
-#define PAGE_CACHE_SIZE (4096)
-#endif
+#define PAGE_CACHE_SIZE getpagesize() /* Stupid programmer */
/* Guarantee access to at least 8kB at a time */
#define ROMBUFFER_BITS 13
@@ -95,7 +86,7 @@
static unsigned long read_buffer_block = ~0UL;
/* Uncompressing data structures... */
-static char outbuffer[PAGE_CACHE_SIZE*2];
+static char *outbuffer; /* Stupid programmer */
z_stream stream;
#endif /* INCLUDE_FS_TESTS */
@@ -464,6 +455,8 @@
int c; /* for getopt */
int start = 0;
+ outbuffer = malloc(PAGE_CACHE_SIZE); /* Stupid programmer */
+
if (argc)
progname = argv[0];