http://bugzilla.kernel.org/show_bug.cgi?id=10686





------- Comment #19 from [EMAIL PROTECTED]  2008-09-10 10:28 -------
FYI, here is the relevant section from the ACPICA programmer reference:

4.2.6.2 Output Buffer
An output buffer is defined to be a buffer that is filled with data by an ACPI
interface before it is returned to the caller. When the ACPI_BUFFER structure
is used as an output buffer the caller must always initialize the structure by
either 
1.      Placing a value in the Length field that indicates the maximum size of
the buffer that is pointed to by the Pointer field. The length is used by the
ACPI interface to ensure that there is sufficient user provided space for the
return value. 
2.      Initializing the Length field to ACPI_ALLOCATE_BUFFER to cause the ACPI
subsystem to allocate a buffer.
If a buffer that was passed in by the caller is too small, the ACPI interfaces
that require output buffers will indicate the failure by returning the error
code AE_BUFFER_OVERFLOW. The interfaces will never attempt to put more data
into the caller’s buffer than is specified by the Length field of the
ACPI_BUFFER structure (unless ACPI_ALLOCATE_BUFFER is used). The caller may
recover from this failure by examining the Length field of the ACPI_BUFFER
structure. The interface will place the required length in this field in the
event that the buffer was too small.
During normal operation, the ACPI interface will copy data into the buffer. It
will indicate to the caller the length of data in the buffer by setting the
Length field of the ACPI_BUFFER to the actual number of bytes placed in the
buffer.
Therefore, the Length field is both an input and output parameter. On input, it
indicates either the size of the buffer or an indication to the ACPI subsystem
to allocate a return buffer on behalf of the caller. On output, it either
indicates the actual amount of data that was placed in the buffer (if the
buffer was large enough), or it indicates the buffer size that is required (if
the buffer was too small) and the exception is set to AE_BUFFER_OVERFLOW.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to