summaryrefslogtreecommitdiff
path: root/libudev/libudev.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2012-01-01 04:21:15 +0100
committerKay Sievers <kay.sievers@vrfy.org>2012-01-01 04:21:15 +0100
commit220893b3cbdbf8932f95c44811b169a8f0d33939 (patch)
tree540deaec74df773c5d7973dc3b3bb3d734dc834b /libudev/libudev.c
parenteed0832780382298f5df26143a8271f9a4328a9f (diff)
remove mknod() logic and rely on 'devtmpfs'
Diffstat (limited to 'libudev/libudev.c')
-rw-r--r--libudev/libudev.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/libudev/libudev.c b/libudev/libudev.c
index 93f2d8f1b5..ca2ac5d030 100644
--- a/libudev/libudev.c
+++ b/libudev/libudev.c
@@ -223,6 +223,10 @@ UDEV_EXPORT struct udev *udev_new(void)
set_value(&udev->run_path, val);
continue;
}
+ if (strcmp(key, "udev_sys") == 0) {
+ set_value(&udev->sys_path, val);
+ continue;
+ }
if (strcmp(key, "udev_rules") == 0) {
set_value(&udev->rules_path[0], val);
udev->rules_path_count = 1;
@@ -237,18 +241,6 @@ UDEV_EXPORT struct udev *udev_new(void)
if (env != NULL)
udev_set_log_priority(udev, util_log_priority(env));
- env = getenv("UDEV_ROOT");
- if (env != NULL) {
- set_value(&udev->dev_path, env);
- udev_add_property(udev, "UDEV_ROOT", udev->dev_path);
- }
-
- env = getenv("SYSFS_PATH");
- if (env != NULL) {
- set_value(&udev->sys_path, env);
- udev_add_property(udev, "SYSFS_PATH", udev->sys_path);
- }
-
/* set defaults */
if (udev->dev_path == NULL)
if (set_value(&udev->dev_path, "/dev") == NULL)
@@ -401,8 +393,8 @@ int udev_get_rules_path(struct udev *udev, char **path[], unsigned long long *st
* @udev: udev library context
*
* Retrieve the sysfs mount point. The default is "/sys". For
- * testing purposes, it can be overridden with the environment
- * variable SYSFS_PATH.
+ * testing purposes, it can be overridden with udev_sys=
+ * in the udev configuration file.
*
* Returns: the sys mount point
**/