diff options
Diffstat (limited to 'src/XF86Config-parser/Device.c')
-rw-r--r-- | src/XF86Config-parser/Device.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/XF86Config-parser/Device.c b/src/XF86Config-parser/Device.c index b730228..c759e64 100644 --- a/src/XF86Config-parser/Device.c +++ b/src/XF86Config-parser/Device.c @@ -514,3 +514,26 @@ void xconfigFormatPciBusString(char *str, int len, } str[len - 1] = '\0'; } + + +/* + * xconfigAddInactiveDevice() - add a device to the inactive section of + * the xconfig layout. + */ +void xconfigAddInactiveDevice(XConfigPtr config, XConfigLayoutPtr layout, + int device_n) +{ + XConfigDevicePtr device; + XConfigInactivePtr inac; + + device = add_device(config, -1, -1, -1, NULL, device_n, + "modesetting", "Unknown"); + + inac = xconfigAlloc(sizeof (XConfigInactiveRec)); + inac->next = NULL; + inac->device = device; + inac->device_name = xconfigStrdup(device->identifier); + xconfigAddListItem((GenericListPtr *)(&layout->inactives), + (GenericListPtr) inac); +} /* xconfigAddInactiveDevice() */ + |