Overriding tables ... (was: Compaq 1720US, 2.4.18, acpi-7,24 - Help)
This was the point of my earlier post (Patching tables osl.c doesn't work as advertised ... ).
As far as I can see, the propper place for putting patches to override
tables would be in tbget.c since appears to be a function (acpi_tb_table_override) written with hooks for exactly this purpose.
___HOWEVER___
this function will not work, since the functionacpi_os_table_override(&old_table, &new_table) in fact is not written to do what the documentation in tbget.c suggests. To make this happen I would suggest something along these lines.
------------------------------------------------------------------------
/* ********************************************************************
*
* FUNCTION: acpi_os_table_override
*
* PARAMETERS: existing_table - Pointer to the existing table header
* new_table - pointer to pointer to new table header
*
* RETURN : AE_OK (or possibly at a later date error codes?)
*
* DESCRIPTION : will examine the header and decide whether to override
* a table with a new table. Returning either a pointer
* to the new table if it is a valid substitution or NULL
* otherwise
* ********************************************************************/
acpi_statusacpi_os_table_override (acpi_table_header *existing_table, acpi_table_header **new_table)
{
if (!existing_table || !new_table)
return AE_BAD_PARAMETER;
if(strncmp(existing_table->signature,*new_table->signature,sizeof(XSDT_SIG)-1)
*new_table = NULL ;
return AE_OK;
}-------------------------------------------------------------------------
On a related note, the whole of the osl.c file needs documentation, to
aid further efforts at development.
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31