chiark / gitweb /
[PATCH] make config files, sysfs root, and udev root configurable from config variables
[elogind.git] / udev-add.c
index 7906638a7f066670fbd2bea6d5a603d523fdb309..d9d7cab103098a35b14d95f384ade479399cb269 100644 (file)
@@ -34,8 +34,6 @@
 #include "udevdb.h"
 #include "libsysfs/libsysfs.h"
 
-static char sysfs_path[SYSFS_PATH_MAX];
-
 /* 
  * Right now the major/minor of a device is stored in a file called
  * "dev" in sysfs.
@@ -75,7 +73,7 @@ static int create_node(struct udevice *dev)
        char filename[255];
        int retval = 0;
 
-       strncpy(filename, UDEV_ROOT, sizeof(filename));
+       strncpy(filename, udev_root, sizeof(filename));
        strncat(filename, dev->name, sizeof(filename));
 
        switch (dev->type) {
@@ -171,13 +169,6 @@ int udev_add_device(char *path, char *subsystem)
        else
                dev.type = 'c';
 
-       retval = sysfs_get_mnt_path(sysfs_path, SYSFS_PATH_MAX);
-       dbg("sysfs_path = %s", sysfs_path);
-       if (retval) {
-               dbg("sysfs_get_mnt_path failed");
-               goto exit;
-       }
-
        retval = sleep_for_dev(path);
        if (retval)
                goto exit;