summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ioctl.c
diff options
context:
space:
mode:
authorscf <scf@FreeBSD.org>2010-12-30 02:18:04 +0000
committerscf <scf@FreeBSD.org>2010-12-30 02:18:04 +0000
commit3e36dcd710c8b8a7638536ec936c17b3ca606096 (patch)
treefc75c950fb581c8790fd4edabe4b12a09c1bdd07 /sys/compat/linux/linux_ioctl.c
parentd34b4913e63be3c0b206a84bd66770349126026e (diff)
downloadFreeBSD-src-3e36dcd710c8b8a7638536ec936c17b3ca606096.zip
FreeBSD-src-3e36dcd710c8b8a7638536ec936c17b3ca606096.tar.gz
Fix the LINUX_SOUND_MIXER_INFO ioctl to return success after the
information is set to FreeBSD. It had been falling through to the end of linux_ioctl_sound() and returning ENOIOCTL. Noticed when running the Linux ALSA amixer tool. Add a LINUX_SOUND_MIXER_READ_CAPS ioctl which is used by the Skype v2.1.0.81 binary. Reviewed by: gavin MFC after: 2 weeks
Diffstat (limited to 'sys/compat/linux/linux_ioctl.c')
-rw-r--r--sys/compat/linux/linux_ioctl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 07a281e..4237f6f 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -1749,7 +1749,7 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
strncpy(info.id, "OSS", sizeof(info.id) - 1);
strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1);
copyout(&info, (void *)args->arg, sizeof(info));
- break;
+ return (0);
}
case 0x0030: { /* SOUND_OLD_MIXER_INFO */
struct linux_old_mixer_info info;
@@ -1757,7 +1757,7 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
strncpy(info.id, "OSS", sizeof(info.id) - 1);
strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1);
copyout(&info, (void *)args->arg, sizeof(info));
- break;
+ return (0);
}
default:
return (ENOIOCTL);
@@ -1774,6 +1774,10 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
args->cmd = SOUND_MIXER_READ_STEREODEVS;
return (ioctl(td, (struct ioctl_args *)args));
+ case LINUX_SOUND_MIXER_READ_CAPS:
+ args->cmd = SOUND_MIXER_READ_CAPS;
+ return (ioctl(td, (struct ioctl_args *)args));
+
case LINUX_SOUND_MIXER_READ_RECMASK:
args->cmd = SOUND_MIXER_READ_RECMASK;
return (ioctl(td, (struct ioctl_args *)args));
OpenPOWER on IntegriCloud