diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-02-25 21:28:50 +0100 |
---|---|---|
committer | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-02-25 21:42:54 +0100 |
commit | 1ea726f64026f8974887950e4911d19da5f36f57 (patch) | |
tree | aafdd196e08a9a3ae4c2096427e09a3739a485d5 /recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch | |
parent | 6338989af8aed24ab9228c78e2f68a4e8290075c (diff) | |
download | openembedded-1ea726f64026f8974887950e4911d19da5f36f57.tar.gz |
u-boot git: updated calamari SRCREV, add new functionality
Ths commit is for calamari (MPC8636DS) only.
It moves to the head of the mpc85xx git
I also added several patches.
These provide additional functionality w.r.t. expression handling,
As they are not calamari specific I've put them in the u-boot-git directory.
I did not want to apply them right away as I am not sure if they apply to all the various
SRCREVs that are build with this recipe and I did want to break someone else's u-boot.
The patches are also submitted upstream
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch')
-rw-r--r-- | recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch b/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch new file mode 100644 index 0000000000..1b423b9195 --- /dev/null +++ b/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch @@ -0,0 +1,40 @@ +Subject: [PATCH 2/2] cmd_itest.c: fix pointer dereferencing +Date: Mon, 22 Feb 2010 22:49:06 +0100 +Message-Id: <1266875346-17025-1-git-send-email-fransmeulenbroeks@gmail.com> +X-Mailer: git-send-email 1.6.4.2 + +fix pointer dereferencing +if the size is .b and .w an 8 or 16 bit access is done. + +Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> +--- + common/cmd_itest.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/common/cmd_itest.c b/common/cmd_itest.c +index 5b301bf..58c5e7b 100644 +--- a/common/cmd_itest.c ++++ b/common/cmd_itest.c +@@ -66,12 +66,17 @@ op_tbl_t op_table [] = { + + static long evalexp(char *s, int w) + { +- long l, *p; ++ long l = 0; ++ long *p; + + /* if the parameter starts with a * then assume is a pointer to the value we want */ + if (s[0] == '*') { + p = (long *)simple_strtoul(&s[1], NULL, 16); +- l = *p; ++ switch (w) { ++ case 1: return((long)(*(unsigned char *)p)); ++ case 2: return((long)(*(unsigned short *)p)); ++ case 4: return(*p); ++ } + } else { + l = simple_strtoul(s, NULL, 16); + } +-- +1.6.4.2 + |