summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpi
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-09-21 03:51:48 +0000
committernjl <njl@FreeBSD.org>2003-09-21 03:51:48 +0000
commit1343b60a86e91326dd52b1e3cef081808324d205 (patch)
tree4732e1c66887c06766b90439ae4823defd2fb56d /usr.sbin/acpi
parentacbdaf96e9850ed75934d67e600788292132e605 (diff)
downloadFreeBSD-src-1343b60a86e91326dd52b1e3cef081808324d205.zip
FreeBSD-src-1343b60a86e91326dd52b1e3cef081808324d205.tar.gz
Only print an end '}' if the field was non-zero (i.e. there were some flags
to print).
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index c8d7177..0ff7918 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -479,7 +479,8 @@ acpi_print_fadt(struct FADTbody *fadt)
sep = '{';
PRINTFLAG(fadt->iapc_boot_arch, LEGACY_DEV);
PRINTFLAG(fadt->iapc_boot_arch, 8042);
- printf("}\n");
+ if (fadt->iapc_boot_arch != 0)
+ printf("}\n");
printf("\tFlags=");
sep = '{';
@@ -497,7 +498,8 @@ acpi_print_fadt(struct FADTbody *fadt)
PRINTFLAG(fadt->flags, SEALED_CASE);
PRINTFLAG(fadt->flags, HEADLESS);
PRINTFLAG(fadt->flags, CPU_SW_SLP);
- printf("}\n");
+ if (fadt->flags != 0)
+ printf("}\n");
#undef PRINTFLAG
OpenPOWER on IntegriCloud