diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-11-22 08:14:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-11-22 08:14:02 +0000 |
commit | 1bcf4689c84f5a4c468bbb6b1afcf2ecd440b00e (patch) | |
tree | 649eb462d8ff55c905e28fa56d9bca5843c7ea99 | |
parent | 284b8b9a89afccc5f6734567f1d516b296b6c331 (diff) |
cleaner handling of unknown radios
-rw-r--r-- | sys/dev/usb/if_atu.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index 1628e7f2192..ad6d3eb4939 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atu.c,v 1.21 2004/11/21 04:55:36 dlg Exp $ */ +/* $OpenBSD: if_atu.c,v 1.22 2004/11/22 08:14:01 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 * Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved. @@ -998,6 +998,7 @@ atu_upload_internal_firmware(struct atu_softc *sc) name = "atu-intersil-int"; break; default: + name = "unknown-device"; break; } @@ -1005,8 +1006,8 @@ atu_upload_internal_firmware(struct atu_softc *sc) USBDEVNAME(sc->atu_dev), name)); err = loadfirmware(name, &firm, &bytes_left); if (err != 0) { - printf("%s: loadfirmware error %d\n", - USBDEVNAME(sc->atu_dev), err); + printf("%s: %s loadfirmware error %d\n", + USBDEVNAME(sc->atu_dev), name, err); return (err); } @@ -1157,7 +1158,7 @@ atu_upload_external_firmware(struct atu_softc *sc) name = "atu-intersil-ext"; break; default: - bytes_left = 0; + name = "unknown-device"; break; } @@ -1165,8 +1166,8 @@ atu_upload_external_firmware(struct atu_softc *sc) USBDEVNAME(sc->atu_dev), name)); err = loadfirmware(name, &firm, &bytes_left); if (err != 0) { - printf("%s: loadfirmware error %d\n", - USBDEVNAME(sc->atu_dev), err); + printf("%s: %s loadfirmware error %d\n", + USBDEVNAME(sc->atu_dev), name, err); return (err); } ptr = firm; |