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/5a74d04dadf0
branches: trunk
changeset: 354833:5a74d04dadf0
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 4f8117fdb878 -r 5a74d04dadf0 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