6 * Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation version 2 of the License.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include "libsysfs/sysfs/libsysfs.h"
31 #define RULEFILE_SUFFIX ".rules"
43 enum key_operation operation;
54 struct key_pair keys[PAIRS_MAX];
58 struct key kernel_name;
69 struct key_pairs sysfs;
77 enum key_operation mode_operation;
80 unsigned int partitions;
81 unsigned int last_rule:1,
98 extern int udev_rules_init(struct udev_rules *rules, int resolve_names);
99 extern void udev_rules_close(struct udev_rules *rules);
101 extern void udev_rules_iter_init(struct udev_rules *rules);
102 extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules);
104 extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev, struct sysfs_class_device *class_dev);
105 extern int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev, struct sysfs_device *sysfs_device);