From 366281054272b641d79892b116f93b1a61930f83 Mon Sep 17 00:00:00 2001 From: pjd Date: Wed, 23 Jun 2010 23:03:25 +0000 Subject: [PATCH] MFC r209262: r209186: BIO_DELETE contains range we want to delete and doesn't provide any useful data, so there is no need to copy it to userland. r209187: 'unit' can be negative, so use signed type for it. Found by: Coverity Prevent CID: 3731 Approved by: re (kensmith) git-svn-id: svn://svn.freebsd.org/base/releng/8.1@209487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/geom/gate/g_gate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index dd69a87e..e035f97f 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -210,7 +210,7 @@ g_gate_start(struct bio *bp) } static struct g_gate_softc * -g_gate_hold(u_int unit, const char *name) +g_gate_hold(int unit, const char *name) { struct g_gate_softc *sc = NULL; @@ -572,8 +572,8 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa switch (bp->bio_cmd) { case BIO_READ: - break; case BIO_DELETE: + break; case BIO_WRITE: error = copyout(bp->bio_data, ggio->gctl_data, bp->bio_length); -- 2.42.0