From: Eric Anholt Date: Mon, 20 Jul 2020 18:21:36 +0000 (-0700) Subject: drm-shim: Return -EINVAL instead of abort()ing on unknown ioctls. X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=75b1f3d39df4f098b3674adee52a9db41c1fa96a drm-shim: Return -EINVAL instead of abort()ing on unknown ioctls. I had this as abort() in my original implementation since I was doing drm-shim and my kernel driver in parallel based around using a SW simulator, and I wanted to always update both, but it means that people's new feature detection code can easily end up breaing their drm-shim shader-db runs (such as intel's kernel_has_dynamic_config_support() checking for -ENOENT instead of -EINVAL for a feature, which showed up on my personal runner but not fd.o's for reasons I'm unclear on). Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/drm-shim/device.c b/src/drm-shim/device.c index 2ad25344087..97bb1183ea8 100644 --- a/src/drm-shim/device.c +++ b/src/drm-shim/device.c @@ -261,7 +261,7 @@ drm_shim_ioctl(int fd, unsigned long request, void *arg) nr, request); } - abort(); + return -EINVAL; } void