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

H. Peter Anvin hpa at zytor.com
Wed Aug 28 12:13:00 PDT 2013


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




More information about the Syslinux mailing list