FreeBSD/sys/contrib/dev/acpica/compiler/aslrestype2s.c
/*******************************************************************************
 *
 * FUNCTION:    RsGetBufferDataLength
 *
 * PARAMETERS:  InitializerOp       - Current parse op, start of the resource
 *                                    descriptor
 *
 * RETURN:      Length of the data buffer
 *
 * DESCRIPTION: Get the length of a RawDataBuffer, used for vendor data.
 *
 ******************************************************************************/
RsGetBufferDataLength
PARAMETERS:  InitializerOp       - Current parse op, start of the resource
descriptor

Length of the data buffer

Get the length of a RawDataBuffer, used for vendor data.
RsGetBufferDataLength PARAMETERS : InitializerOp - Current parse op start of the resource descriptor Length of the data buffer Get the length of a RawDataBuffer used for vendor data .
static UINT16
RsGetBufferDataLength (
    ACPI_PARSE_OBJECT       *InitializerOp)
{
    UINT16                  ExtraDataSize = 0;
    ACPI_PARSE_OBJECT       *DataList;
    while (InitializerOp)
    {
        if (InitializerOp->Asl.ParseOpcode == PARSEOP_DATABUFFER)
        {
            DataList = InitializerOp->Asl.Child;
            DataList = ASL_GET_PEER_NODE (DataList);
            while (DataList)
            {
                ExtraDataSize++;
                DataList = ASL_GET_PEER_NODE (DataList);
            }
            return (ExtraDataSize);
        }
        InitializerOp = ASL_GET_PEER_NODE (InitializerOp);
    }
    return (ExtraDataSize);
}
static UINT16 RsGetBufferDataLength ( ACPI_PARSE_OBJECT * InitializerOp ) { UINT16 ExtraDataSize = 0 ; ACPI_PARSE_OBJECT * DataList ; while ( InitializerOp ) { if ( InitializerOp -> Asl . ParseOpcode == PARSEOP_DATABUFFER ) { DataList = InitializerOp -> Asl . Child ; DataList = ASL_GET_PEER_NODE ( DataList ) ; while ( DataList ) { ExtraDataSize ++ ; DataList = ASL_GET_PEER_NODE ( DataList ) ; } return ( ExtraDataSize ) ; } InitializerOp = ASL_GET_PEER_NODE ( InitializerOp ) ; } return ( ExtraDataSize ) ; }
FUNCTION:    RsGetBufferDataLength
 PARAMETERS:  InitializerOp       - Current parse op, start of the resource
                                    descriptor
FUNCTION : RsGetBufferDataLength PARAMETERS : InitializerOp - Current parse op start of the resource descriptor
/* Find the byte-initializer list */ /* First child is the optional length (ignore it here) */ /* Count the data items (each one is a byte of data) */