summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2010-09-17 13:10:36 +0200
committerWolfgang Denk <wd@denx.de>2010-09-19 19:29:52 +0200
commit23090dacd2806b71fe536a5f618f37afb23d5407 (patch)
tree1bd5027a82daab0d6fc0cec9399f858bd8f3ae88 /disk
parent4444b221f2682a3377eecfecdef66ddfa9355cf3 (diff)
disk/part.c: fix relocation fixup
Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'disk')
-rw-r--r--disk/part.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/disk/part.c b/disk/part.c
index 1806fe6e18f..2b63db6c75f 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -78,13 +78,20 @@ block_dev_desc_t *get_dev(char* ifname, int dev)
{
const struct block_drvr *drvr = block_drvr;
block_dev_desc_t* (*reloc_get_dev)(int dev);
+ char *name;
- while (drvr->name) {
+ name = drvr->name;
+#ifndef CONFIG_RELOC_FIXUP_WORKS
+ name += gd->reloc_off;
+#endif
+ while (name) {
+ name = drvr->name;
reloc_get_dev = drvr->get_dev;
#ifndef CONFIG_RELOC_FIXUP_WORKS
+ name += gd->reloc_off;
reloc_get_dev += gd->reloc_off;
#endif
- if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
+ if (strncmp(ifname, name, strlen(name)) == 0)
return reloc_get_dev(dev);
drvr++;
}