diff options
author | phk <phk@FreeBSD.org> | 2003-04-02 21:10:04 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-04-02 21:10:04 +0000 |
commit | 39cbb43bab476ff3c79356e36f26e51a6b90a692 (patch) | |
tree | 629b1f684f16eeb00568b7d1a2df6af64778ddf7 /sys/geom/geom_pc98.c | |
parent | cedf04c4758318e15e1a5924e4226bb5a9699107 (diff) | |
download | FreeBSD-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_pc98.c')
-rw-r--r-- | sys/geom/geom_pc98.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c index 390ac95..db4b86c 100644 --- a/sys/geom/geom_pc98.c +++ b/sys/geom/geom_pc98.c @@ -160,7 +160,7 @@ g_pc98_modify(struct g_geom *gp, struct g_pc98_softc *ms, u_char *sec) } static void -g_pc98_ioctl(void *arg, int flag __unused) +g_pc98_ioctl(void *arg, int flag) { struct bio *bp; struct g_geom *gp; @@ -171,8 +171,11 @@ g_pc98_ioctl(void *arg, int flag __unused) u_char *sec; 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; |