Switch kernel header parsing to python libclang

Replace the tokenizer in cpp.py with libclang.

Bug: 18937958
Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
This commit is contained in:
Tao Bao
2015-01-28 10:07:51 -08:00
parent 11829be3e1
commit d7db594b8d
670 changed files with 32589 additions and 32507 deletions

View File

@@ -22,28 +22,28 @@
#define NFS4_OPAQUE_LIMIT 1024
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
enum cld_command {
Cld_Create,
Cld_Remove,
Cld_Check,
Cld_Create,
Cld_Remove,
Cld_Check,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Cld_GraceDone,
Cld_GraceDone,
};
struct cld_name {
uint16_t cn_len;
uint16_t cn_len;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
unsigned char cn_id[NFS4_OPAQUE_LIMIT];
unsigned char cn_id[NFS4_OPAQUE_LIMIT];
} __attribute__((packed));
struct cld_msg {
uint8_t cm_vers;
uint8_t cm_vers;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
uint8_t cm_cmd;
int16_t cm_status;
uint32_t cm_xid;
union {
uint8_t cm_cmd;
int16_t cm_status;
uint32_t cm_xid;
union {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
int64_t cm_gracetime;
struct cld_name cm_name;
} __attribute__((packed)) cm_u;
int64_t cm_gracetime;
struct cld_name cm_name;
} __attribute__((packed)) cm_u;
} __attribute__((packed));
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif

View File

@@ -43,6 +43,6 @@
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define NFSEXP_V4ROOT 0x10000
#define NFSEXP_ALLFLAGS 0x1FE7F
#define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH | NFSEXP_ALLSQUASH | NFSEXP_INSECURE_PORT)
#define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH | NFSEXP_ALLSQUASH | NFSEXP_INSECURE_PORT)
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

View File

@@ -26,33 +26,33 @@
#include <linux/nfs4.h>
struct nfs_fhbase_old {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 fb_dcookie;
__u32 fb_ino;
__u32 fb_dirino;
__u32 fb_dev;
__u32 fb_dcookie;
__u32 fb_ino;
__u32 fb_dirino;
__u32 fb_dev;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 fb_xdev;
__u32 fb_xino;
__u32 fb_generation;
__u32 fb_xdev;
__u32 fb_xino;
__u32 fb_generation;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct nfs_fhbase_new {
__u8 fb_version;
__u8 fb_auth_type;
__u8 fb_fsid_type;
__u8 fb_version;
__u8 fb_auth_type;
__u8 fb_fsid_type;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 fb_fileid_type;
__u32 fb_auth[1];
__u8 fb_fileid_type;
__u32 fb_auth[1];
};
struct knfsd_fh {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
unsigned int fh_size;
union {
struct nfs_fhbase_old fh_old;
__u32 fh_pad[NFS4_FHSIZE/4];
unsigned int fh_size;
union {
struct nfs_fhbase_old fh_old;
__u32 fh_pad[NFS4_FHSIZE / 4];
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct nfs_fhbase_new fh_new;
} fh_base;
struct nfs_fhbase_new fh_new;
} fh_base;
};
#define ofh_dcookie fh_base.fh_old.fb_dcookie
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

View File

@@ -19,6 +19,6 @@
#ifndef _UAPILINUX_NFSD_STATS_H
#define _UAPILINUX_NFSD_STATS_H
#include <linux/nfs4.h>
#define NFSD_USAGE_WRAP (HZ*1000000)
#define NFSD_USAGE_WRAP (HZ * 1000000)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif