rpms/libdrm/F-9 libdrm-2.4.0-no-bc.patch, NONE, 1.1 libdrm.spec, 1.39, 1.40

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Tue Apr 29 13:51:50 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/libdrm/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3861

Modified Files:
	libdrm.spec 
Added Files:
	libdrm-2.4.0-no-bc.patch 
Log Message:
* Tue Apr 29 2008 Adam Jackson <ajax at redhat.com> 2.4.0-0.11
- libdrm-2.4.0-no-bc.patch: Delete the /proc/dri BC code.  It's not needed,
  and the kernel implementation is sufficiently broken that we should avoid
  ever touching it.


libdrm-2.4.0-no-bc.patch:

--- NEW FILE libdrm-2.4.0-no-bc.patch ---
diff -up libdrm-20080303/libdrm/xf86drm.c.jx libdrm-20080303/libdrm/xf86drm.c
--- libdrm-20080303/libdrm/xf86drm.c.jx	2008-03-03 01:49:49.000000000 -0500
+++ libdrm-20080303/libdrm/xf86drm.c	2008-04-29 09:40:33.000000000 -0400
@@ -380,11 +380,6 @@ int drmAvailable(void)
     int           fd;
 
     if ((fd = drmOpenMinor(0, 1)) < 0) {
-#ifdef __linux__
-	/* Try proc for backward Linux compatibility */
-	if (!access("/proc/dri/0", R_OK))
-	    return 1;
-#endif
 	return 0;
     }
     
@@ -503,38 +498,6 @@ static int drmOpenByName(const char *nam
 	}
     }
 
-#ifdef __linux__
-    /* Backward-compatibility /proc support */
-    for (i = 0; i < 8; i++) {
-	char proc_name[64], buf[512];
-	char *driver, *pt, *devstring;
-	int  retcode;
-	
-	sprintf(proc_name, "/proc/dri/%d/name", i);
-	if ((fd = open(proc_name, 0, 0)) >= 0) {
-	    retcode = read(fd, buf, sizeof(buf)-1);
-	    close(fd);
-	    if (retcode) {
-		buf[retcode-1] = '\0';
-		for (driver = pt = buf; *pt && *pt != ' '; ++pt)
-		    ;
-		if (*pt) { /* Device is next */
-		    *pt = '\0';
-		    if (!strcmp(driver, name)) { /* Match */
-			for (devstring = ++pt; *pt && *pt != ' '; ++pt)
-			    ;
-			if (*pt) { /* Found busid */
-			    return drmOpenByBusid(++pt);
-			} else { /* No busid */
-			    return drmOpenDevice(strtol(devstring, NULL, 0),i);
-			}
-		    }
-		}
-	    }
-	}
-    }
-#endif
-
     return -1;
 }
 


Index: libdrm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libdrm/F-9/libdrm.spec,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- libdrm.spec	19 Mar 2008 05:32:35 -0000	1.39
+++ libdrm.spec	29 Apr 2008 13:51:12 -0000	1.40
@@ -3,7 +3,7 @@
 Summary: Direct Rendering Manager runtime library
 Name: libdrm
 Version: 2.4.0
-Release: 0.10%{?dist}
+Release: 0.11%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://dri.sourceforge.net
@@ -22,6 +22,7 @@
 # udev vs pam.console vs hal vs xml vs ConsoleKit
 # - funk that just bash it direct for now -
 Patch3: libdrm-make-dri-perms-okay.patch
+Patch4: libdrm-2.4.0-no-bc.patch
 
 %description
 Direct Rendering Manager runtime library
@@ -39,6 +40,7 @@
 %patch1 -p1 -b .modesetting
 #patch2 -p1 -b .mknod
 %patch3 -p1 -b .forceperms
+%patch4 -p1 -b .no-bc
 
 %build
 autoreconf -v --install || exit 1
@@ -96,6 +98,11 @@
 %{_libdir}/pkgconfig/libdrm.pc
 
 %changelog
+* Tue Apr 29 2008 Adam Jackson <ajax at redhat.com> 2.4.0-0.11
+- libdrm-2.4.0-no-bc.patch: Delete the /proc/dri BC code.  It's not needed,
+  and the kernel implementation is sufficiently broken that we should avoid
+  ever touching it.
+
 * Wed Mar 19 2008 Dave Airlie <airlied at redhat.com> 2.4.0-0.10
 - force libdrm to make the node perms useful to everyone 
 




More information about the scm-commits mailing list