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_PLACE "PLACE"
37 #define FIELD_PROGRAM "PROGRAM"
38 #define FIELD_RESULT "RESULT"
39 #define FIELD_DRIVER "DRIVER"
40 #define FIELD_NAME "NAME"
41 #define FIELD_SYMLINK "SYMLINK"
42 #define FIELD_OWNER "OWNER"
43 #define FIELD_GROUP "GROUP"
44 #define FIELD_MODE "MODE"
45 #define FIELD_OPTIONS "OPTIONS"
47 #define OPTION_IGNORE_DEVICE "ignore_device"
48 #define OPTION_IGNORE_REMOVE "ignore_remove"
49 #define OPTION_PARTITIONS "all_partitions"
51 #define MAX_SYSFS_PAIRS 5
53 #define RULEFILE_SUFFIX ".rules"
57 char value[VALUE_SIZE];
60 struct config_device {
61 struct list_head node;
63 char kernel[NAME_SIZE];
64 char subsystem[NAME_SIZE];
67 char place[NAME_SIZE];
68 struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS];
69 char program[PATH_SIZE];
70 char result[PATH_SIZE];
71 char driver[NAME_SIZE];
73 char symlink[PATH_SIZE];
75 char owner[USER_SIZE];
76 char group[USER_SIZE];
83 char config_file[PATH_SIZE];
87 extern struct list_head config_device_list;
89 extern int namedev_init(void);
90 extern int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_dev);
91 extern void namedev_close(void);
93 extern void dump_config_dev(struct config_device *dev);
94 extern void dump_config_dev_list(void);