mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
xfree86: add xf86OptionListDuplicate()
Does what it says on the box. Some drivers need to duplicate option lists from the original device to ensure that devices created by the driver (driver-internal hotplugging) have the same list of options as the original device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
parent
9dca441670
commit
693e92d404
2 changed files with 20 additions and 0 deletions
|
|
@ -136,6 +136,25 @@ xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Duplicate the option list passed in. The returned pointer will be a newly
|
||||
* allocated option list and must be freed by the caller.
|
||||
*/
|
||||
pointer
|
||||
xf86OptionListDuplicate(pointer options)
|
||||
{
|
||||
pointer o = NULL;
|
||||
|
||||
while (options)
|
||||
{
|
||||
o = xf86AddNewOption(o, xf86OptionName(options), xf86OptionValue(options));
|
||||
options = xf86nextOption(options);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
/* Created for new XInput stuff -- essentially extensions to the parser */
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue