mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Implement the OSS_GETVERSION ioctl. The version returned can be changed through
the sysctl variable `compat.linux.oss_version'. PR: 12917 Originator: Dean Lombardo <dlombardo@excite.com>
This commit is contained in:
parent
c805b031d1
commit
86f95e6b6d
4 changed files with 20 additions and 0 deletions
|
|
@ -612,6 +612,8 @@ struct trapframe;
|
|||
#define LINUX_SOUND_MIXER_WRITE_LINE3 0x4d10
|
||||
#define LINUX_SOUND_MIXER_READ_DEVMASK 0x4dfe
|
||||
|
||||
#define LINUX_OSS_GETVERSION 0x4d76
|
||||
|
||||
/* Socket system defines */
|
||||
#define LINUX_FIOSETOWN 0x8901
|
||||
#define LINUX_SIOCSPGRP 0x8902
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/linux_proto.h>
|
||||
#include <i386/linux/linux_util.h>
|
||||
#include <i386/linux/linux_mib.h>
|
||||
|
||||
#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG)
|
||||
|
||||
|
|
@ -1270,6 +1271,13 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args)
|
|||
return error;
|
||||
}
|
||||
|
||||
case LINUX_OSS_GETVERSION: {
|
||||
int version;
|
||||
|
||||
version = linux_get_oss_version(p);
|
||||
return copyout((caddr_t)&version, (caddr_t)args->arg, sizeof(int));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
uprintf("LINUX: 'ioctl' fd=%d, typ=0x%x(%c), num=0x%x not implemented\n",
|
||||
|
|
|
|||
|
|
@ -612,6 +612,8 @@ struct trapframe;
|
|||
#define LINUX_SOUND_MIXER_WRITE_LINE3 0x4d10
|
||||
#define LINUX_SOUND_MIXER_READ_DEVMASK 0x4dfe
|
||||
|
||||
#define LINUX_OSS_GETVERSION 0x4d76
|
||||
|
||||
/* Socket system defines */
|
||||
#define LINUX_FIOSETOWN 0x8901
|
||||
#define LINUX_SIOCSPGRP 0x8902
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/linux_proto.h>
|
||||
#include <i386/linux/linux_util.h>
|
||||
#include <i386/linux/linux_mib.h>
|
||||
|
||||
#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG)
|
||||
|
||||
|
|
@ -1270,6 +1271,13 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args)
|
|||
return error;
|
||||
}
|
||||
|
||||
case LINUX_OSS_GETVERSION: {
|
||||
int version;
|
||||
|
||||
version = linux_get_oss_version(p);
|
||||
return copyout((caddr_t)&version, (caddr_t)args->arg, sizeof(int));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
uprintf("LINUX: 'ioctl' fd=%d, typ=0x%x(%c), num=0x%x not implemented\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue