diff options
author | Christian Gmeiner <[email protected]> | 2016-11-09 15:50:07 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-11-15 15:59:23 +0000 |
commit | e4b01c97c490bba712b05a20d088842384833275 (patch) | |
tree | a00cff78558b6c12f77fa0bdd0b561b3982ea3a4 | |
parent | 1a21d21580965eff751414d140b3c176eeee2eb3 (diff) |
loader: fixup driver names if needed
This makes it possible to 'use' the imx-drm driver. Remeber that it
is not possible to have sysmbol names in C/C++ with a '-' in it.
Changes since v1:
- move the fix to loader.c
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]> (v1)
Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r-- | src/loader/loader.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c index fd05f08e64f..449ff54d137 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -413,5 +413,11 @@ loader_get_extensions_name(const char *driver_name) if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0) return NULL; + const size_t len = strlen(name); + for (size_t i = 0; i < len; i++) { + if (name[i] == '-') + name[i] = '_'; + } + return name; } |