Can't write to tarfs-extracted file until re-open
nick.withers at anu.edu.au
Fri Feb 20 03:59:38 UTC 2015
I'm doing something that may be a little dodgy to begin with, but used
to work (pre the IMFS changes of the 2015-02-12, I believe; I'll figure
it out if anyone would like, though. I'm currently at RTEMS git
I have a directory with a file  tar'ed up and bin2c'ed into my
application. When I first open and try to write to it, it fails with
ENOSYS (calling into rtems_filesystem_default_write() through
If I then close it, re-open and retry the write, it succeeds (this time
hitting memfile_write through IMFS_memfile_handlers). A small test case
is attached (build with e.g., "gmake RTEMS_CPU_ARCH=powerpc BSP=psim").
First things first... Is opening a file created with tarfs (from tar
data in ROM) and writing to it kosher?
I *think* it is, and that it's supposed to be migrated from an IMFS
linear node into an IMFS memory node when written to [or opened for
writing with existing data?] (see e.g., IMFS_linfile_open())...?
Assuming I'm not being dodgy, I s'pose I'm hoping someone with RTEMS
file-system internals / IMFS knowledge's gonna jump up and say "Ah, I
know what that'll be!", as I haven't been able to figure it out so far
and I'd appreciate any help :-)
Cheers all - have a good weekend!
 The reason being that I want to symlink to the file from another
location within the same tar'ed directories (the web server root) and
bin2c doesn't seem like a symlink to a non-existent file
Embedded Systems Programmer
Department of Nuclear Physics, Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2585 bytes
Desc: not available
More information about the users