Module Name:    src
Committed By:   christos
Date:           Sat Nov 16 04:10:33 UTC 2019

Modified Files:
        src/sys/external/bsd/drm2/drm: files.drmkms
Added Files:
        src/sys/external/bsd/drm2/drm: drm_stub.c

Log Message:
Add a stub for drm_ioctl() so that compat32 links with kernels without drmkms.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/drm/drm_stub.c
cvs rdiff -u -r1.30 -r1.31 src/sys/external/bsd/drm2/drm/files.drmkms

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/drm/files.drmkms
diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.30 src/sys/external/bsd/drm2/drm/files.drmkms:1.31
--- src/sys/external/bsd/drm2/drm/files.drmkms:1.30	Mon Aug 27 23:41:39 2018
+++ src/sys/external/bsd/drm2/drm/files.drmkms	Fri Nov 15 23:10:33 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.drmkms,v 1.30 2018/08/28 03:41:39 riastradh Exp $
+#	$NetBSD: files.drmkms,v 1.31 2019/11/16 04:10:33 christos Exp $
 
 include "external/bsd/drm2/linux/files.drmkms_linux"
 
@@ -100,3 +100,4 @@ file	external/bsd/drm2/drm/drm_sysfs.c	d
 file	external/bsd/drm2/dist/drm/drm_trace_points.c	drmkms
 file	external/bsd/drm2/drm/drm_vm.c	drmkms
 file	external/bsd/drm2/drm/drm_vma_manager.c	drmkms
+file	external/bsd/drm2/drm/drm_stub.c	!drmkms

Added files:

Index: src/sys/external/bsd/drm2/drm/drm_stub.c
diff -u /dev/null src/sys/external/bsd/drm2/drm/drm_stub.c:1.1
--- /dev/null	Fri Nov 15 23:10:33 2019
+++ src/sys/external/bsd/drm2/drm/drm_stub.c	Fri Nov 15 23:10:33 2019
@@ -0,0 +1,41 @@
+/*	$NetBSD: drm_stub.c,v 1.1 2019/11/16 04:10:33 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2019 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: drm_stub.c,v 1.1 2019/11/16 04:10:33 christos Exp $");
+
+#include <sys/errno.h>
+
+int drm_ioctl(int, unsigned long, ...);
+
+int
+drm_ioctl(int fd, unsigned long cmd, ...) {
+	return ENOSYS;
+}

Reply via email to