[syslinux] port syslinux isohybrid perl script to C

H. Peter Anvin hpa at zytor.com
Thu Apr 29 14:33:58 PDT 2010


On 04/29/2010 01:29 PM, H. Peter Anvin wrote:
> On 04/29/2010 12:14 PM, P J P wrote:
>>    Hi,
>>
>> --- On Thu, 29/4/10, H. Peter Anvin <hpa at zytor.com> wrote:
>>> You need to fix your endianness problems, at the very least.
>>
>> I tried to fix the endianness problem, please have a look at the latest patch accessible at:
>>
>>  - http://pjp.dgplug.org/tools/syslinux-3.86-isohybrid.patch.4
>>  - https://fedorahosted.org/fedora-engineering-services/ticket/15
>>
>>
>> It does work on both types of machines now, I tested it on a ppc machine.
>>
>> (~ @ 13:05)$ ./isohybrid.pl output.iso.1 
>> (~ @ 13:05)$ ./isohybrid output.iso.2 
>> (~ @ 13:05)$ ./endian 
>> big endian
>> n: 04030201
>> Addr: 3220897608|3220897609|3220897610|3220897611|
>> Byte:          4|         3|         2|         1|
>> (~ @ 13:05)$ cmp output.iso output.iso.1 
>> output.iso output.iso.1 differ: byte 433, line 4
>> (~ @ 13:06)$ cmp output.iso output.iso.2 
>> output.iso output.iso.2 differ: byte 433, line 4
>>
> 
> What you should compare is output.iso.1 and output.iso.2, not compare to
> the original file.  I.e. does the C output match the Perl output?
> 

You're still stuffing a '*' byte completely pointlessly into the C
array.  The * marker is used as a separator in the Perl script, but that
doesn't work for a binary array, as in C.  Instead you have to rely on
the length of the data.

	-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