bf3fe05dfb
This needs some more testing before it's on by default. If the card is otherwise functioning, these messages may be confusing to the user. If the card is not functioning, the driver can be reloaded with debug to check for this condition. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9205 a0bf4364-ded3-4de4-8d8a-66a801d63aff
52 lines
1.3 KiB
PHP
Executable File
52 lines
1.3 KiB
PHP
Executable File
#!/usr/bin/php
|
|
|
|
<?php
|
|
/*
|
|
* Written by Jared Smith and Kevin P. Fleming
|
|
*
|
|
* Copyright (C) 2006, Jared Smith and Digium, Inc.
|
|
*
|
|
*/
|
|
|
|
# create an array of all the different prefixes you want to match on,
|
|
# as Perl-compatible regular expressions
|
|
# (yes, this is a stupid example, as the second one is just a simplified
|
|
# version of the first, but it's just an example)
|
|
$prefixes = array('\.text\.Oct');
|
|
|
|
$fp = fopen('test.map','r');
|
|
|
|
while (!feof($fp))
|
|
{
|
|
# Loop until we find the top of section we want
|
|
while ($line = fgets($fp))
|
|
{
|
|
if (preg_match('/Discarded input sections/i',$line))
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
# Now loop until we find the next section
|
|
while ($line = fgets($fp))
|
|
{
|
|
if (preg_match('/Memory Configuration/i',$line))
|
|
{
|
|
# we found it!
|
|
break;
|
|
}
|
|
foreach ($prefixes as $prefix)
|
|
{
|
|
if (preg_match("/$prefix/i",$line))
|
|
{
|
|
preg_match("/Oct.*/", $line, $matches);
|
|
$line2 = fgets($fp);
|
|
echo "#define SKIP_".$matches[0]." 1\n";
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fclose($fp);
|
|
?>
|