chiark / gitweb /
[PATCH] add dumb test for all of the different modifiers.
[elogind.git] / udev.h
diff --git a/udev.h b/udev.h
index 1f6e981cc2d627841661737d95f660664cc0ec88..904948d67ac92d7df4fa80e27ae7eea6e44fb64d 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
 
-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];
@@ -77,6 +70,12 @@ struct udevice {
        mode_t mode;
 };
 
+#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);