On Thu, Jun 12, 2003 at 04:00:04PM +0200, M. Gerards wrote:
> > The ext2 file system uses little-endian order, whereas htons etc. convert
> > from
> > native to network (big-endian) byte-order.  So using htons would give you
> > exactly the wrong result.  (Actually, I didn't even think of using htons,
> > since
> > I looked at the Linux code for ext2fs and copied the le**_to_cpu functions
> > from
> > there.)
> 
> htons if used to convert from network order to host order. There are also 
> reverse functions.

But on a big endian machine those functions do nothing (because
network and host order is the same). You can't use the htons functions
here.

Jeroen Dekkers


_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to