From b744dafae926f6d7132bd0d13851efe537fa7647 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Mon, 13 Nov 2023 15:13:47 -0800 Subject: [PATCH] ffi: Add public `set_version` function Somehow Cargo didn't complain about the previous generated ioctl function being unused, but does now with the macro based on Rustix. Taking an `&mut` matches the API of `drmSetInterfaceVersion` in libdrm, so it makes sense to just stick with that. --- drm-ffi/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drm-ffi/src/lib.rs b/drm-ffi/src/lib.rs index cb37515..4be9614 100644 --- a/drm-ffi/src/lib.rs +++ b/drm-ffi/src/lib.rs @@ -147,6 +147,11 @@ pub fn set_capability(fd: BorrowedFd<'_>, cty: u64, val: bool) -> io::Result, version: &mut drm_set_version) -> io::Result<()> { + unsafe { ioctl::set_version(fd, version) } +} + /// Gets the driver version for this device. pub fn get_version( fd: BorrowedFd<'_>,