summaryrefslogtreecommitdiff
path: root/namedev_parse.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-12 06:20:22 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:24:38 -0700
commitaf4b05d4917fdfa55eff3d8d53a830464d8162a1 (patch)
tree352f8b4180c9be6f848c7f69517783b7912c42d3 /namedev_parse.c
parent13f24d596c5638443ffc7bc48c10a66758335c74 (diff)
[PATCH] make the udev object available to more processing stages
Remove the overwriting of main_argv[] hack and use the values from the udev object. Pass the udev object to call_foreach_file(). In the udevstart case, export SUBSYSTEM and UDEVSTART to the environment.
Diffstat (limited to 'namedev_parse.c')
-rw-r--r--namedev_parse.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/namedev_parse.c b/namedev_parse.c
index 22e3523f3d..73828a83b2 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -142,7 +142,7 @@ static char *get_key_attribute(char *str)
return NULL;
}
-static int namedev_parse_rules(char *filename)
+static int namedev_parse_rules(const char *filename, void *data)
{
char line[LINE_SIZE];
char *bufline;
@@ -343,7 +343,7 @@ error:
return retval;
}
-static int namedev_parse_permissions(char *filename)
+static int namedev_parse_permissions(const char *filename, void *data)
{
char line[LINE_SIZE];
char *bufline;
@@ -447,10 +447,10 @@ int namedev_init_rules(void)
stat(udev_rules_filename, &stats);
if ((stats.st_mode & S_IFMT) != S_IFDIR)
- return namedev_parse_rules(udev_rules_filename);
+ return namedev_parse_rules(udev_rules_filename, NULL);
else
- return call_foreach_file(namedev_parse_rules,
- udev_rules_filename, RULEFILE_SUFFIX);
+ return call_foreach_file(namedev_parse_rules, udev_rules_filename,
+ RULEFILE_SUFFIX, NULL);
}
int namedev_init_permissions(void)
@@ -459,8 +459,8 @@ int namedev_init_permissions(void)
stat(udev_permissions_filename, &stats);
if ((stats.st_mode & S_IFMT) != S_IFDIR)
- return namedev_parse_permissions(udev_permissions_filename);
+ return namedev_parse_permissions(udev_permissions_filename, NULL);
else
- return call_foreach_file(namedev_parse_permissions,
- udev_permissions_filename, PERMFILE_SUFFIX);
+ return call_foreach_file(namedev_parse_permissions, udev_permissions_filename,
+ PERMFILE_SUFFIX, NULL);
}