[syslinux] port syslinux isohybrid perl script to C

Geert Stappers stappers at stappers.nl
Sun May 2 19:26:21 PDT 2010


Op 20100502 om 11:20 schreef P J P:
>    Hi,
> 
> --- On Sat, 1/5/10, H. Peter Anvin <hpa at zytor.com> wrote:
> > Better yet would be to make hexdata a three-dimensional
> > array and do: 
> >     memcpyu(mbr, &hexdata[partok][hd0], MBRSIZE);
> 
> Please see -> http://pjp.dgplug.org/tools/syslinux-3.86-isohybrid.patch.6

I'm in doubt about crying or laughing   :-/

> Major changes:
> 
>   - get_hex_data(): removed.
>   - hexdata changed into a 3-dimensional array, so as to index as
>     hexdata[partok][hd0].
>   - Makefile & bin2Carray changed to write a 3-dimensional array to
>     hexdata.c

Then please provide a bin2Carray.pl that writes elements 
to a multi-dimensional hexdata array.
Get rid of ugly "repairs" like
+		if [ $$f = "../mbr/isohdpfx_c.bin" ]; then \
+			echo "  }," >> hexdata.c; \
+			echo -e "\n  {" >> hexdata.c; \
+		fi; \


>   - lendian_short() and lendian_int() changed to be more intuitive. 



Geert Stappers
Stuck in the space between sysadmin and programmer




More information about the Syslinux mailing list