MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getenv_string

Function getenv_string

freebsd/kern/kern_environment.c:653–666  ·  view source on GitHub ↗

* Return a string value from an environment variable. */

Source from the content-addressed store, hash-verified

651 * Return a string value from an environment variable.
652 */
653int
654getenv_string(const char *name, char *data, int size)
655{
656 char *cp;
657
658 cp = kenv_acquire(name);
659
660 if (cp != NULL)
661 strlcpy(data, cp, size);
662
663 kenv_release(cp);
664
665 return (cp != NULL);
666}
667
668/*
669 * Return an array of integers at the given type size and signedness.

Callers 1

Calls 3

kenv_acquireFunction · 0.70
kenv_releaseFunction · 0.70
strlcpyFunction · 0.50

Tested by

no test coverage detected