Changeset 4185 for trunk/src/win32k/dev32/d32init.c
- Timestamp:
- Sep 4, 2000, 6:40:50 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev32/d32init.c
r4181 r4185 1 /* $Id: d32init.c,v 1.2 1 2000-09-04 02:04:20bird Exp $1 /* $Id: d32init.c,v 1.22 2000-09-04 16:40:49 bird Exp $ 2 2 * 3 3 * d32init.c - 32-bits init routines. … … 351 351 if (heapInit(options.cbResHeapInit, options.cbResHeapMax, 352 352 options.cbSwpHeapInit, options.cbSwpHeapMax) != NO_ERROR) 353 return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL;353 return ERROR_D32_HEAPINIT_FAILED; 354 354 355 355 /* loader */ 356 if (!options.fNoLoader) 357 if (ldrInit() != NO_ERROR) 358 return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL; 356 if (ldrInit() != NO_ERROR) 357 return ERROR_D32_LDR_INIT_FAILED; 359 358 360 359 /* functionoverrides */ 361 if (!options.fNoLoader) 362 if (importTabInit() != NO_ERROR) 363 return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL; 360 if ((rc = importTabInit()) != NO_ERROR) 361 return rc; 364 362 365 363 /* … … 393 391 kprintf(("16-bit data segment lock failed with with rc=%d\n", rc)); 394 392 395 return STATUS_DONE;393 return NO_ERROR; 396 394 } 397 395 … … 1051 1049 /** 1052 1050 * Verifies the aImportTab. 1053 * @returns 0 if ok. !0 if not ok. 1051 * @returns 16-bit errorcode where the high byte is the procedure number which 1052 * the error occured on and the low byte the error code. 1054 1053 * @remark Called from IOCtl. 1055 1054 * WARNING! This function is called before the initroutine (R0INIT)! … … 1068 1067 usRc = GetKernelInfo32(NULL); 1069 1068 if (usRc != NO_ERROR) 1070 return (USHORT)(STATUS_DONE | STERR | (usRc & STECODE));1069 return usRc; 1071 1070 1072 1071 /* … … 1090 1089 { 1091 1090 kprintf(("VerifyImportTab32: procedure no.%d was not fFound!\n", i)); 1092 return STATUS_DONE | STERR | ERROR_D32_PROC_NOT_FOUND;1091 return (USHORT)(ERROR_D32_PROC_NOT_FOUND | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1093 1092 } 1094 1093 } 1095 1094 1096 1095 /* Verify read/writeable. */ 1097 if ( aImportTab[i].iObject >= pKrnlSMTE->smte_objcnt /* object index valid? */1096 if ( aImportTab[i].iObject >= pKrnlSMTE->smte_objcnt /* object index valid? */ 1098 1097 || aImportTab[i].ulAddress < pKrnlOTE[aImportTab[i].iObject].ote_base /* address valid? */ 1099 1098 || aImportTab[i].ulAddress + 16 > (pKrnlOTE[aImportTab[i].iObject].ote_base + … … 1107 1106 i, &aImportTab[i].achName[0], aImportTab[i].ulAddress, 1108 1107 aImportTab[i].iObject, aImportTab[i].offObject)); 1109 return STATUS_DONE | STERR | ERROR_D32_INVALID_OBJ_OR_ADDR;1108 return (USHORT)(ERROR_D32_INVALID_OBJ_OR_ADDR | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1110 1109 } 1111 1110 … … 1116 1115 kprintf(("VerifyImportTab32: procedure no.%d has an invalid address, %#08x!\n", 1117 1116 i, aImportTab[i].ulAddress)); 1118 return STATUS_DONE | STERR | ERROR_D32_INVALID_ADDRESS;1117 return (USHORT)(ERROR_D32_INVALID_ADDRESS | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1119 1118 } 1120 1119 #endif … … 1146 1145 { /* failed, too small or too large. */ 1147 1146 kprintf(("VerifyImportTab32: verify failed for procedure no.%d (cb=%d)\n", i, cb)); 1148 return STATUS_DONE | STERR | ERROR_D32_TOO_INVALID_PROLOG;1147 return (USHORT)(ERROR_D32_TOO_INVALID_PROLOG | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1149 1148 } 1150 1149 break; … … 1157 1156 kprintf(("VerifyImportTab32: invalid type/type not implemented\n",i)); 1158 1157 Int3(); /* temporary fix! */ 1159 return STATUS_DONE | STERR | ERROR_D32_NOT_IMPLEMENTED;1158 return (USHORT)(ERROR_D32_NOT_IMPLEMENTED | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1160 1159 } 1161 1160 } 1162 1161 1163 return STATUS_DONE;1162 return NO_ERROR; 1164 1163 } 1165 1164 … … 1167 1166 /** 1168 1167 * Initiates the overrided functions. 1169 * @returns NO_ERROR on success. !0 on error. 1168 * @returns 16-bit errorcode where the high byte is the procedure number which 1169 * the error occured on and the low byte the error code. 1170 1170 */ 1171 1171 int importTabInit(void) … … 1256 1256 { 1257 1257 kprintf(("ImportTabInit: Verify failed for procedure no.%d, cb=%d\n", i, cb)); 1258 return ERROR_D32_VERIFY_FAILED ;1258 return ERROR_D32_VERIFY_FAILED | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1259 1259 } 1260 1260 } … … 1302 1302 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when rehooking it!\n", i)); 1303 1303 Int3(); /* ipe - later! */ 1304 return ERROR_D32_ VERIFY_FAILED;1304 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1305 1305 } 1306 1306 break; … … 1347 1347 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when rehooking it!\n", i)); 1348 1348 Int3(); /* ipe - later! */ 1349 return ERROR_D32_ VERIFY_FAILED;1349 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1350 1350 } 1351 1351 break; … … 1375 1375 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when importing it!\n", i)); 1376 1376 Int3(); /* ipe - later! */ 1377 return ERROR_D32_ VERIFY_FAILED;1377 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1378 1378 } 1379 1379 break; … … 1403 1403 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when importing it!\n", i)); 1404 1404 Int3(); /* ipe - later! */ 1405 return ERROR_D32_ VERIFY_FAILED;1405 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1406 1406 } 1407 1407 break; … … 1430 1430 kprintf(("ImportTabInit: unsupported type. (procedure no.%d, cb=%d)\n", i, cb)); 1431 1431 Int3(); /* ipe - later! */ 1432 return ERROR_D32_ VERIFY_FAILED;1432 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1433 1433 } /* switch - type */ 1434 1434 } /* for */
Note:
See TracChangeset
for help on using the changeset viewer.