Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/dev pullup 1.114->1.115 (thorpej)



details:   https://anonhg.NetBSD.org/src/rev/d81308765c8a
branches:  netbsd-1-4
changeset: 468718:d81308765c8a
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 18 17:07:27 1999 +0000

description:
pullup 1.114->1.115 (thorpej)

diffstat:

 sys/dev/audio.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 7da24c55b2b1 -r d81308765c8a sys/dev/audio.c
--- a/sys/dev/audio.c   Fri Jun 18 17:04:56 1999 +0000
+++ b/sys/dev/audio.c   Fri Jun 18 17:07:27 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.113 1999/02/26 01:18:09 nathanw Exp $      */
+/*     $NetBSD: audio.c,v 1.113.2.1 1999/06/18 17:07:27 perry Exp $    */
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -1251,7 +1251,7 @@
        struct audio_softc *sc = audio_cd.cd_devs[unit];
        struct audio_ringbuffer *cb = &sc->sc_pr;
        u_char *inp, *einp;
-       int error, s, n, cc, used;
+       int saveerror, error, s, n, cc, used;
 
        DPRINTFN(2,("audio_write: sc=%p(unit=%d) count=%lu used=%d(hi=%d)\n", 
                    sc, unit, (unsigned long)uio->uio_resid, sc->sc_pr.used, 
@@ -1386,8 +1386,14 @@
                        cc = 0;
                cb->needfill = 0;
                cb->copying = 0;
-               if (!sc->sc_pbus && !cb->pause)
-                       error = audiostartp(sc); /* XXX clobbers error */
+               if (!sc->sc_pbus && !cb->pause) {
+                       saveerror = error;
+                       error = audiostartp(sc);
+                       if (saveerror != 0) {
+                               /* Report the first error that occured. */
+                               error = saveerror;
+                       }
+               }
                splx(s);
                if (cc != 0) {
                        DPRINTFN(1, ("audio_write: fill %d\n", cc));



Home | Main Index | Thread Index | Old Index