Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

static int kldrDyldFindTryOpen ( const char *  pszFilename,
PPKRDR  ppRdr 
) [static]

Try open the specfied file.

Returns:
0 on success and *ppMod pointing to the new module.

KLDR_ERR_MODULE_NOT_FOUND if the specified file couldn't be opened.

non-zero kLdr or OS specific status code on other failures.

Parameters:
pszFilename The filename.
ppRdr Where to store the pointer to the new module.

Todo:
deal with return codes properly.

Definition at line 637 of file kLdrDyldFind.c.

References KERR_BASE, KERR_END, and KLDR_ERR_MODULE_NOT_FOUND.

Referenced by kldrDyldFindExistingModule(), kldrDyldFindNewModule(), and kldrDyldFindTryOpenPath().

{
    int rc;

    /*
     * Try open the file.
     */
    rc = kRdrOpen(ppRdr, pszFilename);
    if (!rc)
        return 0;
    /** @todo deal with return codes properly. */
    if (rc >= KERR_BASE && rc <= KERR_END)
        return rc;

    return KLDR_ERR_MODULE_NOT_FOUND;
}


Generated by  Doxygen 1.6.0   Back to index