sgx: Add a simple cdev_pg_path method

This uses the constant string of "sgx" as the pathname

Reviewed by:	br, kib
Differential Revision:	https://reviews.freebsd.org/D49336
This commit is contained in:
John Baldwin 2025-03-27 16:44:55 -04:00
parent 1123986db5
commit faaa687646

View file

@ -593,10 +593,17 @@ sgx_pg_fault(vm_object_t object, vm_ooffset_t offset,
return (VM_PAGER_FAIL);
}
static void
sgx_pg_path(void *handle, char *path, size_t len)
{
strlcpy(path, "sgx", len);
}
static struct cdev_pager_ops sgx_pg_ops = {
.cdev_pg_ctor = sgx_pg_ctor,
.cdev_pg_dtor = sgx_pg_dtor,
.cdev_pg_fault = sgx_pg_fault,
.cdev_pg_path = sgx_pg_path,
};
static void