* Patch [1/1] Remove JFFS2 dependancy on zlib private header
@ 2007-06-01 19:15 Daniel Hazelton
0 siblings, 0 replies; only message in thread
From: Daniel Hazelton @ 2007-06-01 19:15 UTC (permalink / raw)
To: lkml
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
This change is based on recent discussions of the JFFS2 code relying on
constants defined in the private zlib header zutil.h
The result of this discussion is to change the use of the constant into
a 'Magic Number' (according to Mark Adler this number is part of the standard
and will never change - defined in RFC 1950)
Signed-off-by: Daniel Hazelton <dhazelton@enter.net>
[-- Attachment #2: remove-jffs2-zutil.h-dependency.patch --]
[-- Type: text/x-diff, Size: 694 bytes --]
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
index 2b87fcc..9f1b935 100644
--- a/fs/jffs2/compr_zlib.c
+++ b/fs/jffs2/compr_zlib.c
@@ -16,7 +16,6 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/zlib.h>
-#include <linux/zutil.h>
#include "nodelist.h"
#include "compr.h"
@@ -154,7 +153,7 @@ static int jffs2_zlib_decompress(unsigned char *data_in,
/* If it's deflate, and it's got no preset dictionary, then
we can tell zlib to skip the adler32 check. */
- if (srclen > 2 && !(data_in[1] & PRESET_DICT) &&
+ if (srclen > 2 && !(data_in[1] & 0x20) &&
((data_in[0] & 0x0f) == Z_DEFLATED) &&
!(((data_in[0]<<8) + data_in[1]) % 31)) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-01 19:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 19:15 Patch [1/1] Remove JFFS2 dependancy on zlib private header Daniel Hazelton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox