diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-01-20 01:55:06 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-01-20 01:55:06 +0000 |
commit | cfd870dfc18b92239d8944e6df0eaf1c1c3dd180 (patch) | |
tree | 2b2404402634a28cb07713752268f9d186be30f4 /target | |
parent | 164e488d3d26199b3f98e14588ad2fe1914e6b10 (diff) | |
download | master-187ad058-cfd870dfc18b92239d8944e6df0eaf1c1c3dd180.tar.gz master-187ad058-cfd870dfc18b92239d8944e6df0eaf1c1c3dd180.tar.bz2 master-187ad058-cfd870dfc18b92239d8944e6df0eaf1c1c3dd180.zip |
fix endianness issue with addpattern
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3018 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/utils/src/addpattern.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/target/utils/src/addpattern.c b/target/utils/src/addpattern.c index 9962a67920..5f49b921f6 100644 --- a/target/utils/src/addpattern.c +++ b/target/utils/src/addpattern.c @@ -66,7 +66,8 @@ struct code_header { /* from cyutils.h */ char fwvern[3]; char id[4]; /* U2ND */ char hw_ver; /* 0: for 4702, 1: for 4712 -- new in 2.04.3 */ - unsigned short flags; /* SUPPORT_ flags new for 3.37.2 (WRT54G v2.2 and WRT54GS v1.1) */ + char unused; + unsigned char flags[2]; /* SUPPORT_ flags new for 3.37.2 (WRT54G v2.2 and WRT54GS v1.1) */ unsigned char res2[10]; } ; @@ -132,14 +133,14 @@ int main(int argc, char **argv) break; case '2': /* new 54G v2.2 and 54GS v1.1 flags */ hdr->hw_ver = 1; - hdr->flags |= SUPPORT_4712_CHIP; - hdr->flags |= SUPPORT_INTEL_FLASH; - hdr->flags |= SUPPORT_5325E_SWITCH; + hdr->flags[0] |= SUPPORT_4712_CHIP; + hdr->flags[0] |= SUPPORT_INTEL_FLASH; + hdr->flags[0] |= SUPPORT_5325E_SWITCH; break; case '4': /* V4 firmware sets the flags to 0x1f */ hdr->hw_ver = 0; - hdr->flags = 0x1f; + hdr->flags[0] = 0x1f; break; default: |