chiark / gitweb /
[PATCH] include missing header to udevtest.c
[elogind.git] / namedev.h
index 7a98d66c24ca42c2b5f964c2751c6eac8610ab8d..e29279243bca829838408d00582984bf140c7123 100644 (file)
--- a/namedev.h
+++ b/namedev.h
@@ -52,6 +52,7 @@ struct sysfs_class_device;
 #define FIELD_MODE             "MODE"
 
 #define ATTR_PARTITIONS                "all_partitions"
+#define ATTR_IGNORE_REMOVE     "ignore_remove"
 #define PARTITIONS_COUNT       15
 
 #define MAX_SYSFS_PAIRS                5
@@ -59,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];
@@ -86,10 +79,11 @@ 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];
        int config_line;
 };
@@ -98,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;
 };