chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] add pci to the bus_files list.
[elogind.git]
/
namedev.h
diff --git
a/namedev.h
b/namedev.h
index 94fdf4ac9191baf6982b543d1e42ad0d886c266d..1eaf4fee4d9a2123adbe995b3ef4a74cbe0c535c 100644
(file)
--- a/
namedev.h
+++ b/
namedev.h
@@
-49,21
+49,41
@@
enum config_type {
#define TYPE_TOPOLOGY "TOPOLOGY"
#define TYPE_REPLACE "REPLACE"
#define TYPE_CALLOUT "CALLOUT"
#define TYPE_TOPOLOGY "TOPOLOGY"
#define TYPE_REPLACE "REPLACE"
#define TYPE_CALLOUT "CALLOUT"
+
+#define FIELD_BUS "BUS"
+#define FIELD_ID "ID"
+#define FIELD_SYSFS "SYSFS_"
+#define FIELD_PLACE "PLACE"
+#define FIELD_PROGRAM "PROGRAM"
+#define FIELD_KERNEL "KERNEL"
+#define FIELD_NAME "NAME"
+#define FIELD_SYMLINK "SYMLINK"
+
#define CALLOUT_MAXARG 8
#define CALLOUT_MAXARG 8
+#define MAX_SYSFS_PAIRS 5
+
+struct sysfs_pair {
+ char file[FILE_SIZE];
+ char value[VALUE_SIZE];
+};
struct config_device {
struct list_head node;
enum config_type type;
char bus[BUS_SIZE];
struct config_device {
struct list_head node;
enum config_type type;
char bus[BUS_SIZE];
- char sysfs_file[FILE_SIZE];
- char sysfs_value[VALUE_SIZE];
char id[ID_SIZE];
char place[PLACE_SIZE];
char kernel_name[NAME_SIZE];
char exec_program[FILE_SIZE];
char id[ID_SIZE];
char place[PLACE_SIZE];
char kernel_name[NAME_SIZE];
char exec_program[FILE_SIZE];
+ char name[NAME_SIZE];
+ char symlink[NAME_SIZE];
+ struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
+};
+
+struct perm_device {
+ struct list_head node;
- /* what to set the device to */
char name[NAME_SIZE];
char owner[OWNER_SIZE];
char group[GROUP_SIZE];
char name[NAME_SIZE];
char owner[OWNER_SIZE];
char group[GROUP_SIZE];
@@
-71,15
+91,18
@@
struct config_device {
};
extern struct list_head config_device_list;
};
extern struct list_head config_device_list;
+extern struct list_head perm_device_list;
extern int namedev_init(void);
extern int namedev_name_device(struct sysfs_class_device *class_dev, struct udevice *dev);
extern int namedev_init_permissions(void);
extern int namedev_init_rules(void);
extern int namedev_init(void);
extern int namedev_name_device(struct sysfs_class_device *class_dev, struct udevice *dev);
extern int namedev_init_permissions(void);
extern int namedev_init_rules(void);
-extern int add_
config_dev(struct config
_device *new_dev);
+extern int add_
perm_dev(struct perm
_device *new_dev);
extern void dump_config_dev(struct config_device *dev);
extern void dump_config_dev_list(void);
extern void dump_config_dev(struct config_device *dev);
extern void dump_config_dev_list(void);
+extern void dump_perm_dev(struct perm_device *dev);
+extern void dump_perm_dev_list(void);
extern int get_pair(char **orig_string, char **left, char **right);
extern int get_pair(char **orig_string, char **left, char **right);