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] simplify sysfs_pair handling
[elogind.git]
/
udev_rules.h
diff --git
a/udev_rules.h
b/udev_rules.h
index 688d4798e16650120469f843e479794afa0fc745..94a5d9d5fd11c3e9143229d8c30714799f678d71 100644
(file)
--- a/
udev_rules.h
+++ b/
udev_rules.h
@@
-48,7
+48,7
@@
#define OPTION_IGNORE_REMOVE "ignore_remove"
#define OPTION_PARTITIONS "all_partitions"
#define OPTION_IGNORE_REMOVE "ignore_remove"
#define OPTION_PARTITIONS "all_partitions"
-#define
MAX_SYSFS_PAIRS
5
+#define
KEY_SYSFS_PAIRS_MAX
5
#define RULEFILE_SUFFIX ".rules"
#define RULEFILE_SUFFIX ".rules"
@@
-60,8
+60,8
@@
enum key_operation {
KEY_OP_ASSIGN,
};
KEY_OP_ASSIGN,
};
-struct
sysfs
_pair {
- char
file[PATH
_SIZE];
+struct
key
_pair {
+ char
name[NAME
_SIZE];
char value[VALUE_SIZE];
enum key_operation operation;
};
char value[VALUE_SIZE];
enum key_operation operation;
};
@@
-83,7
+83,8
@@
struct udev_rule {
enum key_operation program_operation;
char result[PATH_SIZE];
enum key_operation result_operation;
enum key_operation program_operation;
char result[PATH_SIZE];
enum key_operation result_operation;
- struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
+ struct key_pair sysfs_pair[KEY_SYSFS_PAIRS_MAX];
+ int sysfs_pair_count;
char name[PATH_SIZE];
char symlink[PATH_SIZE];
char name[PATH_SIZE];
char symlink[PATH_SIZE];