summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2000-09-05 20:58:51 +0000
committercg <cg@FreeBSD.org>2000-09-05 20:58:51 +0000
commit55b00bdc52f4bcec736dc5fb82b76dd7bafacf17 (patch)
tree83d80af2964f7bbd367b241033cfca0a8e8cce4c /sys
parentd76980428d67a68474112ed4413fd38db383080d (diff)
downloadFreeBSD-src-55b00bdc52f4bcec736dc5fb82b76dd7bafacf17.zip
FreeBSD-src-55b00bdc52f4bcec736dc5fb82b76dd7bafacf17.tar.gz
be more verbose about failed unload attempts
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/sound.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index a466fd9..0458cd7 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -331,8 +331,14 @@ pcm_unregister(device_t dev)
r = 0;
for (i = 0; i < d->chancount; i++)
if (d->ref[i]) r = EBUSY;
- if (r) return r;
- if (mixer_isbusy(d) || status_isopen) return EBUSY;
+ if (r) {
+ device_printf(dev, "unregister: channel busy");
+ return r;
+ }
+ if (mixer_isbusy(d)) {
+ device_printf(dev, "unregister: mixer busy");
+ return EBUSY;
+ }
pdev = makedev(CDEV_MAJOR, PCMMKMINOR(unit, SND_DEV_CTL, 0));
destroy_dev(pdev);
@@ -631,6 +637,8 @@ sndpcm_modevent(module_t mod, int type, void *data)
case MOD_LOAD:
break;
case MOD_UNLOAD:
+ if (status_isopen)
+ return EBUSY;
if (status_dev)
destroy_dev(status_dev);
status_dev = 0;
OpenPOWER on IntegriCloud