open-src/xserver/xorg/rgbpath.patch
changeset 705 24ca414edbff
parent 704 f9b973ecc909
child 706 43bb5cf562a2
equal deleted inserted replaced
704:f9b973ecc909 705:24ca414edbff
     1 From 7c6e0368e315b5e2f51d3b8d2f1d10c8143abeff Mon Sep 17 00:00:00 2001
       
     2 From: Alan Coopersmith <[email protected]>
       
     3 Date: Tue, 17 Feb 2009 18:48:52 -0800
       
     4 Subject: [PATCH] Make RGBPath keyword in xorg.conf a non-fatal error
       
     5 
       
     6 Xorg shouldn't refuse to run just because the user has an xorg.conf that
       
     7 had the previously-used RGBPath keyword in it.
       
     8 
       
     9 Signed-off-by: Alan Coopersmith <[email protected]>
       
    10 ---
       
    11  hw/xfree86/parser/Files.c      |    6 ++++++
       
    12  hw/xfree86/parser/xf86tokens.h |    1 +
       
    13  2 files changed, 7 insertions(+), 0 deletions(-)
       
    14 
       
    15 diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
       
    16 index 3777432..11c635b 100644
       
    17 --- a/hw/xfree86/parser/Files.c
       
    18 +++ b/hw/xfree86/parser/Files.c
       
    19 @@ -72,6 +72,8 @@ static xf86ConfigSymTabRec FilesTab[] =
       
    20  	{MODULEPATH, "modulepath"},
       
    21  	{INPUTDEVICES, "inputdevices"},
       
    22  	{LOGFILEPATH, "logfile"},
       
    23 +	/* Obsolete keywords that aren't used but shouldn't cause errors: */
       
    24 +	{OBSOLETE_TOKEN, "rgbpath"},
       
    25  	{-1, ""},
       
    26  };
       
    27  
       
    28 @@ -183,6 +185,10 @@ xf86parseFilesSection (void)
       
    29  		case EOF_TOKEN:
       
    30  			Error (UNEXPECTED_EOF_MSG, NULL);
       
    31  			break;
       
    32 +		case OBSOLETE_TOKEN:
       
    33 +			xf86parseError (OBSOLETE_MSG, xf86tokenString ());
       
    34 +			xf86getSubToken (&(ptr->file_comment));
       
    35 +			break;
       
    36  		default:
       
    37  			Error (INVALID_KEYWORD_MSG, xf86tokenString ());
       
    38  			break;
       
    39 diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
       
    40 index 6e4fdea..dd67f72 100644
       
    41 --- a/hw/xfree86/parser/xf86tokens.h
       
    42 +++ b/hw/xfree86/parser/xf86tokens.h
       
    43 @@ -70,6 +70,7 @@
       
    44  
       
    45  typedef enum {
       
    46      /* errno-style tokens */
       
    47 +    OBSOLETE_TOKEN	= -5,
       
    48      EOF_TOKEN		= -4,
       
    49      LOCK_TOKEN		= -3,
       
    50      ERROR_TOKEN		= -2,
       
    51 -- 
       
    52 1.5.6.5
       
    53