TFS file system accessable through RTEMS ftp server

Ed Sutter esutter at
Tue Oct 11 14:30:09 UTC 2005

Yep, the hooks that I have for TFS with RTEMS don't include that.
TFS doesn't support a directory hierarchy, so the hookup would simply
map to TFS's ability to list the current set of stored files...

At the moment I don't have a target running RTEMS so I can't
really test this under RTEMS; however, here's the code that would
be used to do the list...

This simplest form would be tfsls() below, which just dumps all
files.  The tfsvls() after that, just includes some of the file
header information in the output.

     TFILE *tfp;

     tfp = (TFILE *)0;

     while((tfp = mon_tfsnext(tfp))) {
         mon_printf(" %s\n",TFS_NAME(tfp));

     int tot;
     char flags[16];
     TFILE *tfp;

     tot = 0;
     tfp = (TFILE *)0;

     mon_printf(" Name                     Size    Location  Flags  Info\n");
     while((tfp = mon_tfsnext(tfp))) {
         mon_printf(" %-20s  %7d  0x%08x  %-5s  %s\n",
             TFS_BASE(tfp),*flags != 0 ? flags: " ",TFS_INFO(tfp));

This help?

Jonas Moberg wrote:

> The mounted TFS file system i nicely visable in the IMFS root (at least from
> some ftp clients).
> However it seems like the TFS file system glue to RTEMS is not complete as
> one can not
> view the content of the TFS file system this way.
> What would be required to do that (implementing TFS opendir readdir
> functionality)?
> As we keep non-volatile configuration data in TFS, we would prefer to
> maintain that data
> using ftp remotely (reading and writing the files in TFS using for example
> ftp).
> Please any advice on this.
> Best Regards
> Jonas Moberg
> Solid Software AB

More information about the users mailing list