Re: [PATCH] Endianness-aware mkcramfs

H. Peter Anvin (hpa@zytor.com)
4 Dec 2001 10:42:51 -0800


Followup to: <3C0CB59B.EEA251AB@lightning.ch>
By author: Daniel Marmier <daniel.marmier@lightning.ch>
In newsgroup: linux.dev.kernel
>
> Here you are, against kernel 2.4.16. The patch is not as clean as one
> would like it to be, but we use it and it works well for us.
>
> Basically it adds a "-b" (byteorder option) which can take four parameters:
> -bb creates a big-endian cramfs,
> -bl creates a little-endian cramfs,
> -bh creates a cramfs with the same endianness as the host,
> -br creates a cramfs with the reverse endianness as the host,
> where "host" refers to the machine running the mkcramfs program.
>
> As told above, it could be cleaner, but I don't know of a nice method of
> accessing byteorder dependent data through structures.
>

This isn't the right way to deal with this. The right way to deal
with this is to get all systems to read cramfs the same way.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>
-
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/