diff options
author | pjd <pjd@FreeBSD.org> | 2014-09-30 12:00:50 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2014-09-30 12:00:50 +0000 |
commit | d59e29a8772af9c58f1e67a2ea42aadeae2e201e (patch) | |
tree | 6fce19e31b89b6a6f8af4e68d3ace511b2d0161f /sys/geom | |
parent | a652dcda5d51c2287ffbfdafbfeb9c600f797ede (diff) | |
download | FreeBSD-src-d59e29a8772af9c58f1e67a2ea42aadeae2e201e.zip FreeBSD-src-d59e29a8772af9c58f1e67a2ea42aadeae2e201e.tar.gz |
Be prepared that set_dumper() might fail even when resetting it or prefix
the call with (void) to document that we intentionally ignore the return
value - no way to handle an error in case of device disappearing.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_dev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index d5ca52e..97f9661 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -396,8 +396,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread break; case DIOCSKERNELDUMP: if (*(u_int *)data != 0) { - set_dumper(NULL, NULL); - error = 0; + error = set_dumper(NULL, NULL); break; } kd.offset = 0; @@ -616,7 +615,7 @@ g_dev_orphan(struct g_consumer *cp) /* Reset any dump-area set on this device */ if (dev->si_flags & SI_DUMPDEV) - set_dumper(NULL, NULL); + (void)set_dumper(NULL, NULL); /* Destroy the struct cdev *so we get no more requests */ destroy_dev_sched_cb(dev, g_dev_callback, cp); |