public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HFSPlus alignment fix
@ 2004-02-16 21:56 Bernard Leach
  0 siblings, 0 replies; only message in thread
From: Bernard Leach @ 2004-02-16 21:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: zippel


Below is a patch against 2.4.24 that fixes an alignment issue in the
HFS+ filesystem.

The fix originates from Daniel Hazelbaker <cabal95 (at)
users.sourceforge.net>.

cheers,
bern.

--- fs/hfsplus/wrapper.c        4 Feb 2004 13:27:38 -0000       1.1.1.1
+++ fs/hfsplus/wrapper.c        4 Feb 2004 13:58:20 -0000       1.2
@@ -14,6 +14,7 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 #include <linux/buffer_head.h>
 #endif
+#include <asm/unaligned.h>
  
 #include "hfsplus_fs.h"
 #include "hfsplus_raw.h"
@@ -45,7 +46,7 @@
                return 0;
        wd->ablk_start = be16_to_cpu(*(u16 *)(bufptr +
HFSP_WRAPOFF_ABLKSTART));  
-       extent = be32_to_cpu(*(u32 *)(bufptr + HFSP_WRAPOFF_EMBEDEXT));
+       extent = be32_to_cpu(get_unaligned((u32 *)(bufptr +
HFSP_WRAPOFF_EMBEDEXT)));
        wd->embed_start = (extent >> 16) & 0xFFFF;
        wd->embed_count = extent & 0xFFFF;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-16 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-16 21:56 [PATCH] HFSPlus alignment fix Bernard Leach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox