chiark / gitweb /
[PATCH] determine device type in udev_init_device()
[elogind.git] / udev.h
diff --git a/udev.h b/udev.h
index 5beec645572b121ba6f3c2d1a84f343447f581f2..d6dbd7c3325dcd00dbd47562fd22eeac52b47a3f 100644 (file)
--- a/udev.h
+++ b/udev.h
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include "libsysfs/sysfs/libsysfs.h"
+#include "list.h"
 
 #define ALARM_TIMEOUT                  120
 #define COMMENT_CHARACTER              '#'
 #define HOTPLUGD_DIR                   "/etc/hotplug.d"
 #define HOTPLUG_SUFFIX                 ".hotplug"
 
+#define DEFAULT_PARTITIONS_COUNT       15
+
+enum device_type {
+       UNKNOWN,
+       CLASS,
+       BLOCK,
+       NET,
+       PHYSDEV,
+};
+
 struct udevice {
        char devpath[DEVPATH_SIZE];
        char subsystem[SUBSYSTEM_SIZE];
@@ -56,8 +67,7 @@ struct udevice {
        char group[USER_SIZE];
        mode_t mode;
        char type;
-       int major;
-       int minor;
+       dev_t devt;
 
        char devname[NAME_SIZE];
        char tmp_node[NAME_SIZE];
@@ -77,7 +87,7 @@ extern int udev_remove_device(struct udevice *udev);
 extern void udev_init_config(void);
 extern int udev_start(void);
 extern void udev_multiplex_directory(struct udevice *udev, const char *basedir, const char *suffix);
-extern int udev_make_node(struct udevice *udev, const char *file, int major, int minor, mode_t mode, uid_t uid, gid_t gid);
+extern int udev_make_node(struct udevice *udev, const char *file, dev_t devt, mode_t mode, uid_t uid, gid_t gid);
 
 extern char sysfs_path[SYSFS_PATH_MAX];
 extern char udev_root[PATH_MAX];