Subject: Big/Little endian conversion in FS
To: None <tech-kern@NetBSD.ORG>
From: Manuel BOUYER <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 09/15/1997 20:26:14
Hi all,
I'd like to add bytes-swapping support to FFS, so that one can mount
a filesystem created with the other endianness (configurable with an
option). I can see 2 way to decide if we need byte swapping or not:
- with a mount option,
- autodetect, based on the magic number.
I prefer the second one.
In order to achieve this, I need byte swapping functions swap16(), swap32() and
swap64(). I think I'll implement theses in C in libkern, and peoples who
know about assembly can write optimised versions for a specific architecture.
Any comments about this ?
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--