コード例 #1
0
ファイル: uterror.c プロジェクト: a2hojsjsjs/linux
void
acpi_ut_namespace_error(const char *module_name,
			u32 line_number,
			const char *internal_name, acpi_status lookup_status)
{
	acpi_status status;
	u32 bad_name;
	char *name = NULL;

	ACPI_MSG_REDIRECT_BEGIN;
	acpi_os_printf(ACPI_MSG_ERROR);

	if (lookup_status == AE_BAD_CHARACTER) {

		/* There is a non-ascii character in the name */

		ACPI_MOVE_32_TO_32(&bad_name,
				   ACPI_CAST_PTR(u32, internal_name));
		acpi_os_printf("[0x%.8X] (NON-ASCII)", bad_name);
	} else {
		/* Convert path to external format */

		status =
		    acpi_ns_externalize_name(ACPI_UINT32_MAX, internal_name,
					     NULL, &name);

		/* Print target name */

		if (ACPI_SUCCESS(status)) {
			acpi_os_printf("[%s]", name);
		} else {
			acpi_os_printf("[COULD NOT EXTERNALIZE NAME]");
		}

		if (name) {
			ACPI_FREE(name);
		}
	}

	acpi_os_printf(" Namespace lookup failure, %s",
		       acpi_format_exception(lookup_status));

	ACPI_MSG_SUFFIX;
	ACPI_MSG_REDIRECT_END;
}
コード例 #2
0
ファイル: nsutils.c プロジェクト: Antonio-Zhou/Linux-2.6.11
void
acpi_ns_report_error (
	char                            *module_name,
	u32                             line_number,
	u32                             component_id,
	char                            *internal_name,
	acpi_status                     lookup_status)
{
	acpi_status                     status;
	char                            *name = NULL;


	acpi_os_printf ("%8s-%04d: *** Error: Looking up ",
		module_name, line_number);

	if (lookup_status == AE_BAD_CHARACTER) {
		/* There is a non-ascii character in the name */

		acpi_os_printf ("[0x%4.4X] (NON-ASCII)\n",
			*(ACPI_CAST_PTR (u32, internal_name)));
	}
	else {
		/* Convert path to external format */

		status = acpi_ns_externalize_name (ACPI_UINT32_MAX,
				 internal_name, NULL, &name);

		/* Print target name */

		if (ACPI_SUCCESS (status)) {
			acpi_os_printf ("[%s]", name);
		}
		else {
			acpi_os_printf ("[COULD NOT EXTERNALIZE NAME]");
		}

		if (name) {
			ACPI_MEM_FREE (name);
		}
	}

	acpi_os_printf (" in namespace, %s\n",
		acpi_format_exception (lookup_status));
}
コード例 #3
0
ファイル: nsutils.c プロジェクト: sserg31/sca3_main
void
acpi_ns_report_error(char *module_name,
                     u32 line_number,
                     char *internal_name, acpi_status lookup_status)
{
    acpi_status status;
    u32 bad_name;
    char *name = NULL;

    acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number);

    if (lookup_status == AE_BAD_CHARACTER) {

        /* There is a non-ascii character in the name */

        ACPI_MOVE_32_TO_32(&bad_name, internal_name);
        acpi_os_printf("[0x%4.4X] (NON-ASCII)", bad_name);
    } else {
        /* Convert path to external format */

        status = acpi_ns_externalize_name(ACPI_UINT32_MAX,
                                          internal_name, NULL, &name);

        /* Print target name */

        if (ACPI_SUCCESS(status)) {
            acpi_os_printf("[%s]", name);
        } else {
            acpi_os_printf("[COULD NOT EXTERNALIZE NAME]");
        }

        if (name) {
            ACPI_FREE(name);
        }
    }

    acpi_os_printf(" Namespace lookup failure, %s\n",
                   acpi_format_exception(lookup_status));
}