Don't write out empty sections from the parser.
This commit is contained in:
parent
1f6741db19
commit
72b477f964
|
@ -107,13 +107,19 @@ doWriteConfigFile (const char *filename, XF86ConfigPtr cptr)
|
|||
|
||||
xf86printLayoutSection (cf, cptr->conf_layout_lst);
|
||||
|
||||
fprintf (cf, "Section \"Files\"\n");
|
||||
xf86printFileSection (cf, cptr->conf_files);
|
||||
fprintf (cf, "EndSection\n\n");
|
||||
if (cptr->conf_files != NULL)
|
||||
{
|
||||
fprintf (cf, "Section \"Files\"\n");
|
||||
xf86printFileSection (cf, cptr->conf_files);
|
||||
fprintf (cf, "EndSection\n\n");
|
||||
}
|
||||
|
||||
fprintf (cf, "Section \"Module\"\n");
|
||||
xf86printModuleSection (cf, cptr->conf_modules);
|
||||
fprintf (cf, "EndSection\n\n");
|
||||
if (cptr->conf_modules != NULL)
|
||||
{
|
||||
fprintf (cf, "Section \"Module\"\n");
|
||||
xf86printModuleSection (cf, cptr->conf_modules);
|
||||
fprintf (cf, "EndSection\n\n");
|
||||
}
|
||||
|
||||
xf86printVendorSection (cf, cptr->conf_vendor_lst);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user