aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-contrib-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch')
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
new file mode 100644
index 0000000000..e15060a6fe
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
@@ -0,0 +1,34 @@
+The problem is that unsigned char[2] is
+guranteed to be 8Bit aligned on arm
+but unsigned short is/needs to be 16bit aligned
+the union { unsigned short; unsigned char[2] } trick
+didn't work so no we use the alpha hack.
+
+memcpy into an 16bit aligned
+
+ -zecke
+
+
+--- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
++++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
+@@ -36,17 +36,15 @@
+ { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
+ };
+
+-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
++
+ /* Unaligned fields must first be copied byte-wise */
+ #define GET_UNALIGNED_W(f) \
+ ({ \
+ unsigned short __v; \
+ memcpy( &__v, &f, sizeof(__v) ); \
+- CF_LE_W( *(unsigned short *)&f ); \
++ CF_LE_W( *(unsigned short *)&__v ); \
+ })
+-#else
+-#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
+-#endif
++
+
+
+ static char *get_media_descr( unsigned char media )