This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CYGNUM_FILEIO_MTAB_EXTRA invalid at 0


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 );

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]