Ignore:
Timestamp:
Aug 30, 2000, 6:11:33 AM (25 years ago)
Author:
bird
Message:

Corrected more JAVA problems. (now working)
In that case an new function was imported. This wasn't present in SMP Warp 3
kernels, so a not requied, EPT_NOT_REQ, flag was introduced. (But, the
new function turned out to be unneeded.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/ldr/myldrOpen.cpp

    r4116 r4117  
    1 /* $Id: myldrOpen.cpp,v 1.10.4.10 2000-08-29 22:52:36 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.10.4.11 2000-08-30 04:11:31 bird Exp $
    22 *
    33 * myldrOpen - ldrOpen.
     
    1919#define INCL_OS2KRNL_TCB
    2020#define INCL_OS2KRNL_SEM
     21#define INCL_OS2KRNL_SEC
    2122
    2223/*******************************************************************************
     
    295296                        if (isLdrStateExecPgm() && fTkExecPgm)
    296297                        {
    297                             rc = AddArgsToFront(2, u1.pach, achTkExecPgmFilename);
     298                            rc = AddArgsToFront(2, ldrpFileNameBuf, achTkExecPgmFilename);
    298299                            if (rc == NO_ERROR)
    299300                            {
    300                                 rc = SetExecName(u1.pach);
     301                                rc = SetExecName(ldrpFileNameBuf);
    301302                                if (rc != NO_ERROR)
    302303                                    kprintf(("myldrOpen-%d: pe.exe - failed to set pe.exe as execname. rc=%d\n", cNesting));
     
    358359                if (isLdrStateExecPgm() && fTkExecPgm)
    359360                {
    360                     cchName = strlen(ldrpFileNameBuf);
     361                    /* Ooops we had to get the file name from the MFT. ldrpFileNameBuf is allways uppercased... */
     362                    /* MFT seems to hold uppercased filenames! ARG! But (by pure luck?) achTkExecPgmArguments is
     363                     * not uppercased (yet). Nothing could be simpler!
     364                     */
     365                    #if 1
     366                    psz3 = achTkExecPgmArguments;
     367                    #elif 0
     368                    psz3 = SecPathFromSFN(*phFile);
     369                    if (psz3 == NULL)
     370                        psz3 = ldrpFileNameBuf;
     371                    #else
     372                    psz3 = ldrpFileNameBuf;
     373                    #endif
     374                    cchName = strlen(psz3);
    361375                    pszName = (char*)rmalloc(cchName + 2);
    362376                    if (pszName == NULL)
     
    365379                        goto cleanup;
    366380                    }
    367                     memcpy(pszName, ldrpFileNameBuf, cchName+1);
     381                    memcpy(pszName, psz3, cchName+1);
    368382
    369383                    psz = pszName + strlen(pszName) - 1;
     
    380394                        if (psz - pszName == 2)
    381395                        {
    382                             memmove(psz + 1, psz, cchName - 2);
     396                            memmove(psz + 1, psz, cchName - 1);
    383397                            *psz++ = '\\';
    384398                        }
    385399                    }
    386                     *psz = ' ';              //assume fully qualified path...
     400                    /* check if no path */
     401                    if (psz == pszName)
     402                        memmove(pszName + 1, pszName, cchName + 1);
     403                    *psz = ' ';
    387404                }
    388405
     
    437454                        /*
    438455                         * Add the class directory (as the last classpath entry) and the class name.
     456                         * (Note. I may happen that there is no directory, but that don't matter
     457                         *        a space is allways preceding the class name.)
    439458                         */
    440459                        *psz++ = ';';
     
    669688            kprintf(("myldrOpen-%d: Found REXX script\n", cNesting));
    670689            ldrClose(*phFile);
    671             strcpy(u1.pach, "KRX.EXE");
    672             rc = ldrOpen(phFile, u1.pach, pfl);
     690            psz = "KRX.EXE";
     691            rc = ldrOpen(phFile, psz, pfl);
    673692            if (rc != NO_ERROR)
    674                 rc = OpenPATH(phFile, u1.pach, pfl);
     693                rc = OpenPATH(phFile, psz, pfl);
    675694
    676695            /** @sketch
     
    683702             if (rc == NO_ERROR && isLdrStateExecPgm())
    684703             {
    685                  rc = AddArgsToFront(2, u1.pach, achTkExecPgmFilename);
     704                 rc = AddArgsToFront(2, ldrpFileNameBuf, achTkExecPgmFilename);
    686705                 if (rc != NO_ERROR)
    687706                 {
     
    689708                     goto cleanup_noerror;
    690709                 }
    691                  rc = SetExecName(u1.pach);
     710                 rc = SetExecName(ldrpFileNameBuf);
    692711                 if (rc != NO_ERROR)
    693712                     kprintf(("myldrOpen-%d: SetExecName failed with rc=%d\n", cNesting));
Note: See TracChangeset for help on using the changeset viewer.