<div dir="ltr">Hi<div><br></div><div>I was porting some code from Linux to RTEMS. It doesn't use stdin/out, </div><div>error directly but does all debug IO to a configured file. Most of the time</div><div>when running on Linux, the device is /dev/stderr. For the RTEMS port,</div><div>I added link(/dev/console, /dev/stderr) to the init task and that worked.</div><div>But the application uses fopen(name, "w") to open the logging file.</div><div>This works on Linux. On RTEMS, this failed because "w" implies </div><div>ftruncate() and that returned -1. </div><div><br></div><div>I got around this by changing the logging helper to use fopen(name, "a").</div><div><br></div><div>I haven't done a POSIX deep dive and consulted with my POSIX contacts</div><div>yet for a strict POSIX ruling but I think we probably want the "w" to work</div><div>on RTEMS if it works on Lnux.</div><div><br></div><div>I can put together a test case but I would like to settle on the accepted </div><div>behavior first.</div><div><br></div><div>--joel</div></div>