public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Overriding tables ... (was: Compaq 1720US, 2.4.18, acpi-7,24 - Help)
@ 2002-08-13 21:23 Huw Hawkins
  0 siblings, 0 replies; only message in thread
From: Huw Hawkins @ 2002-08-13 21:23 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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 function
acpi_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_status
acpi_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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-13 21:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-13 21:23 Overriding tables ... (was: Compaq 1720US, 2.4.18, acpi-7,24 - Help) Huw Hawkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox