Filewatcher File Search File Search
Catalog
Content Search
» » » » » » XFree86-4.3.0-2.90.55.src.rpm » Content »
pkg://XFree86-4.3.0-2.90.55.src.rpm:66874254/  info  HEADER  downloads

XFree86 - The basic fonts, programs and docs for an X workstation.…  more info»

XFree86-4.2.99.901-redhat-custom-startup.patch

--- xc/programs/Xserver/hw/xfree86/common/xf86Init.c.redhat-custom-startup	2003-02-04 02:57:42.000000000 -0500
+++ xc/programs/Xserver/hw/xfree86/common/xf86Init.c	2003-02-04 04:24:05.000000000 -0500
@@ -65,6 +65,9 @@
 static void xf86PrintBanner(void);
 static void xf86PrintMarkers(void);
 static void xf86RunVtInit(void);
+#ifdef XF86_REDHAT_CUSTOM
+static void rhPrintOSKernelString(void);
+#endif
 
 #ifdef DO_CHECK_BETA
 static int extraDays = 0;
@@ -115,6 +118,42 @@
 	0
 };
 
+#ifdef XF86_REDHAT_CUSTOM
+#define RHMAXBUF 1024
+/* This is a rather ugly hack, but it does the job for now.  It will be
+ * replaced by something much nicer in the future.
+ */
+static void rhPrintOSKernelString(void)
+{
+  int tainted = -1;
+  char *buf;
+  FILE *infile;
+
+  if (NULL != (buf = (char *) calloc(1, RHMAXBUF)))
+  {
+    if( (infile = fopen("/proc/sys/kernel/tainted", "r")) != NULL)
+    {
+      fgets(buf, RHMAXBUF, infile);
+      fclose(infile);
+      tainted = atoi(buf);
+    }
+    if( (infile = fopen("/proc/version", "r")) != NULL)
+    {
+      if(NULL == fgets(buf, RHMAXBUF, infile))
+        sprintf(buf, "(unable to determine)");
+      else
+        buf[strlen(buf) - 1] = '\0';
+ 
+      fclose(infile);
+    }
+  }
+  ErrorF("OS Kernel: %s %s%s\n", (buf != NULL)? buf : "(unable to determine)",
+                                 (tainted & 0x01) ? "P" : "",
+                                 (tainted & 0x02) ? "F" : "");
+  free(buf);
+}
+#endif
+
 static Bool
 xf86CreateRootWindow(WindowPtr pWin)
 {
@@ -1677,6 +1716,9 @@
 #ifdef XFree86LOADER
   ErrorF("Module Loader present\n");
 #endif
+#ifdef XF86_REDHAT_CUSTOM
+  rhPrintOSKernelString();
+#endif
 }
 
 static void
--- xc/programs/Xserver/hw/xfree86/common/Imakefile.redhat-custom-startup	2003-02-04 02:57:42.000000000 -0500
+++ xc/programs/Xserver/hw/xfree86/common/Imakefile	2003-02-04 04:26:15.000000000 -0500
@@ -183,6 +183,9 @@
 CUSTOMVERSION = XFree86CustomVersion
  CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)'
 #endif
+#if defined(XFree86RedHatCustom)
+REDHAT_CUSTOM = -DXF86_REDHAT_CUSTOM
+#endif
 #if defined(BuilderString)
   BUILDERSTRING = BuilderString
   BUILDERMSG = -DBUILDERSTRING='$(BUILDERSTRING)'
@@ -208,7 +211,7 @@
 AllTarget($(OFILES))
 
 SpecialCObjectRule(xf86Bus,NullParameter,$(BUGMSG) $(VGAINCLUDES))
-SpecialCObjectRule(xf86Init,$(ICONFIGFILES),$(OSNAMEDEF) $(BUILDERMSG) $(BUGMSG) $(CUSTOMVERDEF) $(XORGREL_DEF) $(EXT_DEFINES) $(BETADEFS) $(MDEBUGDEFS))
+SpecialCObjectRule(xf86Init,$(ICONFIGFILES),$(OSNAMEDEF) $(BUILDERMSG) $(BUGMSG) $(CUSTOMVERDEF) $(REDHAT_CUSTOM) $(XORGREL_DEF) $(EXT_DEFINES) $(BETADEFS) $(MDEBUGDEFS))
 SpecialCObjectRule(xf86Events,$(ICONFIGFILES),$(EXT_DEFINES) $(MDEBUGDEFS))
 SpecialCObjectRule(xf86Globals,$(ICONFIGFILES),$(EXT_DEFINES) $(MODPATHDEFINES) $(LOGDEFINES))
 SpecialCObjectRule(xf86Config,$(ICONFIGFILES),$(XCONFIGDEFINES))
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com