<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 65: DOS errors need to be mapped onto POSIX errors</title><link href="https://sourceforge.net/p/specos/tickets/65/" rel="alternate"/><link href="https://sourceforge.net/p/specos/tickets/65/feed.atom" rel="self"/><id>https://sourceforge.net/p/specos/tickets/65/</id><updated>2015-03-16T15:33:02.256000Z</updated><subtitle>Recent changes to 65: DOS errors need to be mapped onto POSIX errors</subtitle><entry><title>#65 DOS errors need to be mapped onto POSIX errors</title><link href="https://sourceforge.net/p/specos/tickets/65/?limit=25#cc5e" rel="alternate"/><published>2015-03-16T15:33:02.256000Z</published><updated>2015-03-16T15:33:02.256000Z</updated><author><name>Brian Ruthven</name><uri>https://sourceforge.net/u/u6c87/</uri></author><id>https://sourceforge.netff88f7ea8395b8d48e1ca0fc89edf5c9e4da86e0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This currently breaks t_file01 test case.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>DOS errors need to be mapped onto POSIX errors</title><link href="https://sourceforge.net/p/specos/tickets/65/" rel="alternate"/><published>2015-03-16T15:00:25.821000Z</published><updated>2015-03-16T15:00:25.821000Z</updated><author><name>Brian Ruthven</name><uri>https://sourceforge.net/u/u6c87/</uri></author><id>https://sourceforge.netd5ae99dbcc5081259f35d5d01e26e9e651de165b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Building a test-suite for file handling calls has exposed that syscalls such as open() cannot return ENOENT. The DOS error return is passed back to userland, resulting in constructs like this not behaving as expected:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;fd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;FILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;O_RDONLY&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errno&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;ENOENT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Expected outcome&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;"Expected outcome" will never be printed as open() returns an errno of 87, which is the +3DOS error "File not found". This, and others, should be mapped to standard POSIX errno values. This particular one is an easy one, as it maps cleanly.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>