Subject: Re: aperture, broken again?
To: Stephen Ma <stephenm@employees.org>
From: Rick Kelly <rmk@toad.rmkhome.com>
List: current-users
Date: 10/11/2002 11:44:23
Stephen Ma said:

>Below is a quick patch for the aperture driver that includes the
>previous change for the devsw stuff. It should be used in place of
>pkgsrc/sysutils/aperture/patches/patch-ab (assuming you're building
>from pkgsrc). This patch has been extensively untested.

This patch fails with pkgsrc downloaded from ftp.netbsd.org last night.

xf86_mod.c.rej
***************
*** 31,37 ****
         0,
         seltrue, xf86mmap, 0};
  
  MOD_DEV("xf86", LM_DT_CHAR, -1, &newdev)
  
  char *xf86_major_version = "2";
  char *xf86_minor_version = "0";
--- 37,47 ----
         0,
         seltrue, xf86mmap, 0};
  
+ #if __NetBSD_Version__ >= 106080000
+ MOD_DEV("xf86", "xf86ap", NULL, -1, &newdev, -1)
+ #else
  MOD_DEV("xf86", LM_DT_CHAR, -1, &newdev)
+ #endif
  
  char *xf86_major_version = "2";
  char *xf86_minor_version = "0";
***************
*** 76,82 ****
  
         case LKM_E_UNLOAD:
                 /* Free allocated memory */
-                free(mem_range_softc.mr_desc, M_MEMDESC);
                 break;
  
         case LKM_E_STAT:
--- 86,95 ----
  
         case LKM_E_UNLOAD:
                 /* Free allocated memory */
+                if (mem_range_softc.mr_desc != NULL) {
+                        free(mem_range_softc.mr_desc, M_MEMDESC);
+                        mem_range_softc.mr_desc = NULL;
+                }
                 break;
  
         case LKM_E_STAT:

Is anyone working on this? I really need to get X up on this machine.

-- 
Rick Kelly  rmk@rmkhome.com  www.rmkhome.com