* [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable()
@ 2011-10-13 16:07 Daniel Schwierzeck
2011-10-14 12:08 ` [U-Boot] [PATCH v2] " Daniel Schwierzeck
2011-10-15 20:19 ` [U-Boot] [PATCH] " Wolfgang Denk
0 siblings, 2 replies; 7+ messages in thread
From: Daniel Schwierzeck @ 2011-10-13 16:07 UTC (permalink / raw)
To: u-boot
The command auto-completion does not work on architectures relying
on CONFIG_NEEDS_MANUAL_RELOC like MIPS. Cause is the missing function
pointer fixup for cmd_tbl_t::complete function in fixup_cmdtable().
This patch adds the missing pointer fixup in case of CONFIG_AUTO_COMPLETE
is defined.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
common/command.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/common/command.c b/common/command.c
index ddaed68..ed931d7 100644
--- a/common/command.c
+++ b/common/command.c
@@ -475,6 +475,12 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
cmdtp->help = (char *)addr;
}
#endif
+#ifdef CONFIG_AUTO_COMPLETE
+ if (cmdtp->complete) {
+ addr = (ulong)(cmdtp->complete) + gd->reloc_off;
+ cmdtp->complete = (char *)addr;
+ }
+#endif
cmdtp++;
}
}
--
1.7.7
^ permalink raw reply related [flat|nested] 7+ messages in thread* [U-Boot] [PATCH v2] common: fix missing function pointer relocation in fixup_cmdtable()
2011-10-13 16:07 [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable() Daniel Schwierzeck
@ 2011-10-14 12:08 ` Daniel Schwierzeck
2011-10-18 21:12 ` [U-Boot] [PATCH v3] " Daniel Schwierzeck
2011-10-15 20:19 ` [U-Boot] [PATCH] " Wolfgang Denk
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Schwierzeck @ 2011-10-14 12:08 UTC (permalink / raw)
To: u-boot
The command auto-completion does not work on architectures relying
on CONFIG_NEEDS_MANUAL_RELOC like MIPS. Cause is the missing function
pointer fixup for cmd_tbl_t::complete function in fixup_cmdtable().
This patch adds the missing pointer fixup in case of CONFIG_AUTO_COMPLETE
is defined.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
changes for v2:
use correct type cast
One checkpatch.pl false positive:
WARNING: line over 80 characters
#31: FILE: common/command.c:482:
+ (int (*)(int, char * const [], char, int, char * []))addr;
common/command.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/command.c b/common/command.c
index ddaed68..8023576 100644
--- a/common/command.c
+++ b/common/command.c
@@ -475,6 +475,13 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
cmdtp->help = (char *)addr;
}
#endif
+#ifdef CONFIG_AUTO_COMPLETE
+ if (cmdtp->complete) {
+ addr = (ulong)(cmdtp->complete) + gd->reloc_off;
+ cmdtp->complete =
+ (int (*)(int, char * const [], char, int, char * []))addr;
+ }
+#endif
cmdtp++;
}
}
--
1.7.7
^ permalink raw reply related [flat|nested] 7+ messages in thread* [U-Boot] [PATCH v3] common: fix missing function pointer relocation in fixup_cmdtable()
2011-10-14 12:08 ` [U-Boot] [PATCH v2] " Daniel Schwierzeck
@ 2011-10-18 21:12 ` Daniel Schwierzeck
2011-10-23 20:22 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Schwierzeck @ 2011-10-18 21:12 UTC (permalink / raw)
To: u-boot
In commit fa28bd2eef588ec2048ccafedb2b384d5a355858 patch v1 was applied
instead of v2. This is an incremental patch to update that commit
to version 2.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
changes for v2:
use correct type cast
changes for v3:
rebased against current master
incremental patch from v1 to v2
one checkpatch.pl warning:
WARNING: line over 80 characters
#38: FILE: common/command.c:483:
+ (int (*)(int, char * const [], char, int, char * []))addr;
common/command.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/command.c b/common/command.c
index 2c0bf53..c5cecd3 100644
--- a/common/command.c
+++ b/common/command.c
@@ -479,7 +479,8 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
#ifdef CONFIG_AUTO_COMPLETE
if (cmdtp->complete) {
addr = (ulong)(cmdtp->complete) + gd->reloc_off;
- cmdtp->complete = (char *)addr;
+ cmdtp->complete =
+ (int (*)(int, char * const [], char, int, char * []))addr;
}
#endif
cmdtp++;
--
1.7.7
^ permalink raw reply related [flat|nested] 7+ messages in thread* [U-Boot] [PATCH v3] common: fix missing function pointer relocation in fixup_cmdtable()
2011-10-18 21:12 ` [U-Boot] [PATCH v3] " Daniel Schwierzeck
@ 2011-10-23 20:22 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2011-10-23 20:22 UTC (permalink / raw)
To: u-boot
Dear Daniel Schwierzeck,
In message <1318972342-3801-1-git-send-email-daniel.schwierzeck@googlemail.com> you wrote:
> In commit fa28bd2eef588ec2048ccafedb2b384d5a355858 patch v1 was applied
> instead of v2. This is an incremental patch to update that commit
> to version 2.
>
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> ---
> changes for v2:
> use correct type cast
>
> changes for v3:
> rebased against current master
> incremental patch from v1 to v2
>
> one checkpatch.pl warning:
> WARNING: line over 80 characters
> #38: FILE: common/command.c:483:
> + (int (*)(int, char * const [], char, int, char * []))addr;
>
> common/command.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The people of Gideon have always believed that life is sacred. That
the love of life is the greatest gift ... We are incapable of
destroying or interfering with the creation of that which we love so
deeply -- life in every form from fetus to developed being.
-- Hodin of Gideon, "The Mark of Gideon", stardate 5423.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable()
2011-10-13 16:07 [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable() Daniel Schwierzeck
2011-10-14 12:08 ` [U-Boot] [PATCH v2] " Daniel Schwierzeck
@ 2011-10-15 20:19 ` Wolfgang Denk
2011-10-18 12:37 ` Daniel Schwierzeck
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2011-10-15 20:19 UTC (permalink / raw)
To: u-boot
Dear Daniel Schwierzeck,
In message <1318522059-16182-1-git-send-email-daniel.schwierzeck@googlemail.com> you wrote:
> The command auto-completion does not work on architectures relying
> on CONFIG_NEEDS_MANUAL_RELOC like MIPS. Cause is the missing function
> pointer fixup for cmd_tbl_t::complete function in fixup_cmdtable().
>
> This patch adds the missing pointer fixup in case of CONFIG_AUTO_COMPLETE
> is defined.
>
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> ---
> common/command.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It is easier to port a shell than a shell script." - Larry Wall
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable()
2011-10-15 20:19 ` [U-Boot] [PATCH] " Wolfgang Denk
@ 2011-10-18 12:37 ` Daniel Schwierzeck
2011-10-18 20:20 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Schwierzeck @ 2011-10-18 12:37 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
On Sat, Oct 15, 2011 at 10:19 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Daniel Schwierzeck,
>
> In message <1318522059-16182-1-git-send-email-daniel.schwierzeck@googlemail.com> you wrote:
>> The command auto-completion does not work on architectures relying
...
>
> Applied, thanks.
you have missed v2 of the patch.
See also http://patchwork.ozlabs.org/patch/119777/
Maybe because I forgot to cc you in the second mail, sorry for that.
Shall I send an updated patch?
Best regards,
Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable()
2011-10-18 12:37 ` Daniel Schwierzeck
@ 2011-10-18 20:20 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2011-10-18 20:20 UTC (permalink / raw)
To: u-boot
Dear Daniel Schwierzeck,
In message <CACUy__VcnaeQMcTzv1KAK7LDdBfqBj=vXYWpK081M3AW2HQ3tg@mail.gmail.com> you wrote:
>
> you have missed v2 of the patch.
> See also http://patchwork.ozlabs.org/patch/119777/
>
> Maybe because I forgot to cc you in the second mail, sorry for that.
No, this was my fault. I have to be sorry.
> Shall I send an updated patch?
Yes, please (an incremental one against current master).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When the ax entered the forest, the trees said, "The handle is one of
us!" -- Turkish proverb
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-23 20:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 16:07 [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable() Daniel Schwierzeck
2011-10-14 12:08 ` [U-Boot] [PATCH v2] " Daniel Schwierzeck
2011-10-18 21:12 ` [U-Boot] [PATCH v3] " Daniel Schwierzeck
2011-10-23 20:22 ` Wolfgang Denk
2011-10-15 20:19 ` [U-Boot] [PATCH] " Wolfgang Denk
2011-10-18 12:37 ` Daniel Schwierzeck
2011-10-18 20:20 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.