diff options
Diffstat (limited to 'fs/jffs2/compr.h')
-rw-r--r-- | fs/jffs2/compr.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fs/jffs2/compr.h b/fs/jffs2/compr.h index 68cc7010dbdf..1070275da58f 100644 --- a/fs/jffs2/compr.h +++ b/fs/jffs2/compr.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * JFFS2 -- Journalling Flash File System, Version 2. | 2 | * JFFS2 -- Journalling Flash File System, Version 2. |
3 | * | 3 | * |
4 | * Copyright © 2004 Ferenc Havasi <havasi@inf.u-szeged.hu>, | 4 | * Copyright © 2004 Ferenc Havasi <havasi@inf.u-szeged.hu>, |
5 | * University of Szeged, Hungary | 5 | * University of Szeged, Hungary |
6 | * | 6 | * |
7 | * For licensing information, see the file 'LICENCE' in this directory. | 7 | * For licensing information, see the file 'LICENCE' in this directory. |
8 | * | 8 | * |
@@ -32,29 +32,29 @@ | |||
32 | #define JFFS2_ZLIB_PRIORITY 60 | 32 | #define JFFS2_ZLIB_PRIORITY 60 |
33 | 33 | ||
34 | #define JFFS2_RUBINMIPS_DISABLED /* RUBINs will be used only */ | 34 | #define JFFS2_RUBINMIPS_DISABLED /* RUBINs will be used only */ |
35 | #define JFFS2_DYNRUBIN_DISABLED /* for decompression */ | 35 | #define JFFS2_DYNRUBIN_DISABLED /* for decompression */ |
36 | 36 | ||
37 | #define JFFS2_COMPR_MODE_NONE 0 | 37 | #define JFFS2_COMPR_MODE_NONE 0 |
38 | #define JFFS2_COMPR_MODE_PRIORITY 1 | 38 | #define JFFS2_COMPR_MODE_PRIORITY 1 |
39 | #define JFFS2_COMPR_MODE_SIZE 2 | 39 | #define JFFS2_COMPR_MODE_SIZE 2 |
40 | 40 | ||
41 | struct jffs2_compressor { | 41 | struct jffs2_compressor { |
42 | struct list_head list; | 42 | struct list_head list; |
43 | int priority; /* used by prirority comr. mode */ | 43 | int priority; /* used by prirority comr. mode */ |
44 | char *name; | 44 | char *name; |
45 | char compr; /* JFFS2_COMPR_XXX */ | 45 | char compr; /* JFFS2_COMPR_XXX */ |
46 | int (*compress)(unsigned char *data_in, unsigned char *cpage_out, | 46 | int (*compress)(unsigned char *data_in, unsigned char *cpage_out, |
47 | uint32_t *srclen, uint32_t *destlen, void *model); | 47 | uint32_t *srclen, uint32_t *destlen, void *model); |
48 | int (*decompress)(unsigned char *cdata_in, unsigned char *data_out, | 48 | int (*decompress)(unsigned char *cdata_in, unsigned char *data_out, |
49 | uint32_t cdatalen, uint32_t datalen, void *model); | 49 | uint32_t cdatalen, uint32_t datalen, void *model); |
50 | int usecount; | 50 | int usecount; |
51 | int disabled; /* if seted the compressor won't compress */ | 51 | int disabled; /* if set the compressor won't compress */ |
52 | unsigned char *compr_buf; /* used by size compr. mode */ | 52 | unsigned char *compr_buf; /* used by size compr. mode */ |
53 | uint32_t compr_buf_size; /* used by size compr. mode */ | 53 | uint32_t compr_buf_size; /* used by size compr. mode */ |
54 | uint32_t stat_compr_orig_size; | 54 | uint32_t stat_compr_orig_size; |
55 | uint32_t stat_compr_new_size; | 55 | uint32_t stat_compr_new_size; |
56 | uint32_t stat_compr_blocks; | 56 | uint32_t stat_compr_blocks; |
57 | uint32_t stat_decompr_blocks; | 57 | uint32_t stat_decompr_blocks; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | int jffs2_register_compressor(struct jffs2_compressor *comp); | 60 | int jffs2_register_compressor(struct jffs2_compressor *comp); |
@@ -64,12 +64,12 @@ int jffs2_compressors_init(void); | |||
64 | int jffs2_compressors_exit(void); | 64 | int jffs2_compressors_exit(void); |
65 | 65 | ||
66 | uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | 66 | uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, |
67 | unsigned char *data_in, unsigned char **cpage_out, | 67 | unsigned char *data_in, unsigned char **cpage_out, |
68 | uint32_t *datalen, uint32_t *cdatalen); | 68 | uint32_t *datalen, uint32_t *cdatalen); |
69 | 69 | ||
70 | int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | 70 | int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, |
71 | uint16_t comprtype, unsigned char *cdata_in, | 71 | uint16_t comprtype, unsigned char *cdata_in, |
72 | unsigned char *data_out, uint32_t cdatalen, uint32_t datalen); | 72 | unsigned char *data_out, uint32_t cdatalen, uint32_t datalen); |
73 | 73 | ||
74 | void jffs2_free_comprbuf(unsigned char *comprbuf, unsigned char *orig); | 74 | void jffs2_free_comprbuf(unsigned char *comprbuf, unsigned char *orig); |
75 | 75 | ||