svn commit: r187036 - head/sys/dev/sound/pcm

Alexander Motin mav at FreeBSD.org
Sat Jan 10 13:38:38 PST 2009


Author: mav
Date: Sat Jan 10 21:38:37 2009
New Revision: 187036
URL: http://svn.freebsd.org/changeset/base/187036

Log:
  OSS tools expect EINVAL for unsupported ioctls, but not ENXIO.

Modified:
  head/sys/dev/sound/pcm/mixer.c

Modified: head/sys/dev/sound/pcm/mixer.c
==============================================================================
--- head/sys/dev/sound/pcm/mixer.c	Sat Jan 10 20:54:47 2009	(r187035)
+++ head/sys/dev/sound/pcm/mixer.c	Sat Jan 10 21:38:37 2009	(r187036)
@@ -1040,7 +1040,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo
 		case SNDCTL_MIXERINFO:
 			return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg));
 		}
-		return (ENXIO);
+		return (EINVAL);
 	}
 
 	m = i_dev->si_drv1;
@@ -1090,7 +1090,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo
 	ret = 0;
 
 	switch (cmd) {
- 	/** @todo Double check return values, error codes. */
 	case SNDCTL_DSP_GET_RECSRC_NAMES:
 		bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo));
 		break;
@@ -1104,7 +1103,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo
 		*arg_i = SOUND_VERSION;
 		break;
 	default:
-		ret = ENXIO;
+		ret = EINVAL;
 		break;
 	}
 


More information about the svn-src-head mailing list