[syslinux] isohybrid: seek error - 6: Invalid argument

H. Peter Anvin hpa at zytor.com
Mon Sep 13 23:00:17 PDT 2010


On 09/13/2010 03:34 PM, Gerardo Exequiel Pozzi wrote:
>  On 09/13/2010 12:55 PM, H. Peter Anvin wrote:
>> On 09/13/2010 12:01 AM, P J P wrote:
>>> --- On Mon, 13/9/10, H. Peter Anvin<hpa at zytor.com>  wrote:
>>>> By the way, using seek + write for this is pretty broken.  A much
>>>> better
>>>> option is to use ftruncate().
>>>
>>> Cool...I'll send an update.
>>>
>> Use ftruncate(), not truncate().
>>
> Based on patch from P J P, using ftruncate() + fileno() and fixing the
> argument should be filesize+padding.
> I guess is ok, works fine.

Yes, although the should be an fsync() before the ftruncate, just in
case there is anything still in the write buffers.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list