summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-10-21 20:19:09 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:01:42 -0700
commitc056c5141b16fe95485eeb233fe8b90954686a60 (patch)
tree0e5ff6219b7bffce255d79ca132296f131b4e4c1 /namedev.c
parentd4e52dd0d95c21ccda50310404be4b5a540cc498 (diff)
[PATCH] make config files, sysfs root, and udev root configurable from config variables
This will make running tests a lot simpler.
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/namedev.c b/namedev.c
index c21a5be7ad..f2842ce436 100644
--- a/namedev.c
+++ b/namedev.c
@@ -197,7 +197,6 @@ static int get_pair(char **orig_string, char **left, char **right)
static int namedev_init_config(void)
{
- char filename[255];
char line[255];
char *temp;
char *temp2;
@@ -206,11 +205,10 @@ static int namedev_init_config(void)
int retval = 0;
struct config_device dev;
- strcpy(filename, UDEV_CONFIG_DIR NAMEDEV_CONFIG_FILE);
- dbg("opening %s to read as permissions config", filename);
- fd = fopen(filename, "r");
+ dbg("opening %s to read as permissions config", udev_config_filename);
+ fd = fopen(udev_config_filename, "r");
if (fd == NULL) {
- dbg("Can't open %s", filename);
+ dbg("Can't open %s", udev_config_filename);
return -ENODEV;
}
@@ -394,7 +392,6 @@ exit:
static int namedev_init_permissions(void)
{
- char filename[255];
char line[255];
char *temp;
char *temp2;
@@ -402,11 +399,10 @@ static int namedev_init_permissions(void)
int retval = 0;
struct config_device dev;
- strcpy(filename, UDEV_CONFIG_DIR NAMEDEV_CONFIG_PERMISSION_FILE);
- dbg("opening %s to read as permissions config", filename);
- fd = fopen(filename, "r");
+ dbg("opening %s to read as permissions config", udev_config_permission_filename);
+ fd = fopen(udev_config_permission_filename, "r");
if (fd == NULL) {
- dbg("Can't open %s", filename);
+ dbg("Can't open %s", udev_config_permission_filename);
return -ENODEV;
}