mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-23 23:10:53 +07:00
e8fd8fec23
Only the public header maintains #ifndef in the header, together with pragma. The other ones contain only pragma. As reported by Shawn Landden on systemd mailing list this is compatible with all major compilers and gcc has this since version 3.3.
30 lines
520 B
C
30 lines
520 B
C
#pragma once
|
|
|
|
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
|