summaryrefslogtreecommitdiff
path: root/hw/xfree86/loader/loadmod.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-08-23 13:43:42 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-08-24 08:30:10 +1000
commit25e4f9ee68b99c2810efdb6cd8c56affa45e1fea (patch)
treedb25c18a5ff4809df9210f958299083dbd192170 /hw/xfree86/loader/loadmod.c
parentbe334f42a198a25e817e6dab43dd0e30aa1cd4f8 (diff)
xfree86: print the module name together with the load failure message
We're happily printing the error to stdout but not which module caused it... That's in the Xorg.log but that's at least one click away. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'hw/xfree86/loader/loadmod.c')
-rw-r--r--hw/xfree86/loader/loadmod.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 702d4e747..8bf6836d6 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -626,9 +626,9 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
else
errtype = X_ERROR;
xf86MsgVerb(errtype, 0,
- "module ABI major version (%d) doesn't"
+ "%s: module ABI major version (%d) doesn't"
" match the server's version (%d)\n",
- abimaj, vermaj);
+ module, abimaj, vermaj);
if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
return FALSE;
}
@@ -638,9 +638,9 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
else
errtype = X_ERROR;
xf86MsgVerb(errtype, 0,
- "module ABI minor version (%d) is "
+ "%s: module ABI minor version (%d) is "
"newer than the server's version "
- "(%d)\n", abimin, vermin);
+ "(%d)\n", module, abimin, vermin);
if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
return FALSE;
}
@@ -651,24 +651,24 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
if (req) {
if (req->majorversion != MAJOR_UNSPEC) {
if (data->majorversion != req->majorversion) {
- xf86MsgVerb(X_WARNING, 2, "module major version (%d) "
+ xf86MsgVerb(X_WARNING, 2, "%s: module major version (%d) "
"doesn't match required major version (%d)\n",
- data->majorversion, req->majorversion);
+ module, data->majorversion, req->majorversion);
return FALSE;
}
else if (req->minorversion != MINOR_UNSPEC) {
if (data->minorversion < req->minorversion) {
- xf86MsgVerb(X_WARNING, 2, "module minor version (%d) "
+ xf86MsgVerb(X_WARNING, 2, "%s: module minor version (%d) "
"is less than the required minor version (%d)\n",
- data->minorversion, req->minorversion);
+ module, data->minorversion, req->minorversion);
return FALSE;
}
else if (data->minorversion == req->minorversion &&
req->patchlevel != PATCH_UNSPEC) {
if (data->patchlevel < req->patchlevel) {
- xf86MsgVerb(X_WARNING, 2, "module patch level (%d) "
+ xf86MsgVerb(X_WARNING, 2, "%s: module patch level (%d) "
"is less than the required patch level (%d)\n",
- data->patchlevel, req->patchlevel);
+ module, data->patchlevel, req->patchlevel);
return FALSE;
}
}
@@ -677,8 +677,9 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
if (req->moduleclass) {
if (!data->moduleclass ||
strcmp(req->moduleclass, data->moduleclass)) {
- xf86MsgVerb(X_WARNING, 2, "Module class (%s) doesn't match "
+ xf86MsgVerb(X_WARNING, 2, "%s: Module class (%s) doesn't match "
"the required class (%s)\n",
+ module,
data->moduleclass ? data->moduleclass : "<NONE>",
req->moduleclass);
return FALSE;
@@ -686,8 +687,9 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
}
else if (req->abiclass != ABI_CLASS_NONE) {
if (!data->abiclass || strcmp(req->abiclass, data->abiclass)) {
- xf86MsgVerb(X_WARNING, 2, "ABI class (%s) doesn't match the "
+ xf86MsgVerb(X_WARNING, 2, "%s: ABI class (%s) doesn't match the "
"required ABI class (%s)\n",
+ module,
data->abiclass ? data->abiclass : "<NONE>",
req->abiclass);
return FALSE;
@@ -702,15 +704,16 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
maj = GET_ABI_MAJOR(data->abiversion);
min = GET_ABI_MINOR(data->abiversion);
if (maj != reqmaj) {
- xf86MsgVerb(X_WARNING, 2, "ABI major version (%d) doesn't "
+ xf86MsgVerb(X_WARNING, 2, "%s: ABI major version (%d) doesn't "
"match the required ABI major version (%d)\n",
- maj, reqmaj);
+ module, maj, reqmaj);
return FALSE;
}
/* XXX Maybe this should be the other way around? */
if (min > reqmin) {
- xf86MsgVerb(X_WARNING, 2, "module ABI minor version (%d) "
- "is newer than that available (%d)\n", min, reqmin);
+ xf86MsgVerb(X_WARNING, 2, "%s: module ABI minor version (%d) "
+ "is newer than that available (%d)\n",
+ module, min, reqmin);
return FALSE;
}
}