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

int kldrDyldModGetFilename ( PKLDRDYLDMOD  pMod,
char *  pszFilename,
KSIZE  cchFilename 
)

Gets the module filename.

Returns:
0 on success, KERR_BUFFER_OVERFLOW on failure.
Parameters:
pMod The module.
pszFilename Where to store the filename.
cchFilename The size of the filename buffer.

Definition at line 1254 of file kLdrDyldMod.c.

References KLDRMOD::cchFilename, K_MIN, KERR_BUFFER_OVERFLOW, KSIZE, KLDRDYLDMOD::pMod, and KLDRMOD::pszFilename.

Referenced by kldrDyldDoGetFilename().

{
    KSIZE cch = K_MIN(cchFilename, pMod->pMod->cchFilename + 1);
    if (cch)
    {
        kHlpMemCopy(pszFilename, pMod->pMod->pszFilename, cch - 1);
        pszFilename[cch - 1] = '\0';
    }
    return cchFilename <= pMod->pMod->cchFilename ? KERR_BUFFER_OVERFLOW : 0;
}


Generated by  Doxygen 1.6.0   Back to index