source:
patches/util-linux-2.12r-cramfs-1.patch@
6a54d18
Last change on this file since 6a54d18 was 69cde8d, checked in by , 19 years ago | |
---|---|
|
|
File size: 2.8 KB |
-
disk-utils/fsck.cramfs.c
Submitted by: Jeremy Utley <jeremy@linuxfromscratch.org> Date: 2004-12-25 Initial Package Version: 2.12p (should apply to versions back to at least k) Upstream Status: Not Submitted - Test Version Origin: Alexander Patrakov, adapted from debian build of cramfs utilities Description: Util-Linux fails in cramfs compilation due to changes in the linux-libc-headers package 2.6.9 and after. This patch is a proper fix to the problem, but may in fact not be accepted upstream. diff -Naur util-linux-2.12p/disk-utils/fsck.cramfs.c util-linux-2.12p-new/disk-utils/fsck.cramfs.c
old new 76 76 77 77 #define PAD_SIZE 512 78 78 79 #include <asm/page.h> 80 #ifdef PAGE_SIZE 81 #define PAGE_CACHE_SIZE ((int) PAGE_SIZE) 82 #elif defined __ia64__ 83 #define PAGE_CACHE_SIZE (16384) 84 #elif defined __alpha__ 85 #define PAGE_CACHE_SIZE (8192) 86 #else 87 #define PAGE_CACHE_SIZE (4096) 88 #endif 79 #define PAGE_CACHE_SIZE page_size 89 80 90 81 /* Guarantee access to at least 8kB at a time */ 91 82 #define ROMBUFFER_BITS 13 … … 95 86 static unsigned long read_buffer_block = ~0UL; 96 87 97 88 /* Uncompressing data structures... */ 98 static char outbuffer[PAGE_CACHE_SIZE*2];89 static char *outbuffer; 99 90 z_stream stream; 100 91 101 92 #endif /* INCLUDE_FS_TESTS */ 102 93 94 static size_t page_size; 95 103 96 /* Input status of 0 to print help and exit without an error. */ 104 97 static void usage(int status) 105 98 { … … 464 457 int c; /* for getopt */ 465 458 int start = 0; 466 459 460 page_size = sysconf(_SC_PAGESIZE); 461 467 462 if (argc) 468 463 progname = argv[0]; 469 464 465 outbuffer = malloc(page_size * 2); 466 if (!outbuffer) { 467 fprintf(stderr, _("failed to allocate outbuffer\n")); 468 exit(8); 469 } 470 470 471 /* command line options */ 471 472 while ((c = getopt(argc, argv, "hx:v")) != EOF) { 472 473 switch (c) { -
disk-utils/mkfs.cramfs.c
diff -Naur util-linux-2.12p/disk-utils/mkfs.cramfs.c util-linux-2.12p-new/disk-utils/mkfs.cramfs.c
old new 46 46 static const char *progname = "mkcramfs"; 47 47 static int verbose = 0; 48 48 49 #ifdef __ia64__50 #define PAGE_CACHE_SIZE (16384)51 #elif defined __alpha__52 #define PAGE_CACHE_SIZE (8192)53 #else54 #define PAGE_CACHE_SIZE (4096)55 #endif56 57 49 /* The kernel assumes PAGE_CACHE_SIZE as block size. */ 58 static unsigned int blksize = PAGE_CACHE_SIZE;/* settable via -b option */50 static unsigned int blksize; /* settable via -b option */ 59 51 static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */ 60 52 static int image_length = 0; 61 53 … … 730 722 u32 crc = crc32(0L, Z_NULL, 0); 731 723 int c; 732 724 725 blksize = sysconf(_SC_PAGESIZE); 733 726 total_blocks = 0; 734 727 735 728 if (argc) {
Note:
See TracBrowser
for help on using the repository browser.