From 28ef7f59416677be380561709197b04df0479bef Mon Sep 17 00:00:00 2001 From: David Nusinow Date: Thu, 11 Oct 2007 20:56:46 -0400 Subject: [PATCH] Re-enable validation of the screen section of xorg.conf This also fixes a problem where the server can't find the device section when it is specified in the screen section. --- hw/xfree86/parser/Screen.c | 14 +------------- hw/xfree86/parser/read.c | 4 ++-- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c index 4df2b0560..4524f17f6 100644 --- a/hw/xfree86/parser/Screen.c +++ b/hw/xfree86/parser/Screen.c @@ -498,12 +498,6 @@ xf86validateScreen (XF86ConfigPtr p) XF86ConfDevicePtr device; XF86ConfAdaptorLinkPtr adaptor; - if (!screen) - { - xf86validationError ("At least one Screen section is required."); - return (FALSE); - } - while (screen) { if (screen->scrn_obso_driver && !screen->scrn_identifier) @@ -512,13 +506,7 @@ xf86validateScreen (XF86ConfigPtr p) monitor = xf86findMonitor (screen->scrn_monitor_str, p->conf_monitor_lst); if (screen->scrn_monitor_str) { - if (!monitor) - { - xf86validationError (UNDEFINED_MONITOR_MSG, - screen->scrn_monitor_str, screen->scrn_identifier); - return (FALSE); - } - else + if (monitor) { screen->scrn_monitor = monitor; if (!xf86validateMonitor(p, screen)) diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c index a272f5ce3..308ee0304 100644 --- a/hw/xfree86/parser/read.c +++ b/hw/xfree86/parser/read.c @@ -82,8 +82,8 @@ xf86validateConfig (XF86ConfigPtr p) { /*if (!xf86validateDevice (p)) return FALSE;*/ - /*if (!xf86validateScreen (p)) - return FALSE;*/ + if (!xf86validateScreen (p)) + return FALSE; if (!xf86validateInput (p)) return FALSE; if (!xf86validateLayout (p))