741f144c79
- Add full VirtIO GPU driver with command submission, resource management, VirtQueue implementation, and transport layer; includes diagnostic probes for resource_create_2d ERR_INVALID_RESOURCE_ID investigation - Expand libdrm Redox support with DRM ioctl wrappers (ADDFB, RMFB, CREATE_DUMB, MAP_DUMB, DESTROY_DUMB, GET_RESOURCES, GET_CONNECTOR, GET_CRTC, SET_CRTC, MODE_OBJ_GET_PROPERTIES, etc.) and xf86drm_redox.h - Add redox-drm scheme handlers for VirtIO GPU-specific DRM ioctls (VIRTGPU_RESOURCE_CREATE, VIRTGPU_MAP, VIRTGPU_WAIT, VIRTGPU_INFO, etc.) - Add display stack recipes: freetype2, lcms2, libdisplay-info, libepoxy, libxcvt - Fix KWin build (recipe.toml expanded, kf6-ksvg added) - Fix KF6 CMakeLists for cross-compilation (attica, kcmutils, kcolorscheme, kcompletion, kconfigwidgets, kdeclarative, kiconthemes, kitemmodels, kitemviews, kjobwidgets, ktextwidgets, kwayland, kxmlgui, kpty, solid) - Add Qt6 futex support patch - Add relibc patches: P3 strtold, P3 ld-so search path, P5 DRM ioctl removal - Add base P4 pcid config scheme patch - Update driver-manager hotplug/config, PCI config in redox-driver-sys - Update greeter compositor and KDE session scripts - Update AGENTS.md with zero-tolerance stubs policy and project knowledge
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
diff --git a/src/header/sys_ioctl/redox/mod.rs b/src/header/sys_ioctl/redox/mod.rs
|
|
index 8b3cf8f..c3e925e 100644
|
|
--- a/src/header/sys_ioctl/redox/mod.rs
|
|
+++ b/src/header/sys_ioctl/redox/mod.rs
|
|
@@ -4,7 +4,7 @@ use syscall;
|
|
|
|
use crate::{
|
|
error::{Errno, Result, ResultExt},
|
|
- header::{errno::EINVAL, fcntl, termios},
|
|
+ header::{errno::{EINVAL, ENOTTY}, fcntl, termios},
|
|
platform::{
|
|
Pal, Sys,
|
|
types::{c_int, c_ulong, c_ulonglong, c_void, pid_t},
|
|
@@ -166,25 +166,9 @@ unsafe fn ioctl_inner(fd: c_int, request: c_ulong, out: *mut c_void) -> Result<c
|
|
todo_skip!(0, "ioctl SIOCATMARK");
|
|
}
|
|
_ => {
|
|
- // See https://docs.kernel.org/userspace-api/ioctl/ioctl-decoding.html for details
|
|
- let dir = (request >> 30) & 0b11;
|
|
- let size = ((request >> 16) & 0x3FFF) as usize;
|
|
- let name = (((request >> 8) & 0xFF) as u8) as char;
|
|
- let func = (request & 0xFF) as u8;
|
|
- match name {
|
|
- 'd' => {
|
|
- let buf = match dir {
|
|
- 0b10 => IoctlBuffer::Read(out, size),
|
|
- 0b01 => IoctlBuffer::Write(out, size),
|
|
- 0b11 => IoctlBuffer::ReadWrite(out, size),
|
|
- _ => IoctlBuffer::None,
|
|
- };
|
|
- return unsafe { drm::ioctl(fd, func, buf) };
|
|
- }
|
|
- _ => {
|
|
- return Err(Errno(EINVAL));
|
|
- }
|
|
- }
|
|
+ // libdrm handles DRM ioctls via redox_drm_simple_ioctl() with
|
|
+ // its own scheme:drm wire format; relibc must not intercept.
|
|
+ return Err(Errno(ENOTTY));
|
|
}
|
|
}
|
|
Ok(0)
|