This diff improves the way we printf "not configured" sdio devices.
Before:
(manufacturer 0x2d0, product 0x4334)at sdmmc1 function 2 not configured
After:
manufacturer 0x02d0, product 0x4334 at sdmmc1 function 2 not configured
This is somewhat similar to how we print "unknown" pci devices,
although I left out printing "unknown" here since we don't have a
table wit known vendors/products.
ok?
Index: dev/sdmmc/sdmmc_io.c
===================================================================
RCS file: /cvs/src/sys/dev/sdmmc/sdmmc_io.c,v
retrieving revision 1.32
diff -u -p -r1.32 sdmmc_io.c
--- dev/sdmmc/sdmmc_io.c 11 Feb 2018 20:58:40 -0000 1.32
+++ dev/sdmmc/sdmmc_io.c 21 May 2018 11:31:31 -0000
@@ -305,19 +305,18 @@ sdmmc_print(void *aux, const char *pnp)
if (i != 0)
printf("\"");
- if (cis->manufacturer != SDMMC_VENDOR_INVALID &&
+ if (cis->manufacturer != SDMMC_VENDOR_INVALID ||
cis->product != SDMMC_PRODUCT_INVALID) {
- printf("%s(", i ? " " : "");
+ printf("%s", i ? " " : "");
if (cis->manufacturer != SDMMC_VENDOR_INVALID)
- printf("manufacturer 0x%x%s",
+ printf("manufacturer 0x%04x%s",
cis->manufacturer,
cis->product == SDMMC_PRODUCT_INVALID ?
"" : ", ");
if (cis->product != SDMMC_PRODUCT_INVALID)
- printf("product 0x%x", cis->product);
- printf(")");
+ printf("product 0x%04x", cis->product);
}
- printf("%sat %s", i ? " " : "", pnp);
+ printf(" at %s", pnp);
}
printf(" function %d", sf->number);