chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] updated the man page with the latest format specifier changes.
[elogind.git]
/
udev.h
diff --git
a/udev.h
b/udev.h
index 1f6e981cc2d627841661737d95f660664cc0ec88..6798f136663275fc05198fbc3def8d39b0023781 100644
(file)
--- a/
udev.h
+++ b/
udev.h
@@
-60,13
+60,6
@@
extern int log_message (int level, const char *format, ...)
#define OWNER_SIZE 30
#define GROUP_SIZE 30
#define OWNER_SIZE 30
#define GROUP_SIZE 30
-struct device_attr {
- char name[NAME_SIZE];
- char owner[OWNER_SIZE];
- char group[GROUP_SIZE];
- mode_t mode;
-};
-
struct udevice {
char name[NAME_SIZE];
char owner[OWNER_SIZE];
struct udevice {
char name[NAME_SIZE];
char owner[OWNER_SIZE];
@@
-75,8
+68,20
@@
struct udevice {
int major;
int minor;
mode_t mode;
int major;
int minor;
mode_t mode;
+
+ /* fields that help us in building strings */
+ unsigned char bus_id[SYSFS_NAME_LEN];
+ unsigned char callout_value[NAME_SIZE];
+ unsigned char kernel_number[NAME_SIZE];
+
};
};
+#define strfieldcpy(to, from) \
+do { \
+ to[sizeof(to)-1] = '\0'; \
+ strncpy(to, from, sizeof(to)-1); \
+} while (0)
+
extern int udev_add_device(char *path, char *subsystem);
extern int udev_remove_device(char *path, char *subsystem);
extern int udev_add_device(char *path, char *subsystem);
extern int udev_remove_device(char *path, char *subsystem);