#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];
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);