On Mon, May 11 2020, "Theo de Raadt" <dera...@openbsd.org> wrote: > You sure about that? In this code, acpi.c is collecting abstracted > information from the 3 battery drivers.
(One A/C driver and two battery drivers.) > Maybe one of the drivers > isn't providing enough information? > > Mark Kettenis <mark.kette...@xs4all.nl> wrote: > >> This wouldn't do the right thing if you have both acpibat(4) and >> acpisbs(4), but I think that is already broken. acpibat(4) doesn't attach if acpisbs(4) is present: int acpibat_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; if (((struct acpi_softc *)parent)->sc_havesbs) return (0); I guess this could be made more explicit by splitting those loops. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE