xserver: Branch 'master' - 2 commits

Alan Coopersmith alanc at kemper.freedesktop.org
Wed Feb 18 14:52:16 PST 2009


 hw/xfree86/common/xf86Config.c  |    8 ------
 hw/xfree86/common/xf86Globals.c |    1 
 hw/xfree86/common/xf86Priv.h    |    1 
 hw/xfree86/parser/Files.c       |   51 +++++-----------------------------------
 hw/xfree86/parser/xf86Parser.h  |    1 
 hw/xfree86/parser/xf86tokens.h  |    2 -
 6 files changed, 8 insertions(+), 56 deletions(-)

New commits:
commit e0a451eb7cc812f11db3614b730ba0f07d6ae18c
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue Feb 17 19:37:22 2009 -0800

    Obsolete InputDevices keyword in xorg.conf Files section
    
    Was only used to provide a list of input devices that XF86-Misc could use,
    now that XF86-Misc is gone, was parsed and logged, then completely ignored.
    
    (Depends on previous patch that introduces OBSOLETE_TOKEN in parser to
     make obsolete keywords like InputDevices & RgbPath be non-fatal errors.)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
    Acked-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 464f276..aa4ea05 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -644,14 +644,6 @@ configFiles(XF86ConfFilesPtr fileconf)
     strcpy(temp_path, start);
     xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf);
     xfree(log_buf);
-
-
-  if (fileconf && fileconf->file_inputdevs) {
-      xf86InputDeviceList = fileconf->file_inputdevs;
-      xf86Msg(X_CONFIG, "Input device list set to \"%s\"\n",
-	  xf86InputDeviceList);
-  }
-  
   
   /* ModulePath */
 
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index f414bd3..a14f20c 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -139,7 +139,6 @@ xf86InfoRec xf86Info = {
 #endif
 };
 const char *xf86ConfigFile = NULL;
-const char *xf86InputDeviceList = NULL;
 const char *xf86ModulePath = DEFAULT_MODULE_PATH;
 MessageType xf86ModPathFrom = X_DEFAULT;
 const char *xf86LogFile = DEFAULT_LOGPREFIX;
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 76e5b46..6d53277 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -76,7 +76,6 @@ extern _X_EXPORT  struct pci_slot_match xf86IsolateDevice;
 /* Other parameters */
 
 extern _X_EXPORT  xf86InfoRec xf86Info;
-extern _X_EXPORT  const char *xf86InputDeviceList;
 extern _X_EXPORT  const char *xf86ModulePath;
 extern _X_EXPORT  MessageType xf86ModPathFrom;
 extern _X_EXPORT  const char *xf86LogFile;
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index c352302..627ec70 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -70,11 +70,11 @@ static xf86ConfigSymTabRec FilesTab[] =
 	{ENDSECTION, "endsection"},
 	{FONTPATH, "fontpath"},
 	{MODULEPATH, "modulepath"},
-	{INPUTDEVICES, "inputdevices"},
 	{LOGFILEPATH, "logfile"},
 	{XKBDIR, "xkbdir"},
 	/* Obsolete keywords that aren't used but shouldn't cause errors: */
 	{OBSOLETE_TOKEN, "rgbpath"},
+	{OBSOLETE_TOKEN, "inputdevices"},
 	{-1, ""},
 };
 
@@ -151,33 +151,6 @@ xf86parseFilesSection (void)
 			strcat (ptr->file_modulepath, str);
 			xf86conffree (val.str);
 			break;
-		case INPUTDEVICES:
-			if (xf86getSubToken (&(ptr->file_comment)) != STRING)
-				Error (QUOTE_MSG, "InputDevices");
-			l = FALSE;
-			str = val.str;
-			if (ptr->file_inputdevs == NULL)
-			{
-				ptr->file_inputdevs = xf86confmalloc (1);
-				ptr->file_inputdevs[0] = '\0';
-				k = strlen (str) + 1;
-			}
-			else
-			{
-				k = strlen (ptr->file_inputdevs) + strlen (str) + 1;
-				if (ptr->file_inputdevs[strlen (ptr->file_inputdevs) - 1] != ',')
-				{
-					k++;
-					l = TRUE;
-				}
-			}
-			ptr->file_inputdevs = xf86confrealloc (ptr->file_inputdevs, k);
-			if (l)
-				strcat (ptr->file_inputdevs, ",");
-
-			strcat (ptr->file_inputdevs, str);
-			xf86conffree (val.str);
-			break;
 		case LOGFILEPATH:
 			if (xf86getSubToken (&(ptr->file_comment)) != STRING)
 				Error (QUOTE_MSG, "LogFile");
@@ -237,21 +210,6 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr)
 		}
 		fprintf (cf, "\tModulePath   \"%s\"\n", s);
 	}
-	if (ptr->file_inputdevs)
-	{
-		s = ptr->file_inputdevs;
-		p = index (s, ',');
-		while (p)
-		{
-			*p = '\000';
-			fprintf (cf, "\tInputDevices   \"%s\"\n", s);
-			*p = ',';
-			s = p;
-			s++;
-			p = index (s, ',');
-		}
-		fprintf (cf, "\tInputDevices   \"%s\"\n", s);
-	}
 	if (ptr->file_fontpath)
 	{
 		s = ptr->file_fontpath;
@@ -279,7 +237,6 @@ xf86freeFiles (XF86ConfFilesPtr p)
 
 	TestFree (p->file_logfile);
 	TestFree (p->file_modulepath);
-	TestFree (p->file_inputdevs);
 	TestFree (p->file_fontpath);
 	TestFree (p->file_comment);
 	TestFree (p->file_xkbdir);
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 29825dd..6030800 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -72,7 +72,6 @@ typedef struct
 {
 	char *file_logfile;
 	char *file_modulepath;
-	char *file_inputdevs;
 	char *file_fontpath;
 	char *file_comment;
 	char *file_xkbdir;
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index b2d2350..4c1d38c 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -99,7 +99,6 @@ typedef enum {
     /* File tokens */
     FONTPATH,
     MODULEPATH,
-    INPUTDEVICES,
     LOGFILEPATH,
     XKBDIR,
 
commit d2cf562bbad553d7f09b70202134f5b6ada0114e
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue Feb 17 18:48:52 2009 -0800

    Make RgbPath keyword in xorg.conf a non-fatal error
    
    Xorg shouldn't refuse to run just because the user has an xorg.conf that
    had the previously-used RgbPath keyword in it.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
    Acked-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index 2f77c0e..c352302 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -73,6 +73,8 @@ static xf86ConfigSymTabRec FilesTab[] =
 	{INPUTDEVICES, "inputdevices"},
 	{LOGFILEPATH, "logfile"},
 	{XKBDIR, "xkbdir"},
+	/* Obsolete keywords that aren't used but shouldn't cause errors: */
+	{OBSOLETE_TOKEN, "rgbpath"},
 	{-1, ""},
 };
 
@@ -189,6 +191,10 @@ xf86parseFilesSection (void)
 		case EOF_TOKEN:
 			Error (UNEXPECTED_EOF_MSG, NULL);
 			break;
+		case OBSOLETE_TOKEN:
+			xf86parseError (OBSOLETE_MSG, xf86tokenString ());
+			xf86getSubToken (&(ptr->file_comment));
+			break;
 		default:
 			Error (INVALID_KEYWORD_MSG, xf86tokenString ());
 			break;
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 8091f09..b2d2350 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -70,6 +70,7 @@
 
 typedef enum {
     /* errno-style tokens */
+    OBSOLETE_TOKEN	= -5,
     EOF_TOKEN		= -4,
     LOCK_TOKEN		= -3,
     ERROR_TOKEN		= -2,


More information about the xorg-commit mailing list