mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-28 05:40:26 +00:00
0d0fbbe73f
This splits generation process into two phases: 1. Extract values of constants from linux kernel sources. 2. Generate Go code. Constant values are checked in. The advantage is that the second phase is now completely independent from linux source files, kernel version, presence of headers for particular drivers, etc. This allows to change what Go code we generate any time without access to all kernel headers (which in future won't be limited to only upstream headers). Constant extraction process does require proper kernel sources, but this can be done only once by the person who added the driver and has access to the required sources. Then the constant values are checked in for others to use. Consant extraction process is per-file/per-arch. That is, if I am adding a driver that is not present upstream and that works only on a single arch, I will check in constants only for that driver and for that arch.
69 lines
3.0 KiB
Plaintext
69 lines
3.0 KiB
Plaintext
# Copyright 2015 syzkaller project authors. All rights reserved.
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
include <sound/asound.h>
|
|
|
|
syz_open_dev$sndtimer(dev strconst["/dev/snd/timer"], id const[0], flags flags[open_flags]) fd[sndtimer]
|
|
|
|
ioctl$SNDRV_TIMER_IOCTL_PVERSION(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_PVERSION], arg ptr[out, int32])
|
|
ioctl$SNDRV_TIMER_IOCTL_NEXT_DEVICE(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_NEXT_DEVICE], arg ptr[in, snd_timer_id])
|
|
ioctl$SNDRV_TIMER_IOCTL_TREAD(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_TREAD], arg ptr[in, int32[0:1]])
|
|
ioctl$SNDRV_TIMER_IOCTL_GINFO(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_GINFO], arg ptr[in, snd_timer_ginfo])
|
|
ioctl$SNDRV_TIMER_IOCTL_GPARAMS(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_GPARAMS], arg ptr[in, snd_timer_gparams])
|
|
ioctl$SNDRV_TIMER_IOCTL_GSTATUS(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_GSTATUS], arg ptr[in, snd_timer_gstatus])
|
|
ioctl$SNDRV_TIMER_IOCTL_SELECT(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_SELECT], arg ptr[in, snd_timer_select])
|
|
ioctl$SNDRV_TIMER_IOCTL_INFO(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_INFO], arg buffer[out])
|
|
ioctl$SNDRV_TIMER_IOCTL_PARAMS(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_PARAMS], arg ptr[in, snd_timer_params])
|
|
ioctl$SNDRV_TIMER_IOCTL_STATUS(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_STATUS], arg buffer[out])
|
|
ioctl$SNDRV_TIMER_IOCTL_START(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_START])
|
|
ioctl$SNDRV_TIMER_IOCTL_STOP(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_STOP])
|
|
ioctl$SNDRV_TIMER_IOCTL_CONTINUE(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_CONTINUE])
|
|
ioctl$SNDRV_TIMER_IOCTL_PAUSE(fd fd[sndtimer], cmd const[SNDRV_TIMER_IOCTL_PAUSE])
|
|
|
|
snd_timer_flags = SNDRV_TIMER_PSFLG_AUTO, SNDRV_TIMER_PSFLG_EXCLUSIVE, SNDRV_TIMER_PSFLG_EARLY_EVENT
|
|
snd_timer_filter = SNDRV_TIMER_EVENT_RESOLUTION, SNDRV_TIMER_EVENT_TICK, SNDRV_TIMER_EVENT_START, SNDRV_TIMER_EVENT_STOP, SNDRV_TIMER_EVENT_CONTINUE, SNDRV_TIMER_EVENT_PAUSE, SNDRV_TIMER_EVENT_EARLY, SNDRV_TIMER_EVENT_SUSPEND, SNDRV_TIMER_EVENT_RESUME, SNDRV_TIMER_EVENT_MSTART, SNDRV_TIMER_EVENT_MSTOP, SNDRV_TIMER_EVENT_MCONTINUE, SNDRV_TIMER_EVENT_MPAUSE, SNDRV_TIMER_EVENT_MSUSPEND, SNDRV_TIMER_EVENT_MRESUME
|
|
|
|
snd_timer_ginfo {
|
|
tid snd_timer_id
|
|
flags int32
|
|
card int32
|
|
# TODO: the following two fields should be a fixed-size embeded string.
|
|
id array[int8, 64]
|
|
name array[int8, 80]
|
|
pad const[0, intptr]
|
|
res intptr
|
|
resmin intptr
|
|
resmax intptr
|
|
clients int32
|
|
pad array[const[0, int8], 32]
|
|
}
|
|
|
|
snd_timer_gparams {
|
|
tid snd_timer_id
|
|
periodn intptr
|
|
periodd intptr
|
|
pad array[const[0, int8], 32]
|
|
}
|
|
|
|
snd_timer_gstatus {
|
|
tid snd_timer_id
|
|
res intptr
|
|
resnum intptr
|
|
resden intptr
|
|
pad array[const[0, int8], 32]
|
|
}
|
|
|
|
snd_timer_select {
|
|
tid snd_timer_id
|
|
pad array[const[0, int8], 32]
|
|
}
|
|
|
|
snd_timer_params {
|
|
flags flags[snd_timer_flags, int32]
|
|
ticks int32
|
|
qsize int32
|
|
pad const[0, int32]
|
|
filter flags[snd_timer_filter, int32]
|
|
pad array[const[0, int8], 60]
|
|
}
|