if ((sc->sc_flags & SCFLAG_OPEN) == 0)
if (!apm_error && (sc->sc_flags & SCFLAG_OPEN) == 0) { DPRINTF(("apm_record_event: no user waiting\n")); apm_error++;
apm_record_event(sc, event_type)	struct apm_softc *sc;	u_int event_type;{	struct apm_event_info *evp;	if ((sc->sc_flags & SCFLAG_OPEN) == 0)		return 1;		/* no user waiting */	if (sc->event_count == APM_NEVENTS)		return 1;			/* overflow */	evp = &sc->event_list[sc->event_ptr];	sc->event_count++;	sc->event_ptr++;	sc->event_ptr %= APM_NEVENTS;	evp->type = event_type;	evp->index = ++apm_evindex;	selwakeup(&sc->sc_rsel);	return (sc->sc_flags & SCFLAG_OWRITE) ? 0 : 1; /* user may handle */}