From: "Theo de Raadt" Subject: Re: New ugold(4) device To: Sebastiaan Indesteege Cc: tech@openbsd.org Date: Fri, 26 Jul 2024 06:58:39 -0600 Sebastiaan Indesteege wrote: > Note that, unlike the TEMPerHUM_V3.9 and TEMPerHUM_V4.0 models, but > similar to some others, the model name is padded with NULs instead of > spaces. That company produces amazingly inconsistant devices. > Index: sys/dev/usb/ugold.c > =================================================================== > RCS file: /cvs/src/sys/dev/usb/ugold.c,v > retrieving revision 1.28 > diff -u -p -u -p -r1.28 ugold.c > --- sys/dev/usb/ugold.c 23 May 2024 03:21:09 -0000 1.28 > +++ sys/dev/usb/ugold.c 26 Jul 2024 09:22:13 -0000 > @@ -453,7 +453,8 @@ ugold_si700x_type(struct ugold_softc *sc > if (sc->sc_model_len >= 9 && > memcmp(sc->sc_model, "TEMPerHUM", 9) == 0) { > if (memcmp(sc->sc_model + 9, "_V3.9 ", 16 - 9) == 0 || > - memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0) { > + memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0 || > + memcmp(sc->sc_model + 9, "_V4.1\0\0", 16 - 9) == 0) { > sc->sc_type = UGOLD_TYPE_TEMPERX; > descr = "temperx (temperature and humidity)"; > goto identified; >