search for: get_adv_size

Displaying 1 result from an estimated 1 matches for "get_adv_size".

2013 Sep 30
2
[PATCH v2] core: Check size of ldlinux.sys at building time.
...nge: +## [0](bootsector)[512](ldlinux.sys)[65536 - 2 * ADV_SIZE](2 copies of ADV)[65536] + +use File::stat; +use constant DEBUG => (1); + +# CWD is 'bios/core' when this script gets executed. +$file = '../../libinstaller/setadv.h'; +$target_id = '#define ADV_SIZE'; + +sub get_ADV_SIZE { + my $data, $line; + my $adv_size = -1; + + open $data, "<", $file or die "Cannot open $file\n"; + while ( $line = <$data> ) { + my $id, $value; + + chomp($line); + ($id, $value) = split('\t', $line); + + if ( index($id, $target_id) != -1 ) { +...