chiark / gitweb /
[PATCH] udevdb prototype
[elogind.git] / udevdb.h
1 /*
2  * udevdb header file
3  */
4 #ifndef _UDEVDB_H_
5 #define _UDEVDB_H_
6
7 #include "namedev.h"
8 #include "udev.h"
9
10 #define BUS_DB          "/home/stekloff/src/udev-0.2/busdb.tdb"
11 #define CLASS_DB        "/home/stekloff/src/udev-0.2/classdb.tdb"
12 #define NAME_DB         "/home/stekloff/src/udev-0.2/namedb.tdb"
13
14 #define PATH_SIZE       256
15
16 #define UDEVDB_DEL      "#"
17
18 struct udevice {
19         char name[NAME_SIZE];
20         char sysfs_path[PATH_SIZE];
21         char class_dev_name[NAME_SIZE];
22         char class_name[NAME_SIZE];
23         char bus_id[NAME_SIZE];
24         char bus_name[NAME_SIZE];
25         char driver[NAME_SIZE];
26         char type;
27         int major;
28         int minor;
29         int mode;
30 };
31
32 /* Function Prototypes */
33 extern int udevdb_delete_udevice(const char *name);
34 extern int udevdb_add_udevice(const struct udevice *dev);
35 extern struct udevice *udevdb_get_udevice(const char *name);
36 extern struct udevice *udevdb_get_udevice_by_bus(const char *bus, 
37                                                         const char *id);
38 extern struct udevice *udevdb_get_udevice_by_class(const char *cls,
39                                                         const char *cls_dev);
40
41 #endif /* _UDEVDB_H_ */