Changeset 6219 for trunk/src/win32k/dev32/d32init.c
- Timestamp:
- Jul 8, 2001, 4:56:27 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev32/d32init.c
r6004 r6219 1 /* $Id: d32init.c,v 1. 39 2001-06-14 01:13:34bird Exp $1 /* $Id: d32init.c,v 1.40 2001-07-08 02:56:27 bird Exp $ 2 2 * 3 3 * d32init.c - 32-bits init routines. … … 533 533 if (pKrnlOTE != NULL) 534 534 { 535 BOOL fKrnlTypeOk; 536 535 537 /* 536 538 * Thats all? … … 553 555 554 556 /* 555 * Search for internal revision stuff in the two first objects.557 * Search for internal revision stuff AND 'SAB KNL?' signature in the two first objects. 556 558 */ 559 fKrnlTypeOk = FALSE; 560 pKrnlInfo->fKernel = 0; 557 561 pKrnlInfo->ulBuild = 0; 558 562 for (i = 0; i < 2 && pKrnlInfo->ulBuild == 0; i++) … … 592 596 593 597 /* Check for any revision flag */ 594 pKrnlInfo->fKernel = 0;595 598 if ((*psz >= 'A' && *psz <= 'Z') || (*psz >= 'a' && *psz <= 'z')) 596 599 { 597 pKrnlInfo->fKernel = (USHORT)((*psz - (*psz >= 'a' ? 'a'-1 : 'A'-1)) << KF_REV_SHIFT);600 pKrnlInfo->fKernel |= (USHORT)((*psz - (*psz >= 'a' ? 'a'-1 : 'A'-1)) << KF_REV_SHIFT); 598 601 psz++; 599 602 } … … 616 619 617 620 /* Check if its a debug kernel (look for DEBUG at start of object 3-5) */ 618 j = 3; 619 while (j < 5) 621 if (!fKrnlTypeOk) 620 622 { 621 /* There should be no iopl object preceding the debugger data object. */ 622 if ((pKrnlOTE[j].ote_flags & OBJIOPL) != 0) 623 break; 624 /* Is this is? */ 625 if ((pKrnlOTE[j].ote_flags & OBJINVALID) == 0 626 && (pKrnlOTE[j].ote_flags & (OBJREAD | OBJWRITE)) == (OBJREAD | OBJWRITE) 627 && strncmp((char*)pKrnlOTE[j].ote_base, "DEBUG", 5) == 0) 623 j = 3; 624 while (j < 5) 628 625 { 629 pKrnlInfo->fKernel |= KF_DEBUG; 630 break; 626 /* There should be no iopl object preceding the debugger data object. */ 627 if ((pKrnlOTE[j].ote_flags & OBJIOPL) != 0) 628 break; 629 /* Is this is? */ 630 if ((pKrnlOTE[j].ote_flags & OBJINVALID) == 0 631 && (pKrnlOTE[j].ote_flags & (OBJREAD | OBJWRITE)) == (OBJREAD | OBJWRITE) 632 && strncmp((char*)pKrnlOTE[j].ote_base, "DEBUG", 5) == 0) 633 { 634 pKrnlInfo->fKernel |= KF_DEBUG; 635 break; 636 } 637 j++; 631 638 } 632 j++;633 639 } 634 640 … … 639 645 /* Break out */ 640 646 break; 647 } 648 649 /* 650 * Look for the SAB KNL? signature to check which kernel type we're 651 * dealing with. This could also be reached thru the selector found 652 * in the first element for the SAS_tables_area array. 653 */ 654 if (!fKrnlTypeOk && strncmp(psz, "SAB KNL", 7) == 0) 655 { 656 fKrnlTypeOk = TRUE; 657 if (psz[7] == 'D') 658 pKrnlInfo->fKernel |= KF_ALLSTRICT; 659 else if (psz[7] == 'B') 660 pKrnlInfo->fKernel |= KF_HALFSTRICT; 661 else if (psz[7] != 'R') 662 fKrnlTypeOk = FALSE; 641 663 } 642 664
Note:
See TracChangeset
for help on using the changeset viewer.