Ignore:
Timestamp:
Feb 21, 2000, 5:45:47 AM (26 years ago)
Author:
bird
Message:

ProbKrnl and code for importing krnl symbols has been enhanched.
Now we'll lock 32-bit segments into memory too.
And some other fixes...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/dev16/probkrnl.c

    r2832 r2836  
    1 /* $Id: probkrnl.c,v 1.12 2000-02-20 04:27:23 bird Exp $
     1/* $Id: probkrnl.c,v 1.13 2000-02-21 04:45:45 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    157157*   Internal Functions                                                         *
    158158*******************************************************************************/
     159/* File an output replacements */
    159160static HFILE    fopen(const char * pszFilename, const char * pszIgnored);
    160161static int      fread(void * pvBuffer, USHORT cbBlock, USHORT cBlock,  HFILE hFile);
     
    163164static void     puts(char *psz);
    164165
     166/* C-library replacements. */
    165167static void     kmemcpy(char *psz1, const char *psz2, int cch);
    166168static char *   kstrstr(const char *psz1, const char *psz2);
    167169static int      kstrcmp(const char *psz1, const char *psz2);
    168170static int      kstrncmp(const char *psz1, const char *psz2, int cch);
     171static int      kstrnicmp(const char *psz1, const char *psz2, int cch);
    169172static int      kstrlen(const char *psz);
    170173static int      kargncpy(char *pszTarget, const char *pszArg, unsigned cchMaxlen);
    171174
     175/* Workers */
    172176static int      VerifyPrologs(void);
    173177static int      ProbeSymFile(char *pszFilename);
     
    177181static int      GetKernelOTEs(void);
    178182
     183/* Ouput */
    179184static void     ShowDecNumber(unsigned long ul);
    180185static void     ShowHexNumber(unsigned long ul);
     
    338343
    339344
    340 
    341345/**
    342346 * kstrncmp - String 'n' compare.
     
    360364
    361365
     366#if 0 /* not in use */
     367/**
     368 * kstrnicmp - String 'n' compare, case-insensitive.
     369 * @returns   0 - equal else !0
     370 * @param     p1  String 1
     371 * @param     p2  String 2
     372 * @param     len length
     373 */
     374static int      kstrnicmp(const char *psz1, const char *psz2, int cch)
     375{
     376    register char ch1, ch2;
     377
     378    do
     379    {
     380        ch1 = *psz1++;
     381        if (ch1 >= 'A' && ch1 <= 'Z')
     382            ch1 += 'a' - 'A';           /* to lower case */
     383        ch2 = *psz2++;
     384        if (ch2 >= 'A' && ch2 <= 'Z')
     385            ch2 += 'a' - 'A';           /* to lower case */
     386    } while (--cch > 0 && ch1 == ch2 && ch1 != '\0' && ch2 != '\0');
     387
     388    return ch1 - ch2;
     389}
     390#endif
     391
     392
    362393/**
    363394 * kstrlen - String length.
     
    431462
    432463/*******************************************************************************
    433 *   Implementation Of The Important Function                                   *
     464*   Implementation Of The Important Functions                                  *
    434465*******************************************************************************/
    435466
     
    727758 * @param     filename   Filename of the OS/2 kernel.
    728759 * @result    ulBuild is set.
     760 * @remark    This step will be eliminated by searching thru the DOSGROUP datasegment
     761 *            in the kernel memory. This segment have a string "Internal revision 9.034[smp|uni]"
     762 *            This would be much faster than reading the kernel file. It will also give us a more precise
     763 *            answer to the question! This is currently a TODO issue. !FIXME!
    729764 */
    730765static int ReadOS2Krnl(char * pszFilename)
     
    11171152                    case 'S': /* Symbol file */
    11181153                        i++;
    1119                         i += kargncpy(szUsrSym, &pReqPack->InitArgs[i], sizeof(szUsrSym));
     1154                        if (pReqPack->InitArgs[i] == 'Y' || pReqPack->InitArgs[i] == 'y')
     1155                            i += kargncpy(szUsrSym, &pReqPack->InitArgs[i], sizeof(szUsrSym));
    11201156                        break;
    11211157
Note: See TracChangeset for help on using the changeset viewer.