(fd, buf + total, nbytes - total);</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;        <span class="keywordflow">if</span> (wsize &lt;= 0) {</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;            <span class="keywordflow">if</span> (errno == EAGAIN || errno == EINPROGRESS) {</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;                <span class="comment">// possible with non-block io</span></div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;                usleep(0);</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;                <span class="keywordflow">continue</span>;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;            }</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;            <span class="keywordflow">break</span>;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;        }</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;        total += wsize;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;    }</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;    <span class="keywordflow">if</span> (total &gt; 0)</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;        <span class="keywordflow">return</span> total;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (errno == ETIMEDOUT)</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;        <span class="keywordflow">return</span> 0;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;    <span class="keywordflow">return</span> -0;</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;}</div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;<span class="comment"></span></div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;<span class="comment">/**</span></div> <div class="line"><a name="l00000"></a><span class="lineno">  000</span>&#000;<span class="comment"> * 