133
void *memmove(void *dest, const void *src, size_t n)
135
return oss_memcpy(dest, src, n);
134
139
oss_memset (void *t, int val, size_t l)
276
281
return strlen (tmp);
285
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
279
286
static struct file_operations oss_proc_operations = {
280
287
.read = oss_read_devfiles,
290
static struct file_operations fops = {
291
.owner = THIS_MODULE,
292
.read = oss_read_devfiles,
284
298
init_proc_fs (void)
301
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
286
303
if ((oss_proc_root =
287
create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
289
oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
304
create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
306
oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
293
310
if ((oss_proc_devfiles =
294
create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
296
oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
311
create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
313
oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
300
317
oss_proc_devfiles->proc_fops = &oss_proc_operations;
322
proc_mkdir ("opensound", NULL)) == NULL )
324
oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
328
if ((oss_proc_devfiles =
329
proc_create ("devfiles", 0600, oss_proc_root, &fops)) == NULL)
331
oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
433
469
return current->pid;
437
473
oss_get_uid (void)
475
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
476
return current->cred->uid.val;
439
478
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
440
479
return current->cred->uid;
442
481
return current->uid;
446
487
typedef struct tmout_desc
953
996
fop->llseek = oss_no_llseek;
954
997
fop->read = tmp_read;
955
998
fop->write = tmp_write;
999
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
956
1000
fop->readdir = NULL; /* tmp_readdir; */
957
1002
fop->poll = tmp_poll;
958
1003
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,35)
959
1004
fop->ioctl = tmp_ioctl;
961
1006
fop->mmap = tmp_mmap;
962
1007
fop->open = tmp_open;
963
1008
fop->release = tmp_release;
964
fop->fsync = oss_no_fsync;
965
fop->fasync = oss_no_fasync;
1009
fop->fsync = NULL; /* oss_no_fsync; */
1010
fop->fasync = NULL; /* oss_no_fasync; */
966
1011
fop->lock = NULL;
967
1012
fop->flush = NULL;
968
1013
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
1631
1676
extern int oss_pci_read_config_irq (oss_device_t * osdev, unsigned long where,
1632
1677
unsigned char *val);
1635
1680
oss_pci_read_devpath (dev_info_t * dip)
1637
1682
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)