public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Huw Hawkins <hrhawk-JGs/UdohzUI@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Overriding tables ... (was: Compaq 1720US, 2.4.18, acpi-7,24 - Help)
Date: 13 Aug 2002 23:23:17 +0200	[thread overview]
Message-ID: <1029273798.1080.21.camel@U414> (raw)

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

                 reply	other threads:[~2002-08-13 21:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1029273798.1080.21.camel@U414 \
    --to=hrhawk-jgs/udohzui@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox