Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Don't keep writing data if an error has occurred.



details:   https://anonhg.NetBSD.org/src/rev/63e4ece82ecb
branches:  trunk
changeset: 825134:63e4ece82ecb
user:      nat <nat%NetBSD.org@localhost>
date:      Sat Jul 01 05:32:24 2017 +0000

description:
Don't keep writing data if an error has occurred.

diffstat:

 sys/dev/audiobell.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r c500f2462fed -r 63e4ece82ecb sys/dev/audiobell.c
--- a/sys/dev/audiobell.c       Sat Jul 01 05:11:57 2017 +0000
+++ b/sys/dev/audiobell.c       Sat Jul 01 05:32:24 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audiobell.c,v 1.24 2017/06/27 09:44:13 nat Exp $       */
+/*     $NetBSD: audiobell.c,v 1.25 2017/07/01 05:32:24 nat Exp $       */
 
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.24 2017/06/27 09:44:13 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.25 2017/07/01 05:32:24 nat Exp $");
 
 #include <sys/audioio.h>
 #include <sys/conf.h>
@@ -170,7 +170,8 @@
                auio.uio_rw = UIO_WRITE;
                UIO_SETUP_SYSSPACE(&auio);
 
-               audiobellwrite(fp, NULL, &auio, NULL, 0);
+               if (audiobellwrite(fp, NULL, &auio, NULL, 0) != 0)
+                       break;
                len -= size;
        }
 out:



Home | Main Index | Thread Index | Old Index