summaryrefslogtreecommitdiff
blob: 90e030c3f5025ddfda29ab0691a3bd70c25228bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff -urN hwsetup-1.0.old/hwsetup.c hwsetup-1.0/hwsetup.c
--- hwsetup-1.0.old/hwsetup.c	2003-06-02 15:01:28.000000000 -0400
+++ hwsetup-1.0/hwsetup.c	2005-06-10 15:47:07.000000000 -0400
@@ -25,8 +25,8 @@
                 "(C) 2002 Klaus Knopper <knoppix@knopper.net>\n\n"
 
 #define CARDSDB "/usr/share/hwdata/Cards"
-#define XPATH "/usr/X11R6/bin/"
-#define XMODPATH "/usr/X11R6/lib/modules/drivers/"
+#define XPATH "/usr/bin/"
+#define XMODPATH "/usr/lib/modules/drivers/"
 
 #define VERBOSE_PRINT 1
 #define VERBOSE_PROMPT 2
@@ -103,7 +103,7 @@
 
 struct xinfo *getxinfo(struct device *d)
 {
- const char *xfree4="XFree86", *xvesa4="vesa";
+ const char *xorg="X", *xvesa="vesa";
  const char *xpath=XPATH;
  static struct xinfo xi;
  int rescanned=0;
@@ -113,10 +113,10 @@
   {
    const char *driver[]={"3DLabs",   "Mach64", "Mach32",    "Mach8",     "AGX",
                    "P9000", "S3 ViRGE",    "S3V",       "S3",     "W32",
-                   "8514",     "I128",   "SVGA", xfree4, NULL};
+                   "8514",     "I128",   "SVGA", xorg, NULL};
    const char *server[]={driver[0], driver[1], driver[2], driver[3], driver[4],
                    driver[5], "S3V",     driver[7], driver[8], driver[9],
-                   driver[10], driver[11],  driver[12], xfree4, NULL};
+                   driver[10], driver[11],  driver[12], xorg, NULL};
    if(!strncasecmp(d->driver,"Card:",5)) /* RedHat Cards-DB */
     { /* Kudzu "Cards" format */
      FILE *cardsdb;
@@ -189,9 +189,9 @@
          if(*xfree3server&&!*xi.xmodule)
            strncpy(xi.xserver,xfree3server,sizeof(xi.xserver));
          else
-           strncpy(xi.xserver,xfree4,sizeof(xi.xserver));
+           strncpy(xi.xserver,xorg,sizeof(xi.xserver));
         }
-       if(!*xi.xmodule) strcpy(xi.xmodule,xvesa4);
+       if(!*xi.xmodule) strcpy(xi.xmodule,xvesa);
        return &xi;
       }
     }
@@ -202,14 +202,14 @@
      if(strstr(d->driver,driver[i]))
       {
        char *xpos;
-       if((xpos=strstr(d->driver,xfree4))!=NULL) /* Check for XFree 4 */
+       if((xpos=strstr(d->driver,xorg))!=NULL)
         {
          char xm[32]="";
-         strcpy(xi.xserver,xfree4);
-         if(sscanf(xpos,"XFree86(%30[^)])",xm)==1)
+         strcpy(xi.xserver,xorg);
+         if(sscanf(xpos,"X(%30[^)])",xm)==1)
           strcpy(xi.xmodule,xm);
          else
-          strcpy(xi.xmodule,xvesa4);
+          strcpy(xi.xmodule,xvesa);
         }
        else
         {
@@ -240,22 +240,22 @@
    if(strstr(d->desc,"Trident")||strstr(d->desc,"TGUI")
           ||strstr(d->desc,"Cirrus")||strstr(d->desc,"clgd"))
     {
-     if(!strcmp(xi.xserver,xfree4))
+     if(!strcmp(xi.xserver,xorg))
       strncpy(xi.xopts,"-depth 16",sizeof(xi.xopts)-1);
      else
       strncpy(xi.xopts,"-bpp 16",sizeof(xi.xopts)-1);
     }
    else if(strstr(d->desc,"Savage 4")) /* S3 Inc.|Savage 4 */
     {
-     if(!strcmp(xi.xserver,xfree4))
+     if(!strcmp(xi.xserver,xorg))
       strncpy(xi.xopts,"-depth 32",sizeof(xi.xopts)-1);
      else
       strncpy(xi.xopts,"-bpp 32",sizeof(xi.xopts)-1);
     }
   }
  /* Fallback values */
- if(!*xi.xserver) strcpy(xi.xserver,xfree4);
- if(!*xi.xmodule) strcpy(xi.xmodule,xvesa4);
+ if(!*xi.xserver) strcpy(xi.xserver,xorg);
+ if(!*xi.xmodule) strcpy(xi.xmodule,xvesa);
  return &xi;
 }
 
@@ -421,7 +421,7 @@
 int writeconfig(char *name,struct device *d,int verbose)
 {
  FILE *f,*k;
- const char *kconfig="/etc/sysconfig/knoppix";
+ const char *kconfig="/etc/sysconfig/gentoo";
  unlink(name);
  if((f=fopen(name,"w"))==NULL)
   { /* Read-only filesystem on /etc ?! */