diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-02-12 22:51:44 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:32:27 -0700 |
commit | 00866ed2a1f755eb027c84827fed1ed77364d436 (patch) | |
tree | b7687cfc1abe2ee483a0e8033f7f05f9f551b97d /udev.h | |
parent | ba053b91e145d7bb88bbd34856f6a6a86e3e718b (diff) |
[PATCH] udev - keep private data out of the database?
Shouldn't we keep the temporary strings out of the database,
or is this information useful for something?
It cuts the length of the data from 628 to 275 bytes.
Diffstat (limited to 'udev.h')
-rw-r--r-- | udev.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -24,6 +24,7 @@ #define UDEV_H #include "libsysfs/libsysfs.h" +#include <stddef.h> #include <sys/param.h> #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]; @@ -43,11 +47,11 @@ struct udevice { unsigned int mode; /* not mode_t due to conflicting definitions in different libcs */ char symlink[NAME_SIZE]; - /* 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) \ |