/******************************************************************************* * * FUNCTION: acpi_ns_get_external_pathname * * PARAMETERS: node - Namespace node whose pathname is needed * * RETURN: Pointer to storage containing the fully qualified name of * the node, In external format (name segments separated by path * separators.) * * DESCRIPTION: Used to obtain the full pathname to a namespace node, usually * for error and debug statements. *
******************************************************************************/ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
{ char *name_buffer;
/******************************************************************************* * * FUNCTION: acpi_ns_get_pathname_length * * PARAMETERS: node - Namespace node * * RETURN: Length of path, including prefix * * DESCRIPTION: Get the length of the pathname string for this node *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_ns_handle_to_name * * PARAMETERS: target_handle - Handle of named object whose name is * to be found * buffer - Where the name is returned * * RETURN: Status, Buffer is filled with name if status is AE_OK * * DESCRIPTION: Build and return a full namespace name *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_ns_handle_to_pathname * * PARAMETERS: target_handle - Handle of named object whose name is * to be found * buffer - Where the pathname is returned * no_trailing - Remove trailing '_' for each name * segment * * RETURN: Status, Buffer is filled with pathname if status is AE_OK * * DESCRIPTION: Build and return a full namespace pathname *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_ns_build_normalized_path * * PARAMETERS: node - Namespace node * full_path - Where the path name is returned * path_size - Size of returned path name buffer * no_trailing - Remove trailing '_' from each name segment * * RETURN: Return 1 if the AML path is empty, otherwise returning (length * of pathname + 1) which means the 'FullPath' contains a trailing * null. * * DESCRIPTION: Build and return a full namespace pathname. * Note that if the size of 'FullPath' isn't large enough to * contain the namespace node's path name, the actual required * buffer length is returned, and it should be greater than * 'PathSize'. So callers are able to check the returning value * to determine the buffer size of 'FullPath'. *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_ns_get_normalized_pathname * * PARAMETERS: node - Namespace node whose pathname is needed * no_trailing - Remove trailing '_' from each name segment * * RETURN: Pointer to storage containing the fully qualified name of * the node, In external format (name segments separated by path * separators.) * * DESCRIPTION: Used to obtain the full pathname to a namespace node, usually * for error and debug statements. All trailing '_' will be * removed from the full pathname if 'NoTrailing' is specified.. *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_ns_build_prefixed_pathname * * PARAMETERS: prefix_scope - Scope/Path that prefixes the internal path * internal_path - Name or path of the namespace node * * RETURN: None * * DESCRIPTION: Construct a fully qualified pathname from a concatenation of: * 1) Path associated with the prefix_scope namespace node * 2) External path representation of the Internal path *
******************************************************************************/
cleanup: if (prefix_path) {
ACPI_FREE(prefix_path);
} if (external_path) {
ACPI_FREE(external_path);
}
return (full_path);
}
/******************************************************************************* * * FUNCTION: acpi_ns_normalize_pathname * * PARAMETERS: original_path - Path to be normalized, in External format * * RETURN: The original path is processed in-place * * DESCRIPTION: Remove trailing underscores from each element of a path. * * For example: \A___.B___.C___ becomes \A.B.C *
******************************************************************************/
for (i = 0; (i < ACPI_NAMESEG_SIZE) && *input_path; i++) { if ((i == 0) || (*input_path != '_')) { /* First char is allowed to be underscore */
*new_path = *input_path;
new_path++;
}
input_path++;
}
/* Dot means that there are more namesegs to come */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.