summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_mbr.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-02 21:10:04 +0000
committerphk <phk@FreeBSD.org>2003-04-02 21:10:04 +0000
commit39cbb43bab476ff3c79356e36f26e51a6b90a692 (patch)
tree629b1f684f16eeb00568b7d1a2df6af64778ddf7 /sys/geom/geom_mbr.c
parentcedf04c4758318e15e1a5924e4226bb5a9699107 (diff)
downloadFreeBSD-src-39cbb43bab476ff3c79356e36f26e51a6b90a692.zip
FreeBSD-src-39cbb43bab476ff3c79356e36f26e51a6b90a692.tar.gz
Add handling for cancelled events in the g_call_me() methods.
Diffstat (limited to 'sys/geom/geom_mbr.c')
-rw-r--r--sys/geom/geom_mbr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index 5b24938..4eb7bd7 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -173,7 +173,7 @@ g_mbr_modify(struct g_geom *gp, struct g_mbr_softc *ms, u_char *sec0)
}
static void
-g_mbr_ioctl(void *arg, int flag __unused)
+g_mbr_ioctl(void *arg, int flag)
{
struct bio *bp;
struct g_geom *gp;
@@ -184,8 +184,11 @@ g_mbr_ioctl(void *arg, int flag __unused)
u_char *sec0;
int error;
- /* Get hold of the interesting bits from the bio. */
bp = arg;
+ if (flag == EV_CANCEL) {
+ g_io_deliver(bp, ENXIO);
+ return;
+ }
gp = bp->bio_to->geom;
gsp = gp->softc;
ms = gsp->softc;
OpenPOWER on IntegriCloud