Update loadmod.c
This commit is contained in:
parent
45b1e6e0bb
commit
e18514cc97
|
@ -417,6 +417,8 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
|
|||
{
|
||||
int vercode[4];
|
||||
long ver = data->xf86version;
|
||||
/* Always ignore ABI mismatches by default */
|
||||
LoaderOptions |= LDR_OPT_ABI_MISMATCH_NONFATAL;
|
||||
MessageType errtype;
|
||||
|
||||
LogMessage(X_INFO, "Module %s: vendor=\"%s\"\n",
|
||||
|
@ -458,26 +460,18 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
|
|||
vermaj = GET_ABI_MAJOR(ver);
|
||||
vermin = GET_ABI_MINOR(ver);
|
||||
if (abimaj != vermaj) {
|
||||
if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
|
||||
errtype = X_WARNING;
|
||||
else
|
||||
errtype = X_ERROR;
|
||||
LogMessageVerb(errtype, 0, "%s: module ABI major version (%d) "
|
||||
"doesn't match the server's version (%d)\n",
|
||||
module, abimaj, vermaj);
|
||||
if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
|
||||
return FALSE;
|
||||
}
|
||||
else if (abimin > vermin) {
|
||||
if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
|
||||
errtype = X_WARNING;
|
||||
else
|
||||
errtype = X_ERROR;
|
||||
LogMessageVerb(errtype, 0, "%s: module ABI minor version (%d) "
|
||||
"is newer than the server's version (%d)\n",
|
||||
module, abimin, vermin);
|
||||
if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
|
||||
return FALSE;
|
||||
/* Always warn, never error out and crash X server */
|
||||
LogMessageVerb(X_WARNING, 0,
|
||||
"%s: module ABI major version (%d) "
|
||||
"doesn't match the server's version (%d)\n",
|
||||
module, abimaj, vermaj);
|
||||
}
|
||||
else if (abimin > vermin) {
|
||||
/* Ditto for minor‐version */
|
||||
LogMessageVerb(X_WARNING, 0,
|
||||
"%s: module ABI minor version (%d) "
|
||||
"is newer than the server's version (%d)\n",
|
||||
module, abimin, vermin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue