From 5211b6dbcfa872bdd4daf8c3e217ac106ea9a67c Mon Sep 17 00:00:00 2001 From: ariff Date: Wed, 4 Jul 2007 12:33:11 +0000 Subject: Be much more forgiving towards applications that requesting ioctls that should be a no-op (for example, requesting SYNC on record path). The standards does not indicate that such requests are illegal, so just return it as success instead of EINVAL. Approved by: re (mux) --- sys/dev/sound/pcm/dsp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index cb185f6..e60c0a9 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1100,8 +1100,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread * CHN_LOCK(wrch); chn_sync(wrch, 0); CHN_UNLOCK(wrch); - } else - ret = EINVAL; + } break; case SNDCTL_DSP_SPEED: @@ -1446,8 +1445,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread * wrch->flags &= ~CHN_F_NOTRIGGER; chn_start(wrch, 1); CHN_UNLOCK(wrch); - } else - ret = EINVAL; + } break; case SNDCTL_DSP_SETDUPLEX: -- cgit v1.1