From 8a36f69df1dda58a79be3750e436cd18faa146c4 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 25 Feb 2006 21:38:57 +0000 Subject: Make sure we print something for unidentified devices. ok deraadt@ --- sys/dev/i2c/i2c_scan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index b968850e3df..39547169f16 100644 --- a/sys/dev/i2c/i2c_scan.c +++ b/sys/dev/i2c/i2c_scan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i2c_scan.c,v 1.69 2006/02/25 17:58:01 kettenis Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.70 2006/02/25 21:38:56 kettenis Exp $ */ /* * Copyright (c) 2005 Theo de Raadt @@ -639,6 +639,11 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr) iic_dump(self, addr, name); #endif /* I2C_DEBUG */ +#if !defined(I2C_VERBOSE) && !defined(I2C_DEBUG) + if (name == NULL) + name = "unknown"; +#endif + if (name) { memset(&ia, 0, sizeof(ia)); ia.ia_tag = iba->iba_tag; -- cgit v1.2.3