Commit 499e813
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-696ce0be7e321 parent 40a02e5 commit 499e813
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1625 | 1625 | | |
1626 | 1626 | | |
1627 | 1627 | | |
1628 | | - | |
| 1628 | + | |
1629 | 1629 | | |
1630 | 1630 | | |
1631 | 1631 | | |
| |||
5295 | 5295 | | |
5296 | 5296 | | |
5297 | 5297 | | |
5298 | | - | |
| 5298 | + | |
5299 | 5299 | | |
5300 | 5300 | | |
5301 | 5301 | | |
| |||
0 commit comments