This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot: Fix FREEMEMLO expansion.
- From: David Vrabel <dvrabel at arcom dot com>
- To: eCos Patches <ecos-patches at ecos dot sourceware dot org>
- Date: Wed, 04 May 2005 14:54:43 +0100
- Subject: RedBoot: Fix FREEMEMLO expansion.
Hi,
The recent change to RedBoot's src/alias.c broke the expansion of the
FREEMEMLO and FREEMEMHI aliases. %p outputs a leading '0x' whereas %x
does not.
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
%status
pending
%patch
Index: ecos-working/packages/redboot/current/ChangeLog
===================================================================
--- ecos-working.orig/packages/redboot/current/ChangeLog 2005-05-04 11:39:42.000000000 +0100
+++ ecos-working/packages/redboot/current/ChangeLog 2005-05-04 14:46:19.000000000 +0100
@@ -1,3 +1,8 @@
+2005-05-04 David Vrabel <dvrabel@arcom.com>
+
+ * src/alias.c (lookup_alias): The expansion of FREEMEMLO and
+ FREEMEMHI needs a leading '0x' so they're recognized as hex.
+
2005-04-21 David Vrabel <dvrabel@arcom.com>
* src/main.c (cyg_start): Use the workspace memory section
Index: ecos-working/packages/redboot/current/src/alias.c
===================================================================
--- ecos-working.orig/packages/redboot/current/src/alias.c 2005-05-04 14:42:31.000000000 +0100
+++ ecos-working/packages/redboot/current/src/alias.c 2005-05-04 14:43:08.000000000 +0100
@@ -69,10 +69,10 @@
lookup_alias(char *alias, char *alias_buf)
{
if (0 == strcasecmp("FREEMEMLO", alias)) {
- diag_sprintf(alias_buf,"%x", ((CYG_ADDRWORD)mem_segments[0].start + 0x03ff) & ~0x03ff);
+ diag_sprintf(alias_buf,"0x%x", ((CYG_ADDRWORD)mem_segments[0].start + 0x03ff) & ~0x03ff);
return alias_buf;
} else if (0 == strcasecmp("FREEMEMHI", alias)) {
- diag_sprintf(alias_buf,"%x", ((CYG_ADDRWORD)mem_segments[0].end) & ~0x03ff);
+ diag_sprintf(alias_buf,"0x%x", ((CYG_ADDRWORD)mem_segments[0].end) & ~0x03ff);
return alias_buf;
}