summaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 19580296..2c3d9368 100644
--- a/lib.c
+++ b/lib.c
@@ -378,6 +378,16 @@ void print_escape(char *str)
}
}
+int check_env(char *name)
+{
+ char *val = getenv(name);
+
+ if (val && atoi(val) == 1)
+ return 1;
+
+ return 0;
+}
+
int use_udev(void)
{
static int use = -1;