Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2000 02:03:59 -0700 (PDT)
From:      Bruce Evans <bde@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/msdosfs bpb.h msdosfsmount.h
Message-ID:  <200008250903.CAA28823@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         2000/08/25 02:03:59 PDT

  Modified files:
    sys/msdosfs          bpb.h msdosfsmount.h 
  Log:
  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
  
  Revision  Changes    Path
  1.8       +8 -2      src/sys/msdosfs/bpb.h
  1.22      +2 -2      src/sys/msdosfs/msdosfsmount.h



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008250903.CAA28823>