udev_rules.h revision 594dd610252923591ed0f310695e82d3fb87e581
/*
*
* 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 PAIRS_MAX 5
#define RULEFILE_SUFFIX ".rules"
enum key_operation {
};
struct key {
enum key_operation operation;
};
struct key_pair {
};
struct key_pairs {
int count;
};
enum import_type {
};
struct udev_rule {
struct key goto_label;
struct key kernel_name;
enum import_type import_type;
struct key wait_for_sysfs;
enum key_operation mode_operation;
unsigned int partitions;
unsigned int last_rule:1,
char buf[];
};
struct udev_rules {
char *buf;
int mapped;
int resolve_names;
};
extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev, struct sysfs_class_device *class_dev);
extern int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev, struct sysfs_device *sysfs_device);
#endif