am e4ca88d9
: Merge "Add functionlity to the scripts to replace tokens in kernel headers based on architecture."
* commit 'e4ca88d9fa8757e4fb4056fcafa5bc15b406a2fd': Add functionlity to the scripts to replace tokens in kernel headers based on architecture.
This commit is contained in:
commit
261e9d08db
@ -47,8 +47,8 @@ struct flock {
|
|||||||
short l_type;
|
short l_type;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
short l_whence;
|
short l_whence;
|
||||||
off_t l_start;
|
__kernel_off_t l_start;
|
||||||
off_t l_len;
|
__kernel_off_t l_len;
|
||||||
long l_sysid;
|
long l_sysid;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
__kernel_pid_t l_pid;
|
__kernel_pid_t l_pid;
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
typedef struct kldir_ent_s {
|
typedef struct kldir_ent_s {
|
||||||
u64 magic;
|
u64 magic;
|
||||||
off_t offset;
|
__kernel_off_t offset;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
unsigned long pointer;
|
unsigned long pointer;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
@ -34,7 +34,7 @@ struct stat {
|
|||||||
gid_t st_gid;
|
gid_t st_gid;
|
||||||
unsigned st_rdev;
|
unsigned st_rdev;
|
||||||
long st_pad2[2];
|
long st_pad2[2];
|
||||||
off_t st_size;
|
__kernel_off_t st_size;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
long st_pad3;
|
long st_pad3;
|
||||||
time_t st_atime;
|
time_t st_atime;
|
||||||
@ -91,7 +91,7 @@ struct stat {
|
|||||||
unsigned int st_rdev;
|
unsigned int st_rdev;
|
||||||
unsigned int st_pad1[3];
|
unsigned int st_pad1[3];
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
off_t st_size;
|
__kernel_off_t st_size;
|
||||||
unsigned int st_atime;
|
unsigned int st_atime;
|
||||||
unsigned int st_atime_nsec;
|
unsigned int st_atime_nsec;
|
||||||
unsigned int st_mtime;
|
unsigned int st_mtime;
|
||||||
|
@ -66,6 +66,9 @@ def cleanupFile( path, original_path):
|
|||||||
if arch and arch in kernel_default_arch_macros:
|
if arch and arch in kernel_default_arch_macros:
|
||||||
macros.update(kernel_default_arch_macros[arch])
|
macros.update(kernel_default_arch_macros[arch])
|
||||||
|
|
||||||
|
if arch and arch in kernel_arch_token_replacements:
|
||||||
|
blocks.replaceTokens( kernel_arch_token_replacements[arch] )
|
||||||
|
|
||||||
blocks.optimizeMacros( macros )
|
blocks.optimizeMacros( macros )
|
||||||
blocks.optimizeIf01()
|
blocks.optimizeIf01()
|
||||||
blocks.removeVarsAndFuncs( statics )
|
blocks.removeVarsAndFuncs( statics )
|
||||||
|
@ -48,6 +48,11 @@ kernel_default_arch_macros = {
|
|||||||
"mips": {"CONFIG_32BIT":"1"},
|
"mips": {"CONFIG_32BIT":"1"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kernel_arch_token_replacements = {
|
||||||
|
"arm": {},
|
||||||
|
"x86": {},
|
||||||
|
"mips": {"off_t":"__kernel_off_t"},
|
||||||
|
}
|
||||||
# Replace tokens in the output according to this mapping
|
# Replace tokens in the output according to this mapping
|
||||||
kernel_token_replacements = {
|
kernel_token_replacements = {
|
||||||
"asm": "__asm__",
|
"asm": "__asm__",
|
||||||
|
Loading…
Reference in New Issue
Block a user