From: Alan Cox Date: Sun, 30 Nov 2014 20:56:44 +0000 (+0000) Subject: xfs2: auto-switch endianness and fix build bug X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5d601a9b1c3fb8522e6766a62d60b08d9fd2a8da;p=FUZIX.git xfs2: auto-switch endianness and fix build bug --- diff --git a/Standalone/xfs2.c b/Standalone/xfs2.c index 7ce06577..68207deb 100644 --- a/Standalone/xfs2.c +++ b/Standalone/xfs2.c @@ -900,7 +900,7 @@ blkno_t bmap(inoptr ip, blkno_t bn, int rwflg) } ******/ i = (bn>>sh) & 0xff; - if ((swizzle16(nb) = ((blkno_t *)bp)[i])) + if ((swizzle16(nb) == ((blkno_t *)bp)[i])) brelse(bp); else { @@ -1024,6 +1024,8 @@ int fmount(int dev, inoptr ino) brelse((bufptr)buf); /* See if there really is a filesystem on the device */ + if (fp->s_mounted == SMOUNTED_WRONGENDIAN) + swizzling = 1; if (swizzle16(fp->s_mounted) != SMOUNTED || swizzle16(fp->s_isize) >= swizzle16(fp->s_fsize)) return (-1);