diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/dosfstools/files/alignment_hack.patch | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/dosfstools/files/alignment_hack.patch')
-rw-r--r-- | recipes/dosfstools/files/alignment_hack.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes/dosfstools/files/alignment_hack.patch b/recipes/dosfstools/files/alignment_hack.patch new file mode 100644 index 0000000000..e15060a6fe --- /dev/null +++ b/recipes/dosfstools/files/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 ) |