Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jan 2009 21:38:37 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187036 - head/sys/dev/sound/pcm
Message-ID:  <200901102138.n0ALcbRe009421@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901102138.n0ALcbRe009421>