sync with OpenBSD -current

This commit is contained in:
purplerain 2023-12-08 20:04:57 +00:00
parent 880da5e235
commit 8e8dccb6dd
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
7 changed files with 115 additions and 16 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ugold.c,v 1.24 2023/11/30 20:08:23 miod Exp $ */
/* $OpenBSD: ugold.c,v 1.25 2023/12/08 06:33:48 miod Exp $ */
/*
* Copyright (c) 2013 Takayoshi SASANO <uaa@openbsd.org>
@ -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, "_V4.0 ", 16 - 9) == 0) {
if (memcmp(sc->sc_model + 9, "_V3.9 ", 16 - 9) == 0 ||
memcmp(sc->sc_model + 9, "_V4.0 ", 16 - 9) == 0) {
sc->sc_type = UGOLD_TYPE_TEMPERX;
descr = "temperx (temperature and humidity)";
goto identified;