getenv.c 539 字节
Newer Older
C
c00346986 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#include "stdlib.h"
#include "string.h"
#include "los_exc.h"

/*
 * getenv --
 *  Returns ptr to value associated with name, if any, else NULL.
 */
char *
getenv(const char *name)
{
#ifdef LOSCFG_LLTREPORT
    if (strncmp(name, "GCOV_PREFIX", sizeof("GCOV_PREFIX")) == 0) {
#ifdef LOSCFG_LLTSER
        extern const char *gcov_dir;
        return (char *)gcov_dir;
#else
        return "/bin/vs/sd";
#endif
    }
    if (strncmp(name, "GCOV_PREFIX_STRIP", sizeof("GCOV_PREFIX_STRIP")) == 0)
        return "6";
#endif
    return (NULL);
}