Ignore:
Timestamp:
Jan 19, 2001, 3:28:53 AM (25 years ago)
Author:
bird
Message:

Added support for kernel revisions. (like 14062a)

File:
1 edited

Legend:

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

    r4787 r4972  
    1 /* $Id: extract.c,v 1.3 2000-12-11 06:53:48 bird Exp $
     1/* $Id: extract.c,v 1.4 2001-01-19 02:27:32 bird Exp $
    22 *
    33 * Description:     SymDB entry generator.
    44 *                  Builds SymDB entry from one or more symbol files.
    55 *
    6  * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
     6 * Copyright (c) 2000-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    77 *
    88 * Project Odin Software License can be found in LICENSE.TXT
     
    8282 * Dumps writes a KRNLDBENTRY struct to stderr for the given .sym-file.
    8383 * The filesnames are on this format:
    84  *    nnnn[n]tm.SYM
     84 *    nnnn[n]tm[r].SYM
    8585 * Where: n - are the build number 4 or 5 digits.
    8686 *        t - kernel type. R = retail, H = half strict, A = all strict.
    8787 *        m - UNI or SMP.  U = UNI processor kernel. S = SMP processor kernel. 4 = Warp 4 FP13+
     88 *        r - revision letter. Currently only 'A' is supported.
    8889 * @returns   NO_ERROR on success. Untracable error code on error.
    8990 * @param     pszFilename  Pointer to read only filename of the .sym-file.
     
    9697    APIRET   rc;
    9798    int      cch;
     99    int      cchNum;
    98100    const char *psz = pszFilename + kstrlen(pszFilename);
    99101
     
    110112
    111113    /* Filename check */
    112     if (cch < 10 || cch > 11
     114    cchNum = psz[0] > '2' ? 4 : 5;      /* build number length. */
     115    if (cch < 10 || cch > 12
    113116        || !(psz[0] >= '0' && psz[0] <= '9')
    114117        || !(psz[1] >= '0' && psz[1] <= '9')
    115118        || !(psz[2] >= '0' && psz[2] <= '9')
    116119        || !(psz[3] >= '0' && psz[3] <= '9')
    117         || !(psz[cch-7] >= '0' && psz[cch-7] <= '9')
    118         || !(psz[cch-6] == 'A' || psz[cch-6] == 'H' || psz[cch-6] == 'R')
    119         || !(psz[cch-5] == 'S' || psz[cch-5] == 'U' || psz[cch-5] == '4')
     120        || !(cchNum == 4 || (psz[4] >= '0' && psz[4] <= '9'))
     121        || !(psz[cchNum] == 'A' || psz[cchNum] == 'H' || psz[cchNum] == 'R')
     122        || !(psz[cchNum+1] == 'S' || psz[cchNum+1] == 'U' || psz[cchNum+1] == '4')
     123/*        || !(cch != 12 || psz[cchNum+2] == 'A') */
    120124        )
    121125    {
     
    142146         * is enclaved within an "#ifdef ALLKERNELS ... #endif".
    143147         */
    144         if (psz[cch-6] != 'R')
     148        if (psz[cchNum] != 'R')
    145149            printf16("#ifdef ALLKERNELS\n");
    146150
     
    148152                 "        %.*s, ",
    149153                 psz,
    150                  cch - 6, &psz[0]       /* build number */
     154                 cchNum, &psz[0]       /* build number */
    151155                 );
    152156
    153         switch (psz[cch - 5])
     157        switch (psz[cchNum + 1])
    154158        {
    155159            case 'S':   printf16("KF_SMP"); break;
     
    157161            case 'U':   printf16("KF_UNI"); break;
    158162        }
    159         switch (psz[cch - 6])
     163        switch (psz[cchNum])
    160164        {
    161165            case 'A':   printf16(" | KF_ALLSTRICT"); break;
    162166            case 'H':   printf16(" | KF_HALFSTRICT"); break;
    163167        }
     168        if (psz[cchNum + 2] == 'A')
     169            printf16(" | KF_REV_A");
     170
    164171        printf16(", %d,\n"
    165172                 "        {\n",
     
    183190         * is enclaved within an "#ifdef ALLKERNELS ... #endif".
    184191         */
    185         if (psz[cch-6] != 'R')
     192        if (psz[cchNum] != 'R')
    186193            printf16("#endif\n");
    187194    }
     
    245252        int         i;
    246253
    247         printf16("/* $Id: extract.c,v 1.3 2000-12-11 06:53:48 bird Exp $\n"
     254        printf16("/* $Id: extract.c,v 1.4 2001-01-19 02:27:32 bird Exp $\n"
    248255                 "*\n"
    249256                 "* Autogenerated kernel symbol database.\n"
Note: See TracChangeset for help on using the changeset viewer.