From 69a9febdc233a2c2eaca5529d63fa2674fff8cdd Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Sun, 21 Sep 2003 03:51:48 +0000 Subject: [PATCH] Only print an end '}' if the field was non-zero (i.e. there were some flags to print). --- usr.sbin/acpi/acpidump/acpi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index c8d717728db..0ff79185f4d 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