search for: _ioc_dir

Displaying 5 results from an estimated 5 matches for "_ioc_dir".

2011 Jun 09
2
[PATCH 7/7] [v5] drivers/virt: introduce Freescale hypervisor management driver
...r; + long ret; + size_t size; + + /* Make sure the application is called the right driver. */ + if (_IOC_TYPE(cmd) != 0) { + pr_debug("fsl-hv: ioctl type %u should be 0\n", _IOC_TYPE(cmd)); + return -EINVAL; + } + + /* Make sure the application set the direction flag correctly. */ + if (_IOC_DIR(cmd) != (_IOC_READ | _IOC_WRITE)) { + pr_debug("fsl-hv: ioctl direction should be _IOWR\n"); + return -EINVAL; + } + + /* + * Make sure the application is passing the right structure to us. + * For backwards compatibility with older applications, we only check + * if the size is too...
2011 Jun 09
2
[PATCH 7/7] [v5] drivers/virt: introduce Freescale hypervisor management driver
...r; + long ret; + size_t size; + + /* Make sure the application is called the right driver. */ + if (_IOC_TYPE(cmd) != 0) { + pr_debug("fsl-hv: ioctl type %u should be 0\n", _IOC_TYPE(cmd)); + return -EINVAL; + } + + /* Make sure the application set the direction flag correctly. */ + if (_IOC_DIR(cmd) != (_IOC_READ | _IOC_WRITE)) { + pr_debug("fsl-hv: ioctl direction should be _IOWR\n"); + return -EINVAL; + } + + /* + * Make sure the application is passing the right structure to us. + * For backwards compatibility with older applications, we only check + * if the size is too...
2011 Jun 09
1
[PATCH 7/7] [v6] drivers/virt: introduce Freescale hypervisor management driver
...case FSL_HV_IOCTL_DOORBELL: + ret = ioctl_doorbell(arg); + break; + case FSL_HV_IOCTL_GETPROP: + ret = ioctl_dtprop(arg, 0); + break; + case FSL_HV_IOCTL_SETPROP: + ret = ioctl_dtprop(arg, 1); + break; + default: + pr_debug("fsl-hv: bad ioctl dir=%u type=%u cmd=%u size=%u\n", + _IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), + _IOC_SIZE(cmd)); + return -ENOTTY; + } + + return ret; +} + +/* Linked list of processes that have us open */ +static struct list_head db_list; + +/* spinlock for db_list */ +static DEFINE_SPINLOCK(db_list_lock); + +/* The size of the doorbell event queue....
2011 Jun 09
1
[PATCH 7/7] [v6] drivers/virt: introduce Freescale hypervisor management driver
...case FSL_HV_IOCTL_DOORBELL: + ret = ioctl_doorbell(arg); + break; + case FSL_HV_IOCTL_GETPROP: + ret = ioctl_dtprop(arg, 0); + break; + case FSL_HV_IOCTL_SETPROP: + ret = ioctl_dtprop(arg, 1); + break; + default: + pr_debug("fsl-hv: bad ioctl dir=%u type=%u cmd=%u size=%u\n", + _IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), + _IOC_SIZE(cmd)); + return -ENOTTY; + } + + return ret; +} + +/* Linked list of processes that have us open */ +static struct list_head db_list; + +/* spinlock for db_list */ +static DEFINE_SPINLOCK(db_list_lock); + +/* The size of the doorbell event queue....
2009 Jan 28
2
[PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
..._pad[4]; /* reserve area */ +}; + +#define F_IOC_RESVSP _IOW('X', 40, struct space_resv) +#define F_IOC_RESVSP64 _IOW('X', 42, struct space_resv) + +#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) +#define BROKEN_X86_ALIGNMENT + +#define _NATIVE_IOC(cmd, type) \ + _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) + +/* on ia32 l_start is on a 32-bit boundary */ +struct space_resv_32 { + __s16 l_type; + __s16 l_whence; + __s64 l_start __attribute__((packed)); + /* len == 0 means until end of file */ + __s64 l_len __attribute__((packed)); + __s32 l_sysi...