freebsd-dev/sys/msdosfs
bde c92fa8eaa3 Quick fix for msdsofs_write() on alphas and other machines with either
longs larger than 32 bits or strict alignment requirements.

pm_fatmask had type u_long, but it must have a type that has precisely
32 bits and this type must be no smaller than int, so that ~pmp->pm_fatmask
has no bits above the 31st set.  Otherwise, comparisons between (cn
| ~pmp->pm_fatmask) and magic 32-bit "cluster" numbers always fail.
The correct fix is to use the C99 type uint_least32_t and mask with
0xffffffff.  The quick fix is to use u_int32_t and assume that ints
have

msdosfs metadata is riddled with unaligned fields, and on alphas,
unaligned_fixup() apparently has problems fixing up the unaligned
accesses caused by this.  The quick fix is to not comment out the
NetBSD code that sort of handles this, and define UNALIGNED_ACCESS on
i386's so that the code doesn't change on i386's.  The correct fix
would define UNALIGNED_ACCESS in a central machine-dependent header
and maybe add some extra cases to unaligned_fixup().  UNALIGNED_ACCESS
is also tested in isofs.

Submitted by:	parts by Mark Abene <phiber@radicalmedia.com>
PR:		19086
2000-08-25 09:03:58 +00:00
..
bootsect.h
bpb.h Quick fix for msdsofs_write() on alphas and other machines with either 2000-08-25 09:03:58 +00:00
denode.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
direntry.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
fat.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
msdosfs_conv.c
msdosfs_denode.c Fix memory leakage on module unload. 2000-06-29 01:12:47 +00:00
msdosfs_fat.c Separate the struct bio related stuff out of <sys/buf.h> into 2000-05-05 09:59:14 +00:00
msdosfs_lookup.c Separate the struct bio related stuff out of <sys/buf.h> into 2000-05-05 09:59:14 +00:00
msdosfs_vfsops.c Fix memory leakage on module unload. 2000-06-29 01:12:47 +00:00
msdosfs_vnops.c Centralize the canonical vop_access user/group/other check in vaccess(). 2000-08-20 08:36:26 +00:00
msdosfsmount.h Quick fix for msdsofs_write() on alphas and other machines with either 2000-08-25 09:03:58 +00:00