Author :
Laurent Vivier
Date :
2015-11-06 15:06:25
Hash :499e8134 Message :toke: fix line parsing on big-endian
Trying to compile openbios on Fedora 22 ppc64, I had the following error:
toke -o QEMU,VGA.bin ~/openbios/drivers/vga.fs
...
Tokenizing ~/openbios/drivers/vga.fs Binary output to QEMU,VGA.bin
Warning: File ~/openbios/drivers/vga.fs, Line 1. Unterminated comment
Nothing Tokenized. 1 Warning.
This can be reproduced with the fcode-utils examples.
"toke" is parsing the comment line until it finds a '\n'.
The '\n' is stored as a char in a field of an union,
but it is read as a long. It works well on little endian but
not on big endian.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/fcode-utils-devel@1354 f158a5a8-5612-0410-a976-696ce0be7e32