chiark / gitweb /
[PATCH] udev: mode should be mode_t
[elogind.git] / udevdb.h
index a9ba2f93b466ef15371b8057643e8c66a7c2253b..656613b593242a1a53cc930eaf017a004252e922 100644 (file)
--- a/udevdb.h
+++ b/udevdb.h
@@ -4,10 +4,7 @@
 #ifndef _UDEVDB_H_
 #define _UDEVDB_H_
 
-#include "namedev.h"
-#include "udev.h"
-
-#define UDEVDB         "/home/greg/src/udev/udevdb.tdb" 
+#define UDEV_DB                "udevdb.tdb" 
 
 #define PATH_SIZE      256
 
@@ -19,7 +16,7 @@
 
 struct udevice {
        char name[NAME_SIZE];
-       char sysfs_path[PATH_SIZE];
+       char sysfs_dev_path[PATH_SIZE];
        char class_dev_name[NAME_SIZE];
        char class_name[NAME_SIZE];
        char bus_id[NAME_SIZE];
@@ -28,18 +25,19 @@ struct udevice {
        char type;
        int major;
        int minor;
-       int mode;
+       mode_t mode;
 };
 
 /* Function Prototypes */
 extern void udevdb_exit(void);
 extern int udevdb_init(int init_flag);
 extern int udevdb_delete_udevice(const char *name);
-extern int udevdb_add_udevice(const struct udevice *dev);
+extern int udevdb_add_device(const char *device, const struct sysfs_class_device *class_dev, const char *name, char type, int major, int minor, int mode);
 extern struct udevice *udevdb_get_udevice(const char *name);
 extern struct udevice *udevdb_get_udevice_by_bus(const char *bus, 
                                                        const char *id);
 extern struct udevice *udevdb_get_udevice_by_class(const char *cls,
                                                        const char *cls_dev);
+extern char *udevdb_get_udevice_by_sysfs(const char *path);
 
 #endif /* _UDEVDB_H_ */