chiark / gitweb /
[PATCH] DEVPATH for netdev
[elogind.git] / udev_config.c
index 57a512d..ba04003 100644 (file)
@@ -51,6 +51,7 @@ char default_owner_str[OWNER_SIZE];
 char default_group_str[GROUP_SIZE];
 int udev_log;
 int udev_sleep;
+int udev_dev_d;
 
 
 static int string_is_true(char *str)
@@ -77,17 +78,21 @@ static void init_variables(void)
        udev_sleep = 1;
        if (getenv("UDEV_NO_SLEEP") != NULL)
                udev_sleep = 0;
+
+       udev_dev_d = 1;
+       if (getenv("UDEV_NO_DEVD") != NULL)
+               udev_dev_d = 0;
 }
 
 #define set_var(_name, _var)                           \
        if (strcasecmp(variable, _name) == 0) {         \
-               dbg_parse("%s = '%s'", _name, value);   \
-               strfieldcpymax(_var, value, sizeof(_var));\
+               dbg_parse("%s='%s'", _name, value);     \
+               strfieldcpy(_var, value);\
        }
 
 #define set_bool(_name, _var)                          \
        if (strcasecmp(variable, _name) == 0) {         \
-               dbg_parse("%s = '%s'", _name, value);   \
+               dbg_parse("%s='%s'", _name, value);     \
                _var = string_is_true(value);           \
        }