MCPcopy Create free account
hub / github.com/ceph/ceph / get_env_bool

Function get_env_bool

src/common/environment.cc:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include <strings.h>
20
21bool get_env_bool(const char *key)
22{
23 const char *val = getenv(key);
24 if (!val)
25 return false;
26 if (strcasecmp(val, "off") == 0)
27 return false;
28 if (strcasecmp(val, "no") == 0)
29 return false;
30 if (strcasecmp(val, "false") == 0)
31 return false;
32 if (strcasecmp(val, "0") == 0)
33 return false;
34 return true;
35}
36
37int get_env_int(const char *key)
38{

Callers 2

ceph_heap_profiler_initFunction · 0.85
buffer.ccFile · 0.85

Calls 1

getenvFunction · 0.85

Tested by

no test coverage detected