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

int kldrDyldModGetName ( PKLDRDYLDMOD  pMod,
char *  pszName,
KSIZE  cchName 
)

Gets the module name.

Returns:
0 on success, KERR_BUFFER_OVERFLOW on failure.
Parameters:
pMod The module.
pszName Where to store the name.
cchName The size of the name buffer.

Definition at line 1235 of file kLdrDyldMod.c.

References KLDRMOD::cchName, K_MIN, KERR_BUFFER_OVERFLOW, KSIZE, KLDRDYLDMOD::pMod, and KLDRMOD::pszName.

Referenced by kldrDyldDoGetName().

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


Generated by  Doxygen 1.6.0   Back to index