2 * Copyright (C) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
3 * Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation version 2 of the License.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #define RULESFILE_SUFFIX ".rules"
39 enum key_operation operation
;
50 struct key_pair keys
[PAIRS_MAX
];
72 struct key_pairs attr
;
75 struct key subsystems
;
77 struct key_pairs attrs
;
83 enum import_type import_type
;
85 mode_t test_mode_mask
;
87 struct key wait_for_sysfs
;
89 struct key goto_label
;
96 enum key_operation mode_operation
;
97 enum escape_type string_escape
;
99 unsigned int link_priority
;
100 unsigned int partitions
;
101 unsigned int last_rule
:1,
116 extern int udev_rules_init(struct udev_rules
*rules
, int resolve_names
);
117 extern void udev_rules_cleanup(struct udev_rules
*rules
);
119 extern void udev_rules_iter_init(struct udev_rules
*rules
);
120 extern struct udev_rule
*udev_rules_iter_next(struct udev_rules
*rules
);
121 extern struct udev_rule
*udev_rules_iter_label(struct udev_rules
*rules
, const char *label
);
123 extern int udev_rules_get_name(struct udev_rules
*rules
, struct udevice
*udev
);
124 extern int udev_rules_get_run(struct udev_rules
*rules
, struct udevice
*udev
);
126 extern void udev_rules_apply_format(struct udevice
*udev
, char *string
, size_t maxsize
);