This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: CYGNUM_FILEIO_MTAB_EXTRA invalid at 0
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Tad <ecos_removethispart at ds3switch dot com>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Tue, 12 Jun 2007 22:03:31 +0200
- Subject: Re: CYGNUM_FILEIO_MTAB_EXTRA invalid at 0
- References: <466F05E8.2040904@ds3switch.com>
On Tue, Jun 12, 2007 at 12:45:28PM -0800, Tad wrote:
> Following line doesn't work if CYGNUM_FILEIO_MTAB_EXTRA is 0. Either
> ecosconfig or the init in this line needs to change.
>
> misc.cxx
> 116 cyg_mtab_entry cyg_mtab_extra[CYGNUM_FILEIO_MTAB_EXTRA]
> CYG_HAL_TABLE_EXTRA(mtab) = { { NULL } };
Please send discussion to the ecos-discuss list. ecos-patches is for
real patches.
Attached is the fix i committed to anoncvs.
Andrew
Index: io/fileio/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/ChangeLog,v
retrieving revision 1.65
diff -u -r1.65 ChangeLog
--- io/fileio/current/ChangeLog 27 Jan 2007 18:17:57 -0000 1.65
+++ io/fileio/current/ChangeLog 12 Jun 2007 20:01:43 -0000
@@ -1,3 +1,8 @@
+2007-06-12 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/misc.cxx (cyg_mtab_extra): Only create the array if it has more
+ than 0 entries.
+
2007-01-27 Andrew Lunn <andrew.lunn@ascom.ch>
* tests/fnmatch.c: Test case for fnmatch.
Index: io/fileio/current/src/misc.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/src/misc.cxx,v
retrieving revision 1.11
diff -u -r1.11 misc.cxx
--- io/fileio/current/src/misc.cxx 16 Feb 2006 18:46:06 -0000 1.11
+++ io/fileio/current/src/misc.cxx 12 Jun 2007 20:01:43 -0000
@@ -113,8 +113,9 @@
CYG_HAL_TABLE_BEGIN( cyg_mtab, mtab );
// Extra entries at end of mtab for dynamic mount points.
+#if CYGNUM_FILEIO_MTAB_EXTRA > 0
cyg_mtab_entry cyg_mtab_extra[CYGNUM_FILEIO_MTAB_EXTRA] CYG_HAL_TABLE_EXTRA(mtab) = { { NULL } };
-
+#endif
// End of mount table, set in the linker script.
__externC cyg_mtab_entry cyg_mtab_end;
CYG_HAL_TABLE_END( cyg_mtab_end, mtab );