Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/rpi pay attention to copyin()'s return values
details: https://anonhg.NetBSD.org/src/rev/242e841e67da
branches: trunk
changeset: 332694:242e841e67da
user: macallan <macallan%NetBSD.org@localhost>
date: Sat Oct 04 13:05:57 2014 +0000
description:
pay attention to copyin()'s return values
diffstat:
sys/arch/evbarm/rpi/rpi_machdep.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r fcebc2b3599a -r 242e841e67da sys/arch/evbarm/rpi/rpi_machdep.c
--- a/sys/arch/evbarm/rpi/rpi_machdep.c Sat Oct 04 11:49:57 2014 +0000
+++ b/sys/arch/evbarm/rpi/rpi_machdep.c Sat Oct 04 13:05:57 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_machdep.c,v 1.53 2014/10/03 11:40:55 skrll Exp $ */
+/* $NetBSD: rpi_machdep.c,v 1.54 2014/10/04 13:05:57 macallan Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.53 2014/10/03 11:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.54 2014/10/04 13:05:57 macallan Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_ddb.h"
@@ -911,9 +911,12 @@
shape = 1;
}
if (cur->which & WSDISPLAY_CURSOR_DOSHAPE) {
+ int err;
- copyin(cur->mask, cursor_mask, CURSOR_BITMAP_SIZE);
- copyin(cur->image, cursor_bitmap, CURSOR_BITMAP_SIZE);
+ err = copyin(cur->mask, cursor_mask, CURSOR_BITMAP_SIZE);
+ err += copyin(cur->image, cursor_bitmap, CURSOR_BITMAP_SIZE);
+ if (err != 0)
+ return EFAULT;
shape = 1;
}
if (shape) {
Home |
Main Index |
Thread Index |
Old Index