コード例 #1
0
ファイル: v4l.c プロジェクト: bilboed/wine
static int xioctl(int fd, int request, void * arg)
{
    int r;

    do {
        r = video_ioctl (fd, request, arg);
    } while (-1 == r && EINTR == errno);

    return r;
}
コード例 #2
0
ファイル: dvb.c プロジェクト: GWARDAR/OpenPLi-1
static int
dvbdev_ioctl(struct dvb_device *dvbdev, int num,
             struct file *file,	unsigned int cmd, unsigned long arg)
{
	struct dvb_struct *dvb=(struct dvb_struct *) dvbdev->priv;
	//void *parg=(void *)arg;
	int type=num2type(dvb, num);

	switch (type) {
	case DVB_DEVICE_VIDEO_0:
		return video_ioctl(dvbdev, file, cmd, arg);

	case DVB_DEVICE_AUDIO_0:
		return audio_ioctl(dvbdev, file, cmd, arg);

	case DVB_DEVICE_FRONTEND_0:
		return frontend_ioctl(dvbdev, file, cmd, arg);

	case DVB_DEVICE_SEC_0:
		return sec_ioctl(dvbdev, file, cmd, arg);

	case DVB_DEVICE_DEMUX_0:
		return demux_ioctl(dvbdev, file, cmd, arg);

	case DVB_DEVICE_DVR_0:
		return DmxDevDVRIoctl(&dvb->dmxdev, file, cmd, arg);

	case DVB_DEVICE_CA_0:
		return ca_ioctl(dvbdev, file, cmd, arg);

	case DVB_DEVICE_NET_0:
		return net_ioctl(dvbdev, file, cmd, arg);

	default:
		return -EOPNOTSUPP;
	}
	return 0;
}