udev_rules.h revision 38285d23d702258d3b219532a9874555e797a292
/*
*
* Userspace devfs
*
* Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
*
* under the terms of the GNU General Public License as published by the
* Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef UDEV_RULES_H
#define UDEV_RULES_H
#include "libsysfs/sysfs/libsysfs.h"
#include "udev.h"
#include "list.h"
#define KEY_KERNEL "KERNEL"
#define KEY_SUBSYSTEM "SUBSYSTEM"
#define KEY_BUS "BUS"
#define KEY_SYSFS "SYSFS"
#define KEY_ID "ID"
#define KEY_PROGRAM "PROGRAM"
#define KEY_RESULT "RESULT"
#define KEY_DRIVER "DRIVER"
#define KEY_NAME "NAME"
#define KEY_SYMLINK "SYMLINK"
#define KEY_OWNER "OWNER"
#define KEY_GROUP "GROUP"
#define KEY_MODE "MODE"
#define KEY_OPTIONS "OPTIONS"
#define OPTION_LAST_RULE "last_rule"
#define OPTION_IGNORE_DEVICE "ignore_device"
#define OPTION_IGNORE_REMOVE "ignore_remove"
#define OPTION_PARTITIONS "all_partitions"
#define MAX_SYSFS_PAIRS 5
#define RULEFILE_SUFFIX ".rules"
enum key_operation {
};
struct sysfs_pair {
char value[VALUE_SIZE];
enum key_operation operation;
};
struct udev_rule {
enum key_operation bus_operation;
enum key_operation id_operation;
int last_rule;
int ignore_device;
int ignore_remove;
int partitions;
char config_file[PATH_SIZE];
int config_line;
};
extern struct list_head udev_rule_list;
extern int udev_rules_init(void);
extern void udev_rules_close(void);
#endif