From e3e12221111886c4063d2da5d70d3830c56d39e2 Mon Sep 17 00:00:00 2001 From: David Nusinow Date: Thu, 11 Oct 2007 21:27:07 -0400 Subject: [PATCH] Don't bother validating the Device section of the conf file All the previous tests can now be recovered from if not specified. --- hw/xfree86/parser/Configint.h | 2 -- hw/xfree86/parser/Device.c | 20 -------------------- hw/xfree86/parser/read.c | 2 -- 3 files changed, 24 deletions(-) diff --git a/hw/xfree86/parser/Configint.h b/hw/xfree86/parser/Configint.h index c20c1958c..1440cbbeb 100644 --- a/hw/xfree86/parser/Configint.h +++ b/hw/xfree86/parser/Configint.h @@ -204,8 +204,6 @@ else\ "This section must have an Identifier line." #define ONLY_ONE_MSG \ "This section must have only one of either %s line." -#define UNDEFINED_DRIVER_MSG \ -"Device section \"%s\" must have a Driver line." #define UNDEFINED_INPUTDRIVER_MSG \ "InputDevice section \"%s\" must have a Driver line." #define INVALID_GAMMA_MSG \ diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c index 6ad5601b5..216789fc1 100644 --- a/hw/xfree86/parser/Device.c +++ b/hw/xfree86/parser/Device.c @@ -357,26 +357,6 @@ xf86freeDeviceList (XF86ConfDevicePtr ptr) } } -int -xf86validateDevice (XF86ConfigPtr p) -{ - XF86ConfDevicePtr device = p->conf_device_lst; - - if (!device) { - xf86validationError ("At least one Device section is required."); - return (FALSE); - } - - while (device) { - if (!device->dev_driver) { - xf86validationError (UNDEFINED_DRIVER_MSG, device->dev_identifier); - return (FALSE); - } - device = device->list.next; - } - return (TRUE); -} - XF86ConfDevicePtr xf86findDevice (const char *ident, XF86ConfDevicePtr p) { diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c index 308ee0304..430da0a5a 100644 --- a/hw/xfree86/parser/read.c +++ b/hw/xfree86/parser/read.c @@ -80,8 +80,6 @@ static xf86ConfigSymTabRec TopLevelTab[] = static int xf86validateConfig (XF86ConfigPtr p) { - /*if (!xf86validateDevice (p)) - return FALSE;*/ if (!xf86validateScreen (p)) return FALSE; if (!xf86validateInput (p))