mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-24 07:20:52 +07:00
fca5b9bcd4
We need to cope with the case in which a 32 bits machine is opening a 64 bits kernel module and vice-versa. The offset in `struct module' are different and do not depend on the architecture we are running, but rather on the architecture they were created for. This fixes `make check' in 32 bits machines (since we are shipping 64 bits modules for testing)
33 lines
589 B
C
33 lines
589 B
C
#ifndef _TESTSUITE_STRIPPED_MODULE_H
|
|
#define _TESTSUITE_STRIPPED_MODULE_H
|
|
|
|
enum module_state
|
|
{
|
|
MODULE_STATE_LIVE,
|
|
MODULE_STATE_COMING,
|
|
MODULE_STATE_GOING,
|
|
};
|
|
|
|
struct list_head {
|
|
struct list_head *next, *prev;
|
|
};
|
|
|
|
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
|
|
|
|
struct module
|
|
{
|
|
enum module_state state;
|
|
|
|
/* Member of list of modules */
|
|
struct list_head list;
|
|
|
|
/* Unique handle for this module */
|
|
char name[MODULE_NAME_LEN];
|
|
};
|
|
|
|
/* padding */
|
|
#define MODULE_NAME_OFFSET_64 4 + 4 + 2 * 8
|
|
#define MODULE_NAME_OFFSET_32 4 + 2 * 4
|
|
|
|
#endif
|