Subject: msdosfs on a big endian machine
To: None <>
From: Tad Hunt <>
List: tech-kern
Date: 07/23/2001 21:31:54
sys/msdosfs/msdosfs_vfsops:msdosfs_mountfs() is having trouble
reading the MBR on the drive I partitioned and formatted on
a Windows 95 laptop.

(The drive in question happens to be an IBM Microdrive, not
that it should matter)

It fails to pass this test:

	if (!(argp->flags & MSDOSFSMNT_GEMDOSFS)) {
		if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
		    || bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
			error = EINVAL;
			goto error_exit;

Because the signature bytes are reversed from what it is expecting.
(BootSectSig0 is 0xAA, and bsBootSectSig1 is 0x55)

Looking through the code, I would expect this test to work regardless
of the endianness of the host, which means that the bootsector itself
must be in a different order than expected.  Has anyone ever seen this

I don't know if it matters, but I formatted the microdrive on
a Dutch friend's laptop (which was running a Dutch version of Win95)

Anybody seen anything like this?