[PATCH] Big-endian reading/writing cramfs (vs 2.4.10)

From: Brad (prettygood@cs.stanford.edu)
Date: Fri Sep 28 2001 - 16:58:13 EST


A few people have expressed interest in this, and I needed it as
well. Currently, cramfs images aren't shareable between different endian
architectures. The documentation states the meta-data should always be
stored little endian, as the cost of swabbing would be low, but the code
doesn't do it. We needed shareable images, so I modified inode.c,
cramfs_fs.h, and mkcramfs.h to enable a big-endian machine to swab meta
data when writing (mkcramfs.c) and reading (inode.c). This is done with
#defined macros (the 26 bit/6 bit bitfield is kind of ugly to translate),
so the code doesn't change for little-endian machines, only big-endian.
I tested reading le on be, reading a be-written le image on le, etc...

This is a patch against 2.4.10.

-Brad Bozarth



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:01:05 EST