Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/acpitools/acpidump Print ACPI_HEST_GHES_ASSIST flag...



details:   https://anonhg.NetBSD.org/src/rev/08fb45df1b91
branches:  trunk
changeset: 826765:08fb45df1b91
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Sep 28 06:55:08 2017 +0000

description:
Print ACPI_HEST_GHES_ASSIST flag (ACPI 6.2).

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c |  21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r f52e690aeeff -r 08fb45df1b91 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Thu Sep 28 05:51:26 2017 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Thu Sep 28 06:55:08 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.28 2017/09/27 08:14:18 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.29 2017/09/28 06:55:08 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.28 2017/09/27 08:14:18 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.29 2017/09/28 06:55:08 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -390,12 +390,17 @@
 static void
 acpi_print_hest_aer_common(ACPI_HEST_AER_COMMON *data)
 {
-       printf("\tFlags={ ");
-       if (data->Flags & ACPI_HEST_FIRMWARE_FIRST)
-               printf("FIRMWARE_FIRST");
-       if (data->Flags & ACPI_HEST_GLOBAL)
-               printf("GLOBAL");
-       printf(" }\n");
+
+#define PRINTFLAG(var, flag)   printflag((var), ACPI_HEST_## flag, #flag)
+
+       printf("\tFlags=");
+       PRINTFLAG(data->Flags, FIRMWARE_FIRST);
+       PRINTFLAG(data->Flags, GLOBAL);
+       PRINTFLAG(data->Flags, GHES_ASSIST);
+       PRINTFLAG_END();
+
+#undef PRINTFLAG
+
        printf("\tEnabled={ %s ", data->Flags ? "YES" : "NO");
        if (data->Flags & ACPI_HEST_FIRMWARE_FIRST)
                printf("(ignored) ");



Home | Main Index | Thread Index | Old Index