acpi_status acpi_ut_get_element_length ( u8 object_type, union acpi_operand_object *source_object, union acpi_generic_state *state, void *context) { acpi_status status = AE_OK; struct acpi_pkg_info *info = (struct acpi_pkg_info *) context; acpi_size object_space; switch (object_type) { case ACPI_COPY_TYPE_SIMPLE: /* * Simple object - just get the size (Null object/entry is handled * here also) and sum it into the running package length */ status = acpi_ut_get_simple_object_size (source_object, &object_space); if (ACPI_FAILURE (status)) { return (status); } info->length += object_space; break; case ACPI_COPY_TYPE_PACKAGE: /* Package object - nothing much to do here, let the walk handle it */ info->num_packages++; state->pkg.this_target_obj = NULL; break; default: /* No other types allowed */ return (AE_BAD_PARAMETER); } return (status); }
acpi_status acpi_ut_get_object_size(union acpi_operand_object *internal_object, acpi_size * obj_length) { acpi_status status; ACPI_FUNCTION_ENTRY(); if ((ACPI_GET_DESCRIPTOR_TYPE(internal_object) == ACPI_DESC_TYPE_OPERAND) && (internal_object->common.type == ACPI_TYPE_PACKAGE)) { status = acpi_ut_get_package_object_size(internal_object, obj_length); } else { status = acpi_ut_get_simple_object_size(internal_object, obj_length); } return (status); }
static acpi_status acpi_ut_get_element_length(u8 object_type, union acpi_operand_object *source_object, union acpi_generic_state *state, void *context) { acpi_status status = AE_OK; struct acpi_pkg_info *info = (struct acpi_pkg_info *)context; acpi_size object_space; switch (object_type) { case ACPI_COPY_TYPE_SIMPLE: status = acpi_ut_get_simple_object_size(source_object, &object_space); if (ACPI_FAILURE(status)) { return (status); } info->length += object_space; break; case ACPI_COPY_TYPE_PACKAGE: info->num_packages++; state->pkg.this_target_obj = NULL; break; default: return (AE_BAD_PARAMETER); } return (status); }
acpi_status acpi_ut_get_object_size( acpi_operand_object *internal_object, u32 *obj_length) { acpi_status status; FUNCTION_ENTRY (); if ((VALID_DESCRIPTOR_TYPE (internal_object, ACPI_DESC_TYPE_INTERNAL)) && (IS_THIS_OBJECT_TYPE (internal_object, ACPI_TYPE_PACKAGE))) { status = acpi_ut_get_package_object_size (internal_object, obj_length); } else { status = acpi_ut_get_simple_object_size (internal_object, obj_length); } return (status); }