chiark / gitweb /
[PATCH] detect NAME="" as ignore_device rule
[elogind.git] / namedev.h
index 8a3569ec7cd92cd43d9e2712677c1ecdc69b3fa7..a929e527561ba5ee0a5dd049187824c32a728654 100644 (file)
--- a/namedev.h
+++ b/namedev.h
@@ -50,10 +50,11 @@ struct sysfs_class_device;
 #define FIELD_OWNER            "OWNER"
 #define FIELD_GROUP            "GROUP"
 #define FIELD_MODE             "MODE"
+#define FIELD_OPTIONS          "OPTIONS"
 
-#define ATTR_PARTITIONS                "all_partitions"
+#define ATTR_IGNORE_DEVICE     "ignore_device"
 #define ATTR_IGNORE_REMOVE     "ignore_remove"
-#define PARTITIONS_COUNT       15
+#define ATTR_PARTITIONS                "all_partitions"
 
 #define MAX_SYSFS_PAIRS                5
 
@@ -67,22 +68,26 @@ struct sysfs_pair {
 struct config_device {
        struct list_head node;
 
+       char kernel[NAME_SIZE];
+       char subsystem[SUBSYSTEM_SIZE];
        char bus[BUS_SIZE];
        char id[ID_SIZE];
        char place[PLACE_SIZE];
-       char kernel[NAME_SIZE];
+       struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
        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[USER_SIZE];
        char group[USER_SIZE];
        mode_t mode;
+
        int partitions;
+       int ignore_device;
        int ignore_remove;
+
        char config_file[NAME_SIZE];
        int config_line;
 };
@@ -91,6 +96,7 @@ extern struct list_head config_device_list;
 
 extern int namedev_init(void);
 extern int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_dev);
+extern void namedev_close(void);
 
 extern void dump_config_dev(struct config_device *dev);
 extern void dump_config_dev_list(void);