 +
 +	if (!list)
 +		return;
-+
-+	bsize = strlen(root) + 100;
++	
++	bsize = strlen(root) + 50;
 +	buffer = xf86confmalloc(bsize);
 +	while (list) {
++		printf("xf86addOptions(%s/%s, %s)\n", root, list->opt_name, list->opt_val);
++		
 +		snprintf(buffer, bsize, "%s/%s", root, list->opt_name);
 +
 +		key = keyNew(buffer,
 +				KEY_SWITCH_COMMENT, list->opt_comment,
 +				KEY_SWITCH_END);
-+
++		
 +		if (list->opt_val) keySetString(key,list->opt_val);
 +		/* else keySetString(key,"1"); */
 +

+
diff -Naur xc.orig/programs/Xserver/hw/xfree86/parser/Imakefile xc/programs/Xserver/hw/xfree86/parser/Imakefile
--- xc.orig/programs/Xserver/hw/xfree86/parser/Imakefile	2006-03-11 18:15:38.000000000 +0100
+++ xc/programs/Xserver/hw/xfree86/parser/Imakefile	2006-03-11 16:09:00.000000000 +0100
@@ -16,7 +16,12 @@
 DBMALLOCDEFINE=-DDBMALLOC
 #endif

+				KEY_SWITCH_VALUE, ptr->file_modulepath,
+				KEY_SWITCH_END);
+
+		ksAppend(ks,key);
+	} else {
+		/* No module path provided, set to the default one */
+		snprintf(buffer, bsize, "%s/Files/ModulePath", root);
+		key = keyNew(buffer,
+				KEY_SWITCH_VALUE, MODULE_DIR,
+				KEY_SWITCH_END);
+		
+		ksAppend(ks,key);
+	}
+
