From 3893537d9136d6be6af8d5450b3f8aad144e5e65 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Tue, 31 Dec 2002 05:59:53 +0000 Subject: [PATCH] If we have a valid UID but it's a null string, display '' rather than nothing at all. --- sys/dev/acpi/acpi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 09c014dfed3d..36b9bd776240 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.21 2002/12/30 09:33:25 matt Exp $ */ +/* $NetBSD: acpi.c,v 1.22 2002/12/31 05:59:53 jmcneill Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.21 2002/12/30 09:33:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.22 2002/12/31 05:59:53 jmcneill Exp $"); #include #include @@ -553,6 +553,7 @@ int acpi_print(void *aux, const char *pnp) { struct acpi_attach_args *aa = aux; + char *uid; #if 0 char *str; #endif @@ -569,8 +570,13 @@ acpi_print(void *aux, const char *pnp) printf("at %s", pnp); } else { printf(" (%s", aa->aa_node->ad_devinfo.HardwareId); - if (aa->aa_node->ad_devinfo.Valid & ACPI_VALID_UID) - printf("-%s", aa->aa_node->ad_devinfo.UniqueId); + if (aa->aa_node->ad_devinfo.Valid & ACPI_VALID_UID) { + if (aa->aa_node->ad_devinfo.UniqueId[0] == '\0') + uid = ""; + else + uid = aa->aa_node->ad_devinfo.UniqueId; + printf("-%s", uid); + } printf(")"); }