mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
vduse: add VDUSE_GET_FEATURES ioctl
Add an ioctl to allow VDUSE instances to query the available features supported by the kernel module. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260707122502.239022-3-eperezma@redhat.com>
This commit is contained in:
parent
0ff906166f
commit
a596238c2a
|
|
@ -51,6 +51,9 @@
|
|||
|
||||
#define IRQ_UNBOUND -1
|
||||
|
||||
/* Supported VDUSE features */
|
||||
static const uint64_t vduse_features;
|
||||
|
||||
/*
|
||||
* VDUSE instance have not asked the vduse API version, so assume 0.
|
||||
*
|
||||
|
|
@ -2342,6 +2345,10 @@ static long vduse_ioctl(struct file *file, unsigned int cmd,
|
|||
ret = vduse_destroy_dev(name);
|
||||
break;
|
||||
}
|
||||
case VDUSE_GET_FEATURES:
|
||||
ret = put_user(vduse_features, (u64 __user *)argp);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ struct vduse_dev_config {
|
|||
*/
|
||||
#define VDUSE_DESTROY_DEV _IOW(VDUSE_BASE, 0x03, char[VDUSE_NAME_MAX])
|
||||
|
||||
/* Get the VDUSE supported features */
|
||||
#define VDUSE_GET_FEATURES _IOR(VDUSE_BASE, 0x04, __u64)
|
||||
|
||||
/* The ioctls for VDUSE device (/dev/vduse/$NAME) */
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user