chiark / gitweb /
[PATCH] avoid building klibc test programs and pass SUBDIRS= to klibc clean
[elogind.git] / namedev.h
index f1e0082241e8f611aeb9a637bd54e6cb90f05267..e29279243bca829838408d00582984bf140c7123 100644 (file)
--- a/namedev.h
+++ b/namedev.h
 
 struct sysfs_class_device;
 
-#define BUS_SIZE               30
-#define FILE_SIZE              50
-#define VALUE_SIZE             100
-#define ID_SIZE                        50
-#define PLACE_SIZE             50
-#define PROGRAM_SIZE           100
+#define BUS_SIZE               32
+#define FILE_SIZE              64
+#define VALUE_SIZE             128
+#define ID_SIZE                        64
+#define PLACE_SIZE             64
+#define DRIVER_SIZE            64
+#define PROGRAM_SIZE           128
 
 #define FIELD_BUS              "BUS"
 #define FIELD_SYSFS            "SYSFS"
@@ -42,6 +43,8 @@ struct sysfs_class_device;
 #define FIELD_PROGRAM          "PROGRAM"
 #define FIELD_RESULT           "RESULT"
 #define FIELD_KERNEL           "KERNEL"
+#define FIELD_SUBSYSTEM                "SUBSYSTEM"
+#define FIELD_DRIVER           "DRIVER"
 #define FIELD_NAME             "NAME"
 #define FIELD_SYMLINK          "SYMLINK"
 #define FIELD_OWNER            "OWNER"
@@ -49,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
@@ -56,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];
@@ -78,13 +74,16 @@ struct config_device {
        char kernel[NAME_SIZE];
        char program[PROGRAM_SIZE];
        char result[PROGRAM_SIZE];
+       char subsystem[SUBSYSTEM_SIZE];
+       char driver[DRIVER_SIZE];
        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;
 };
@@ -93,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;
 };