/* *  RSD PTR is the only "table" without a header */ 
/* RSD PTR is the only "table" without a header */  
acpi_get_table (	acpi_table_type                 table_type,	u32                             instance,	struct acpi_buffer              *ret_buffer){	struct acpi_table_header        *tbl_ptr;	acpi_status                     status;	acpi_size                       table_length;	ACPI_FUNCTION_TRACE ("acpi_get_table");	/* Parameter validation */	if (instance == 0) {		return_ACPI_STATUS (AE_BAD_PARAMETER);	}	status = acpi_ut_validate_buffer (ret_buffer);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	/* Check the table type and instance */	if ((table_type > ACPI_TABLE_MAX)   ||		(ACPI_IS_SINGLE_TABLE (acpi_gbl_table_data[table_type].flags) &&		 instance > 1)) {		return_ACPI_STATUS (AE_BAD_PARAMETER);	}	/* Get a pointer to the entire table */	status = acpi_tb_get_table_ptr (table_type, instance, &tbl_ptr);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	/*	 * acpi_tb_get_table_ptr will return a NULL pointer if the	 * table is not loaded.	 */	if (tbl_ptr == NULL) {		return_ACPI_STATUS (AE_NOT_EXIST);	}	/* Get the table length */	if (table_type == ACPI_TABLE_RSDP) {		/*		 *  RSD PTR is the only "table" without a header		 */		table_length = sizeof (struct rsdp_descriptor);	}	else {		table_length = (acpi_size) tbl_ptr->length;	}	/* Validate/Allocate/Clear caller buffer */	status = acpi_ut_initialize_buffer (ret_buffer, table_length);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	/* Copy the table to the buffer */	ACPI_MEMCPY ((void *) ret_buffer->pointer, (void *) tbl_ptr, table_length);	return_ACPI_STATUS (AE_OK);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/44f6c01242da4e162f28d8e1216a8c7a91174605/tbxface.c/buggy/drivers/acpi/tables/tbxface.c