Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Error out if we get an unexpected buffer type.
details: https://anonhg.NetBSD.org/src/rev/5285e47ce786
branches: trunk
changeset: 540331:5285e47ce786
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Dec 10 01:09:09 2002 +0000
description:
Error out if we get an unexpected buffer type.
diffstat:
sys/arch/arm/xscale/iopaau.c | 13 +++++++++++--
sys/dev/dmover/swdmover.c | 22 ++++++++++++++++++++--
2 files changed, 31 insertions(+), 4 deletions(-)
diffs (105 lines):
diff -r d6093ba8788e -r 5285e47ce786 sys/arch/arm/xscale/iopaau.c
--- a/sys/arch/arm/xscale/iopaau.c Mon Dec 09 23:47:47 2002 +0000
+++ b/sys/arch/arm/xscale/iopaau.c Tue Dec 10 01:09:09 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iopaau.c,v 1.7 2002/08/04 02:26:18 thorpej Exp $ */
+/* $NetBSD: iopaau.c,v 1.8 2002/12/10 01:09:10 thorpej Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iopaau.c,v 1.7 2002/08/04 02:26:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iopaau.c,v 1.8 2002/12/10 01:09:10 thorpej Exp $");
#include <sys/param.h>
#include <sys/pool.h>
@@ -262,6 +262,9 @@
uio, BUS_DMA_NOWAIT|BUS_DMA_READ|BUS_DMA_STREAMING);
break;
}
+
+ default:
+ error = EINVAL;
}
if (__predict_false(error != 0))
@@ -444,6 +447,9 @@
uio, BUS_DMA_NOWAIT|BUS_DMA_READ|BUS_DMA_STREAMING);
break;
}
+
+ default:
+ error = EINVAL;
}
if (__predict_false(error != 0))
@@ -491,6 +497,9 @@
}
break;
}
+
+ default:
+ error = EINVAL;
}
if (__predict_false(error != 0)) {
diff -r d6093ba8788e -r 5285e47ce786 sys/dev/dmover/swdmover.c
--- a/sys/dev/dmover/swdmover.c Mon Dec 09 23:47:47 2002 +0000
+++ b/sys/dev/dmover/swdmover.c Tue Dec 10 01:09:09 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: swdmover.c,v 1.2 2002/08/02 00:31:36 thorpej Exp $ */
+/* $NetBSD: swdmover.c,v 1.3 2002/12/10 01:09:09 thorpej Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: swdmover.c,v 1.2 2002/08/02 00:31:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: swdmover.c,v 1.3 2002/12/10 01:09:09 thorpej Exp $");
#include <sys/param.h>
#include <sys/lock.h>
@@ -180,6 +180,12 @@
}
break;
}
+
+ default:
+ /* XXXLOCK */
+ dreq->dreq_error = EINVAL;
+ dreq->dreq_flags |= DMOVER_REQ_ERROR;
+ /* XXXUNLOCK */
}
dmover_done(dreq);
@@ -236,6 +242,12 @@
}
break;
}
+
+ default:
+ /* XXXLOCK */
+ dreq->dreq_error = EINVAL;
+ dreq->dreq_flags |= DMOVER_REQ_ERROR;
+ /* XXXUNLOCK */
}
dmover_done(dreq);
@@ -308,6 +320,12 @@
}
break;
}
+
+ default:
+ /* XXXLOCK */
+ dreq->dreq_error = EINVAL;
+ dreq->dreq_flags |= DMOVER_REQ_ERROR;
+ /* XXXUNLOCK */
}
dmover_done(dreq);
Home |
Main Index |
Thread Index |
Old Index