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 Don't print PM_TMR_BLK if the va...



details:   https://anonhg.NetBSD.org/src/rev/51d3ef87f2f3
branches:  trunk
changeset: 445209:51d3ef87f2f3
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Oct 18 04:52:00 2018 +0000

description:
Don't print PM_TMR_BLK if the value is 0 (see also acpi_timer.c rev. 1.23).

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 5d7cddd0c3d7 -r 51d3ef87f2f3 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Thu Oct 18 04:44:27 2018 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Thu Oct 18 04:52:00 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.35 2018/10/18 04:29:44 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.36 2018/10/18 04:52:00 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.35 2018/10/18 04:29:44 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.36 2018/10/18 04:52:00 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -3490,9 +3490,10 @@
                printf("\tPM2_CNT_BLK=0x%x-0x%x\n",
                       fadt->Pm2ControlBlock,
                       fadt->Pm2ControlBlock + fadt->Pm2ControlLength - 1);
-       printf("\tPM_TMR_BLK=0x%x-0x%x\n",
-              fadt->PmTimerBlock,
-              fadt->PmTimerBlock + fadt->PmTimerLength - 1);
+       if (fadt->PmTimerBlock != 0)
+               printf("\tPM_TMR_BLK=0x%x-0x%x\n",
+                   fadt->PmTimerBlock,
+                   fadt->PmTimerBlock + fadt->PmTimerLength - 1);
        if (fadt->Gpe0Block != 0)
                printf("\tGPE0_BLK=0x%x-0x%x\n",
                       fadt->Gpe0Block,



Home | Main Index | Thread Index | Old Index