[Top] [All Lists]

[patch] big-endian -> little-endian cramfs

To: <>
Subject: [patch] big-endian -> little-endian cramfs
From: Brad <>
Date: Fri, 28 Sep 2001 15:16:28 -0700 (PDT)
Reply-to: <>
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

Attachment: unifiedcram.diff
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
  • [patch] big-endian -> little-endian cramfs, Brad <=