Exemple #1
0
const char *acpi_format_exception(acpi_status status)
{
    const char *exception = NULL;

    ACPI_FUNCTION_ENTRY();

    exception = acpi_ut_validate_exception(status);
    if (!exception) {

        /* Exception code was not recognized */

        ACPI_ERROR((AE_INFO,
                    "Unknown exception code: 0x%8.8X", status));

        exception = "UNKNOWN_STATUS_CODE";
    }

    return (ACPI_CAST_PTR(const char, exception));
}
Exemple #2
0
/*******************************************************************************
 *
 * FUNCTION:    acpi_format_exception
 *
 * PARAMETERS:  status              - The acpi_status code to be formatted
 *
 * RETURN:      A string containing the exception text. A valid pointer is
 *              always returned.
 *
 * DESCRIPTION: This function translates an ACPI exception into an ASCII
 *              string. Returns "unknown status" string for invalid codes.
 *
 ******************************************************************************/
const char *acpi_format_exception(acpi_status status)
{
	const struct acpi_exception_info *exception;

	ACPI_FUNCTION_ENTRY();

	exception = acpi_ut_validate_exception(status);
	if (!exception) {

		/* Exception code was not recognized */

		ACPI_ERROR((AE_INFO,
			    "Unknown exception code: 0x%8.8X", status));

		return ("UNKNOWN_STATUS_CODE");
	}

	return (exception->name);
}