- cast to uint32_t for shift.
- add an array of names so that the lists don't get out of sync. - no comma after last enum.
This commit is contained in:
parent
00dd70ade5
commit
9f7fe9b1c9
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lkm.h,v 1.38 2005/11/25 20:13:54 thorpej Exp $ */
|
||||
/* $NetBSD: lkm.h,v 1.39 2006/05/15 14:31:29 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Header file used by loadable kernel modules and loadable kernel module
|
||||
@ -53,9 +53,19 @@ typedef enum loadmod {
|
||||
LM_EXEC,
|
||||
LM_COMPAT,
|
||||
LM_MISC,
|
||||
LM_DRV,
|
||||
LM_DRV
|
||||
} MODTYPE;
|
||||
|
||||
#define MODTYPE_NAMES \
|
||||
"SYSCALL", \
|
||||
"VFS", \
|
||||
"DEV", \
|
||||
"STRMOD", \
|
||||
"EXEC", \
|
||||
"COMPAT", \
|
||||
"MISC", \
|
||||
"DRV"
|
||||
|
||||
/*
|
||||
* Version of module interface. Bump if kernel structures or API affecting
|
||||
* LKM modules change, unless the kernel version is bumped at the
|
||||
@ -424,7 +434,7 @@ struct lmc_stat {
|
||||
};
|
||||
|
||||
#define LKM_MAKEMAJOR(b, c) ((((b) & 0xffff) << 16) | ((c) & 0xffff))
|
||||
#define LKM_BLOCK_MAJOR(v) (int)((int16_t)(((v) >> 16) & 0xffff))
|
||||
#define LKM_BLOCK_MAJOR(v) (int)((int16_t)(((uint32_t)(v) >> 16) & 0xffff))
|
||||
#define LKM_CHAR_MAJOR(v) (int)((int16_t)((v) & 0xffff))
|
||||
|
||||
#endif /* !_SYS_LKM_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user