Changeset 1467 for trunk/src/win32k/dev16/probkrnl.c
- Timestamp:
- Oct 27, 1999, 4:03:01 AM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/win32k/dev16/probkrnl.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev16/probkrnl.c
r847 r1467 1 /* $Id: probkrnl.c,v 1. 1 1999-09-06 02:19:55bird Exp $1 /* $Id: probkrnl.c,v 1.2 1999-10-27 02:02:53 bird Exp $ 2 2 * 3 3 * Description: Autoprobes the os2krnl file and os2krnl[*].sym files. … … 13 13 * How this works: 14 14 * 1. parses the device-line parameters and collects some "SysInfo". 15 * 2. gets the kernel object table. ( win32i$)15 * 2. gets the kernel object table. (elf$) 16 16 * 3. finds the kernel image and scans it for a build number. 17 17 * 4. locates and scans the symbol-file(s) for the entrypoints which are wanted. 18 * 5. the entry points are verified. ( win32i$)18 * 5. the entry points are verified. (elf$) 19 19 * 6. finished. 20 20 * … … 29 29 #ifdef DEBUGR3 30 30 #if 1 31 int printf(const char *, ...); 31 32 #define dprintf(a) printf a 32 33 #else … … 35 36 #else 36 37 #define dprintf(a) 38 #define static 37 39 #endif 38 40 … … 125 127 static char szMsg1[] = "\n\r\tFound kernel: "; 126 128 static char szMsg1a[] = "\n\r\tBuild: "; 127 static char szMsg2[] = "\n\r\ n\r\tFound symbolfile: ";129 static char szMsg2[] = "\n\r\tFound symbolfile: "; 128 130 static char szMsg4[] = "\n\r\tFailed to find symbolfile!\n\r"; 129 131 static char szMsgfailed[]= "failed!"; … … 311 313 312 314 /** 313 * kstrlen - String length 314 * @returns length of string 315 * @param p Pointer to string 316 */ 317 static int kstrlen(const char * p) 318 { 319 int len = 0; 320 while ( p[len++] != '\0'); 321 return len-1; 315 * kstrlen - String length. 316 * @returns Length of the string. 317 * @param psz Pointer to string. 318 * @status completely implemented and tested. 319 * @author knut st. osmundsen 320 */ 321 static int kstrlen(const char * psz) 322 { 323 int cch = 0; 324 while (psz[cch] != '\0') 325 cch++; 326 return cch; 322 327 } 323 328 … … 381 386 USHORT usAction = 0; 382 387 383 rc = DosOpen("\\dev\\ win32i$", &hDev0, &usAction, 0UL, FILE_NORMAL,388 rc = DosOpen("\\dev\\elf$", &hDev0, &usAction, 0UL, FILE_NORMAL, 384 389 OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS, 385 390 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, … … 430 435 /* read header and display it */ 431 436 rc = fread(&MapDef, sizeof(MAPDEF), 1, SymFile); 432 if ( rc)437 if (rc) 433 438 { 434 439 Buffer[0] = MapDef.achModName[0]; … … 591 596 } 592 597 593 /* Worker function for ReadOS2Krnl */ 598 /** 599 * Worker function for ReadOS2Krnl 600 * @returns 0 on success. 601 * errorcodes on failure. (-1 >= rc >= -14) 602 * @param 603 * @equiv 604 * @time 605 * @sketch 606 * @status 607 * @author knut st. osmundsen 608 * @remark 609 */ 594 610 static int ReadOS2Krnl2(HFILE krnl, unsigned long cbKrnl) 595 611 { … … 722 738 if (pObj->o32_size < KrnlOTEs.aObjects[i].ote_size) 723 739 return -12; 740 741 #if 0 /* don't work! */ 724 742 if ((pObj->o32_flags & 0xffffUL) != (KrnlOTEs.aObjects[i].ote_flags & 0xffffUL)) 725 743 return -14; 744 #endif 726 745 } 727 746 } … … 764 783 USHORT usAction = 0; 765 784 766 rc = DosOpen("\\dev\\ win32i$", &hDev0, &usAction, 0UL, FILE_NORMAL,785 rc = DosOpen("\\dev\\elf$", &hDev0, &usAction, 0UL, FILE_NORMAL, 767 786 OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS, 768 787 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, … … 779 798 return rc; 780 799 #else 800 KrnlOTEs.cObjects = 23; 781 801 return 0; 782 802 #endif … … 857 877 858 878 /* functions */ 859 if (rc > -50)879 if (rc == 0) 860 880 { 861 881 puts(szMsg2);
Note:
See TracChangeset
for help on using the changeset viewer.
