From: <z7...@us...> - 2007-03-15 19:50:33
|
Revision: 912 http://svn.sourceforge.net/hackndev/?rev=912&view=rev Author: z72ka Date: 2007-03-15 12:50:29 -0700 (Thu, 15 Mar 2007) Log Message: ----------- squashfs: fixed build problem with gcc-4.1 used in OE build, this is a linux-rp patch for 2.6.20 Modified Paths: -------------- linux4palm/linux/trunk/include/linux/squashfs_fs.h linux4palm/linux/trunk/include/linux/squashfs_fs_i.h linux4palm/linux/trunk/include/linux/squashfs_fs_sb.h Modified: linux4palm/linux/trunk/include/linux/squashfs_fs.h =================================================================== --- linux4palm/linux/trunk/include/linux/squashfs_fs.h 2007-03-15 19:47:10 UTC (rev 911) +++ linux4palm/linux/trunk/include/linux/squashfs_fs.h 2007-03-15 19:50:29 UTC (rev 912) @@ -4,7 +4,7 @@ /* * Squashfs * - * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 + * Copyright (c) 2002, 2003, 2004, 2005, 2006 * Phillip Lougher <ph...@lo...> * * This program is free software; you can redistribute it and/or @@ -72,7 +72,6 @@ #define SQUASHFS_NO_FRAG 4 #define SQUASHFS_ALWAYS_FRAG 5 #define SQUASHFS_DUPLICATE 6 -#define SQUASHFS_EXPORT 7 #define SQUASHFS_BIT(flag, bit) ((flag >> bit) & 1) @@ -94,16 +93,13 @@ #define SQUASHFS_DUPLICATES(flags) SQUASHFS_BIT(flags, \ SQUASHFS_DUPLICATE) -#define SQUASHFS_EXPORTABLE(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_EXPORT) - #define SQUASHFS_CHECK_DATA(flags) SQUASHFS_BIT(flags, \ SQUASHFS_CHECK) #define SQUASHFS_MKFLAGS(noi, nod, check_data, nof, no_frag, always_frag, \ - duplicate_checking, exortable) (noi | (nod << 1) | (check_data << 2) \ + duplicate_checking) (noi | (nod << 1) | (check_data << 2) \ | (nof << 3) | (no_frag << 4) | (always_frag << 5) | \ - (duplicate_checking << 6) | (exportable << 7)) + (duplicate_checking << 6)) /* Max number of types and file types */ #define SQUASHFS_DIR_TYPE 1 @@ -157,7 +153,7 @@ #define SQUASHFS_MODE(a) ((a) & 0xfff) /* fragment and fragment table defines */ -#define SQUASHFS_FRAGMENT_BYTES(A) ((A) * sizeof(struct squashfs_fragment_entry)) +#define SQUASHFS_FRAGMENT_BYTES(A) (A * sizeof(struct squashfs_fragment_entry)) #define SQUASHFS_FRAGMENT_INDEX(A) (SQUASHFS_FRAGMENT_BYTES(A) / \ SQUASHFS_METADATA_SIZE) @@ -172,22 +168,6 @@ #define SQUASHFS_FRAGMENT_INDEX_BYTES(A) (SQUASHFS_FRAGMENT_INDEXES(A) *\ sizeof(long long)) -/* inode lookup table defines */ -#define SQUASHFS_LOOKUP_BYTES(A) ((A) * sizeof(squashfs_inode_t)) - -#define SQUASHFS_LOOKUP_BLOCK(A) (SQUASHFS_LOOKUP_BYTES(A) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_LOOKUP_BLOCK_OFFSET(A) (SQUASHFS_LOOKUP_BYTES(A) % \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_LOOKUP_BLOCKS(A) ((SQUASHFS_LOOKUP_BYTES(A) + \ - SQUASHFS_METADATA_SIZE - 1) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_LOOKUP_BLOCK_BYTES(A) (SQUASHFS_LOOKUP_BLOCKS(A) *\ - sizeof(long long)) - /* cached data constants for filesystem */ #define SQUASHFS_CACHED_BLKS 8 @@ -255,7 +235,7 @@ long long inode_table_start; long long directory_table_start; long long fragment_table_start; - long long lookup_table_start; + long long unused; } __attribute__ ((packed)); struct squashfs_dir_index { @@ -362,7 +342,7 @@ struct squashfs_fragment_entry { long long start_block; unsigned int size; - unsigned int pending; + unsigned int unused; } __attribute__ ((packed)); extern int squashfs_uncompress_block(void *d, int dstlen, void *s, int srclen); @@ -411,7 +391,7 @@ SQUASHFS_SWAP((s)->inode_table_start, d, 696, 64);\ SQUASHFS_SWAP((s)->directory_table_start, d, 760, 64);\ SQUASHFS_SWAP((s)->fragment_table_start, d, 824, 64);\ - SQUASHFS_SWAP((s)->lookup_table_start, d, 888, 64);\ + SQUASHFS_SWAP((s)->unused, d, 888, 64);\ } #define SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\ @@ -527,8 +507,6 @@ SQUASHFS_SWAP((s)->size, d, 64, 32);\ } -#define SQUASHFS_SWAP_INODE_T(s, d) SQUASHFS_SWAP_LONG_LONGS(s, d, 1) - #define SQUASHFS_SWAP_SHORTS(s, d, n) {\ int entry;\ int bit_position;\ @@ -570,7 +548,6 @@ } #define SQUASHFS_SWAP_FRAGMENT_INDEXES(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n) -#define SQUASHFS_SWAP_LOOKUP_BLOCKS(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n) #ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY Modified: linux4palm/linux/trunk/include/linux/squashfs_fs_i.h =================================================================== --- linux4palm/linux/trunk/include/linux/squashfs_fs_i.h 2007-03-15 19:47:10 UTC (rev 911) +++ linux4palm/linux/trunk/include/linux/squashfs_fs_i.h 2007-03-15 19:50:29 UTC (rev 912) @@ -3,7 +3,7 @@ /* * Squashfs * - * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 + * Copyright (c) 2002, 2003, 2004, 2005, 2006 * Phillip Lougher <ph...@lo...> * * This program is free software; you can redistribute it and/or Modified: linux4palm/linux/trunk/include/linux/squashfs_fs_sb.h =================================================================== --- linux4palm/linux/trunk/include/linux/squashfs_fs_sb.h 2007-03-15 19:47:10 UTC (rev 911) +++ linux4palm/linux/trunk/include/linux/squashfs_fs_sb.h 2007-03-15 19:50:29 UTC (rev 912) @@ -3,7 +3,7 @@ /* * Squashfs * - * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 + * Copyright (c) 2002, 2003, 2004, 2005, 2006 * Phillip Lougher <ph...@lo...> * * This program is free software; you can redistribute it and/or @@ -53,18 +53,18 @@ unsigned int *guid; long long *fragment_index; unsigned int *fragment_index_2; + unsigned int read_size; + char *read_data; char *read_page; - struct mutex read_data_mutex; - struct mutex read_page_mutex; - struct mutex block_cache_mutex; - struct mutex fragment_mutex; - struct mutex meta_index_mutex; + struct semaphore read_data_mutex; + struct semaphore read_page_mutex; + struct semaphore block_cache_mutex; + struct semaphore fragment_mutex; + struct semaphore meta_index_mutex; wait_queue_head_t waitq; wait_queue_head_t fragment_wait_queue; struct meta_index *meta_index; - z_stream stream; - long long *inode_lookup_table; - int (*read_inode)(struct inode *i, squashfs_inode_t \ + struct inode *(*iget)(struct super_block *s, squashfs_inode_t \ inode); long long (*read_blocklist)(struct inode *inode, int \ index, int readahead_blks, char *block_list, \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |