summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-12-18 11:34:17 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:17:47 -0700
commit8b36cc0f179ee35176016ab67ae53078df4110fa (patch)
treec61be5ec5a18ee0f9050c2f0b2917e0ed06f1853 /namedev.c
parent3ac0326962c93f381bec325583e26f47fb7d4833 (diff)
[PATCH] complete removal of explicit udev permissions config file
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/namedev.c b/namedev.c
index 9cfc4283be..be7ae12cd5 100644
--- a/namedev.c
+++ b/namedev.c
@@ -43,10 +43,6 @@
static struct sysfs_attribute *find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device, char *attr);
-LIST_HEAD(config_device_list);
-LIST_HEAD(perm_device_list);
-
-
/* compare string with pattern (supports * ? [0-9] [!A-Z]) */
static int strcmp_pattern(const char *p, const char *s)
{
@@ -100,18 +96,6 @@ static int strcmp_pattern(const char *p, const char *s)
return 1;
}
-static struct perm_device *find_perm_entry(const char *name)
-{
- struct perm_device *perm;
-
- list_for_each_entry(perm, &perm_device_list, node) {
- if (strcmp_pattern(perm->name, name))
- continue;
- return perm;
- }
- return NULL;
-}
-
/* extract possible {attr} and move str behind it */
static char *get_format_attribute(char **str)
{
@@ -694,7 +678,6 @@ int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_d
struct sysfs_class_device *class_dev_parent;
struct sysfs_device *sysfs_device = NULL;
struct config_device *dev;
- struct perm_device *perm;
char *pos;
udev->mode = 0;
@@ -792,18 +775,7 @@ int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_d
goto exit;
perms:
- /* apply permissions from permissions file to empty fields */
- perm = find_perm_entry(udev->name);
- if (perm != NULL) {
- if (udev->mode == 0000)
- udev->mode = perm->mode;
- if (udev->owner[0] == '\0')
- strfieldcpy(udev->owner, perm->owner);
- if (udev->group[0] == '\0')
- strfieldcpy(udev->group, perm->group);
- }
-
- /* apply permissions from config to empty fields */
+ /* apply default permissions to empty fields */
if (udev->mode == 0000)
udev->mode = default_mode;
if (udev->owner[0] == '\0')
@@ -817,20 +789,3 @@ perms:
exit:
return 0;
}
-
-int namedev_init(void)
-{
- int retval;
-
- retval = namedev_init_rules();
- if (retval)
- return retval;
-
- retval = namedev_init_permissions();
- if (retval)
- return retval;
-
- dump_config_dev_list();
- dump_perm_dev_list();
- return retval;
-}