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.
29 struct sysfs_class_device;
31 #define FIELD_KERNEL "KERNEL"
32 #define FIELD_SUBSYSTEM "SUBSYSTEM"
33 #define FIELD_BUS "BUS"
34 #define FIELD_SYSFS "SYSFS"
36 #define FIELD_PROGRAM "PROGRAM"
37 #define FIELD_RESULT "RESULT"
38 #define FIELD_DRIVER "DRIVER"
39 #define FIELD_NAME "NAME"
40 #define FIELD_SYMLINK "SYMLINK"
41 #define FIELD_OWNER "OWNER"
42 #define FIELD_GROUP "GROUP"
43 #define FIELD_MODE "MODE"
44 #define FIELD_OPTIONS "OPTIONS"
46 #define OPTION_IGNORE_DEVICE "ignore_device"
47 #define OPTION_IGNORE_REMOVE "ignore_remove"
48 #define OPTION_PARTITIONS "all_partitions"
50 #define MAX_SYSFS_PAIRS 5
52 #define RULEFILE_SUFFIX ".rules"
56 char value[VALUE_SIZE];
59 struct config_device {
60 struct list_head node;
62 char kernel[NAME_SIZE];
63 char subsystem[NAME_SIZE];
66 struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
67 char program[PATH_SIZE];
68 char result[PATH_SIZE];
69 char driver[NAME_SIZE];
71 char symlink[PATH_SIZE];
73 char owner[USER_SIZE];
74 char group[USER_SIZE];
81 char config_file[PATH_SIZE];
85 extern struct list_head config_device_list;
87 extern int namedev_init(void);
88 extern int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_dev);
89 extern void namedev_close(void);
91 extern void dump_config_dev(struct config_device *dev);
92 extern void dump_config_dev_list(void);