[syslinux] [PATCH] tftp-hpa: add error check for disk filled up

Rongqing Li rongqing.li at windriver.com
Tue Sep 3 00:02:12 PDT 2013



On 08/29/2013 03:13 AM, H. Peter Anvin wrote:
> On 08/21/2013 06:00 PM, rongqing.li at windriver.com wrote:
>> From: "Roy.Li" <rongqing.li at windriver.com>
>>
>> Add error check when the write-buffer is finally flushed to the file,
>> the caller can detect if the disk filled up (or had an i/o error) and
>> return a NOSAPCE nak to the other side.
>>
>> Signed-off-by: Ming Liu <ming.liu at windriver.com>
>> Signed-off-by: Roy.Li <rongqing.li at windriver.com>
>
> Don't mix stdio and raw I/O this way.
>
> The right thing to do is either to use fflush() and ferror() to detect
> an error condition, or consistently use raw I/O.  I would prefer the former.
>
> 	-hpa
>

Could we check putc return value directly?

-Roy


>
>
>

-- 
Best Reagrds,
Roy | RongQing Li


More information about the Syslinux mailing list