h3/h5, hwcInit, GLIDE_INIT_HWC: set errorString in case of failure.

This commit is contained in:
Ozkan Sezer
2021-08-08 20:23:02 +03:00
parent 43fbe0bf3c
commit 5e6b39fb2b
3 changed files with 15 additions and 2 deletions

View File

@@ -878,7 +878,11 @@ hwcInit(FxU32 vID, FxU32 dID)
&hInfo.boardInfo[i].pciInfo.pciBaseAddr[3]); &hInfo.boardInfo[i].pciInfo.pciBaseAddr[3]);
} }
} }
if (!hInfo.nBoards) {
const char *error = pciGetErrorCode() ? pciGetErrorString() :
"Voodoo Banshee or Voodoo3 not detected\n";
strcpy(errorString, error);
}
} }
#endif /* HWC_EXT_INIT */ #endif /* HWC_EXT_INIT */
if (hInfo.nBoards) if (hInfo.nBoards)

View File

@@ -1052,7 +1052,11 @@ hwcInit(FxU32 vID, FxU32 dID)
(void *) hInfo.boardInfo[i].hMon); (void *) hInfo.boardInfo[i].hMon);
} }
} }
if (!hInfo.nBoards) {
const char *error = pciGetErrorCode() ? pciGetErrorString() :
"Voodoo Banshee or Voodoo3 not detected\n";
strcpy(errorString, error);
}
} }
#endif /* HWC_EXT_INIT */ #endif /* HWC_EXT_INIT */
if (hInfo.nBoards) if (hInfo.nBoards)

View File

@@ -1778,6 +1778,11 @@ hwcInit(FxU32 vID, FxU32 dID)
(void *) hInfo.boardInfo[i].hMon); (void *) hInfo.boardInfo[i].hMon);
} }
} }
if (!hInfo.nBoards) {
const char *error = pciGetErrorCode() ? pciGetErrorString() :
"Voodoo Banshee or Voodoo3/4/5 not detected\n";
strcpy(errorString, error);
}
} }
#endif /* HWC_EXT_INIT */ #endif /* HWC_EXT_INIT */