X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev.h;h=b5088b90c69e136d84e6ecd23dc165829e211e5c;hb=1d24d9977d46e20779e7d9d05f4b6aa6dcad28cc;hp=00f1361016d8e743d4503d8c5f08a677f7bdbf66;hpb=eb10f97f2816ae09f949060a2bb8c46b8c1788ed;p=elogind.git diff --git a/udev.h b/udev.h index 00f136101..b5088b90c 100644 --- a/udev.h +++ b/udev.h @@ -23,7 +23,8 @@ #ifndef UDEV_H #define UDEV_H -#include "libsysfs/libsysfs.h" +#include +#include #include #define COMMENT_CHARACTER '#' @@ -33,6 +34,9 @@ #define GROUP_SIZE 30 #define MODE_SIZE 8 +/* length of public data */ +#define UDEVICE_LEN (offsetof(struct udevice, bus_id)) + struct udevice { char name[NAME_SIZE]; char owner[OWNER_SIZE]; @@ -42,12 +46,13 @@ struct udevice { int minor; unsigned int mode; /* not mode_t due to conflicting definitions in different libcs */ char symlink[NAME_SIZE]; + int partitions; - /* fields that help us in building strings */ - unsigned char bus_id[SYSFS_NAME_LEN]; - unsigned char program_result[NAME_SIZE]; - unsigned char kernel_number[NAME_SIZE]; - unsigned char kernel_name[NAME_SIZE]; + /* private data that help us in building strings */ + char bus_id[SYSFS_NAME_LEN]; + char program_result[NAME_SIZE]; + char kernel_number[NAME_SIZE]; + char kernel_name[NAME_SIZE]; }; #define strfieldcpy(to, from) \ @@ -73,5 +78,6 @@ extern char default_mode_str[MODE_SIZE]; extern char default_owner_str[OWNER_SIZE]; extern char default_group_str[GROUP_SIZE]; extern int udev_log; +extern int udev_sleep; #endif