Use yylloc instead of yyloc

Lukasz Wojcik zbr at semihalf.com
Sat Nov 14 00:10:46 EST 2009


Jon Loeliger wrote:
>> Jon, fix for the typo the FreeBSD folks noticed.  Please apply.
>>
>> yylloc is the correct way to get token positioning information.  yyloc
>> is a bison internal variable that only works by accident.
>>
>> Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
>>
>> Index: dtc/dtc-parser.y
>> ===================================================================
>> --- dtc.orig/dtc-parser.y	2009-11-12 11:11:15.000000000 +1100
>> +++ dtc/dtc-parser.y	2009-11-12 11:11:20.000000000 +1100
>> @@ -175,7 +175,7 @@ propdata:
>>  
>>  			if ($6 != 0)
>>  				if (fseek(file->file, $6, SEEK_SET) != 0)
>> -					srcpos_error(&yyloc,
>> +					srcpos_error(&yylloc,
>>  						     "Couldn't seek to offset %
>> llu in \"%s\": %s",
>>  						     (unsigned long long)$6,
>>  						     $4.val,
>>
>>
>>     
>
> Applied.
>
> jdl
>   
Thanks a lot for your quick fix. I have one observation to share though:
After applying newest fix, i did the tests around incbin feature. I have
modified original incbin.dts (from ./tests/ subdir) as follows :

---diff---
5c5
<     incbin-partial = /incbin/("incbin.bin", 0xfffffffffffffff, 
0xffffffffffffffff);
---
 >     incbin-partial = /incbin/("incbin.bin", 13, 17);

---eofdiff---

Trying to run following command:

./dtc -O dtb -o incbin.dtb -b 0 -p 1024 incbin.dts

..produces output:

Error: incbin.dts 5:1 - 1:1 Couldn't seek to offset 1152921504606846975 
in "incbin.bin": Invalid argument

I'm just wondering where exactly does location 5:1 - 1:1 point. It seems to
be a bit unclear. Wouldn't it be enough to just specify line number ? Thanks
again.

Lukasz.



More information about the devicetree-discuss mailing list