summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-23 14:38:17 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-23 14:38:17 +0100
commit8221fda087e5c445ddda2bf38c09c49c4d27a7fe (patch)
treeb031d30262dc8bf29c8d4dd46b61d8baf92be8fb /lib
parent47575c7710b2cc14f4b96de71540375e0c1d43b4 (diff)
lib: s/igt_env_set/igt_check_boolean_env_var
So I wasn't really happy with env_set since it's way too close to setenv(), whic actually _sets_ and environment variable. So use check instead of set as the verb (well adjective for env_set). Also sprinkle in some hints that we talk about a boolean setting here. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_aux.c6
-rw-r--r--lib/igt_aux.h2
-rw-r--r--lib/igt_core.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 177f52da..00a719c2 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -134,7 +134,7 @@ void igt_stop_signal_helper(void)
}
/**
- * igt_env_set:
+ * igt_check_boolean_env_var:
* @env_var: environment variable name
* @default_value: default value for the environment variable
*
@@ -144,7 +144,7 @@ void igt_stop_signal_helper(void)
* The boolean value of the environment variable @env_var as decoded by atoi()
* if it is set and @default_value if the variable is not set.
*/
-bool igt_env_set(const char *env_var, bool default_value)
+bool igt_check_boolean_env_var(const char *env_var, bool default_value)
{
char *val;
@@ -167,7 +167,7 @@ bool igt_aub_dump_enabled(void)
static int dump_aub = -1;
if (dump_aub == -1)
- dump_aub = igt_env_set("IGT_DUMP_AUB", false);
+ dump_aub = igt_check_boolean_env_var("IGT_DUMP_AUB", false);
return dump_aub;
}
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index eb637128..25a479f2 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -40,7 +40,7 @@ void igt_permute_array(void *array, unsigned size,
unsigned i,
unsigned j));
void igt_progress(const char *header, uint64_t i, uint64_t total);
-bool igt_env_set(const char *env_var, bool default_value);
+bool igt_check_boolean_env_var(const char *env_var, bool default_value);
bool igt_aub_dump_enabled(void);
diff --git a/lib/igt_core.c b/lib/igt_core.c
index ed631f16..2fe74f5a 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1111,7 +1111,7 @@ bool igt_run_in_simulation(void)
static int simulation = -1;
if (simulation == -1)
- simulation = igt_env_set("INTEL_SIMULATION", false);
+ simulation = igt_check_boolean_env_var("INTEL_SIMULATION", false);
return simulation;
}