summaryrefslogtreecommitdiff
path: root/namedev.h
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-29 13:44:01 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:00:29 -0700
commit5f72c470ad244020f65784c33eb6bcd4ae149403 (patch)
tree5d590e591eb0b4af32aa1e1ba62ebbabd01da847 /namedev.h
parent927bda379205dfccd2fae8f5c54523230e0771a9 (diff)
[PATCH] simplify permission handling
Initialize the defaults in udev_config.c instead of namedev.c. Replace macro by expanded code. Switch to mode_t instead of string value. Add and clarify some comments.
Diffstat (limited to 'namedev.h')
-rw-r--r--namedev.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/namedev.h b/namedev.h
index 8e552c8568..e29279243b 100644
--- a/namedev.h
+++ b/namedev.h
@@ -60,14 +60,6 @@ struct sysfs_class_device;
#define RULEFILE_SUFFIX ".rules"
#define PERMFILE_SUFFIX ".permissions"
-#define set_empty_perms(dev, m, o, g) \
- if (dev->mode == 0) \
- dev->mode = m; \
- if (dev->owner[0] == '\0') \
- strfieldcpy(dev->owner, o); \
- if (dev->group[0] == '\0') \
- strfieldcpy(dev->group, g);
-
struct sysfs_pair {
char file[FILE_SIZE];
char value[VALUE_SIZE];
@@ -87,9 +79,9 @@ struct config_device {
char name[NAME_SIZE];
char symlink[NAME_SIZE];
struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
- char owner[OWNER_SIZE];
- char group[GROUP_SIZE];
- unsigned int mode;
+ char owner[USER_SIZE];
+ char group[USER_SIZE];
+ mode_t mode;
int partitions;
int ignore_remove;
char config_file[NAME_SIZE];
@@ -100,8 +92,8 @@ struct perm_device {
struct list_head node;
char name[NAME_SIZE];
- char owner[OWNER_SIZE];
- char group[GROUP_SIZE];
+ char owner[USER_SIZE];
+ char group[USER_SIZE];
unsigned int mode;
};