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

@@ -56,145 +56,145 @@
#define EDD_INFO_USE_INT13_FN50 (1 << 7)
struct edd_device_params {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u16 length;
__u16 info_flags;
__u32 num_default_cylinders;
__u32 num_default_heads;
__u16 length;
__u16 info_flags;
__u32 num_default_cylinders;
__u32 num_default_heads;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 sectors_per_track;
__u64 number_of_sectors;
__u16 bytes_per_sector;
__u32 dpte_ptr;
__u32 sectors_per_track;
__u64 number_of_sectors;
__u16 bytes_per_sector;
__u32 dpte_ptr;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u16 key;
__u8 device_path_info_length;
__u8 reserved2;
__u16 reserved3;
__u16 key;
__u8 device_path_info_length;
__u8 reserved2;
__u16 reserved3;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 host_bus_type[4];
__u8 interface_type[8];
union {
struct {
__u8 host_bus_type[4];
__u8 interface_type[8];
union {
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u16 base_address;
__u16 reserved1;
__u32 reserved2;
} __attribute__ ((packed)) isa;
__u16 base_address;
__u16 reserved1;
__u32 reserved2;
} __attribute__((packed)) isa;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
__u8 bus;
__u8 slot;
__u8 function;
struct {
__u8 bus;
__u8 slot;
__u8 function;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 channel;
__u32 reserved;
} __attribute__ ((packed)) pci;
struct {
__u8 channel;
__u32 reserved;
} __attribute__((packed)) pci;
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 reserved;
} __attribute__ ((packed)) ibnd;
struct {
__u64 reserved;
__u64 reserved;
} __attribute__((packed)) ibnd;
struct {
__u64 reserved;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} __attribute__ ((packed)) xprs;
struct {
__u64 reserved;
} __attribute__ ((packed)) htpt;
} __attribute__((packed)) xprs;
struct {
__u64 reserved;
} __attribute__((packed)) htpt;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
__u64 reserved;
} __attribute__ ((packed)) unknown;
} interface_path;
struct {
__u64 reserved;
} __attribute__((packed)) unknown;
} interface_path;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
union {
struct {
__u8 device;
__u8 reserved1;
union {
struct {
__u8 device;
__u8 reserved1;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u16 reserved2;
__u32 reserved3;
__u64 reserved4;
} __attribute__ ((packed)) ata;
__u16 reserved2;
__u32 reserved3;
__u64 reserved4;
} __attribute__((packed)) ata;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
__u8 device;
__u8 lun;
__u8 reserved1;
struct {
__u8 device;
__u8 lun;
__u8 reserved1;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 reserved2;
__u32 reserved3;
__u64 reserved4;
} __attribute__ ((packed)) atapi;
__u8 reserved2;
__u32 reserved3;
__u64 reserved4;
} __attribute__((packed)) atapi;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
__u16 id;
__u64 lun;
__u16 reserved1;
struct {
__u16 id;
__u64 lun;
__u16 reserved1;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 reserved2;
} __attribute__ ((packed)) scsi;
struct {
__u64 serial_number;
__u32 reserved2;
} __attribute__((packed)) scsi;
struct {
__u64 serial_number;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 reserved;
} __attribute__ ((packed)) usb;
struct {
__u64 eui;
__u64 reserved;
} __attribute__((packed)) usb;
struct {
__u64 eui;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 reserved;
} __attribute__ ((packed)) i1394;
struct {
__u64 wwid;
__u64 reserved;
} __attribute__((packed)) i1394;
struct {
__u64 wwid;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 lun;
} __attribute__ ((packed)) fibre;
struct {
__u64 identity_tag;
__u64 lun;
} __attribute__((packed)) fibre;
struct {
__u64 identity_tag;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 reserved;
} __attribute__ ((packed)) i2o;
struct {
__u32 array_number;
__u64 reserved;
} __attribute__((packed)) i2o;
struct {
__u32 array_number;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 reserved1;
__u64 reserved2;
} __attribute__ ((packed)) raid;
struct {
__u32 reserved1;
__u64 reserved2;
} __attribute__((packed)) raid;
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 device;
__u8 reserved1;
__u16 reserved2;
__u32 reserved3;
__u8 device;
__u8 reserved1;
__u16 reserved2;
__u32 reserved3;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 reserved4;
} __attribute__ ((packed)) sata;
struct {
__u64 reserved1;
__u64 reserved4;
} __attribute__((packed)) sata;
struct {
__u64 reserved1;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 reserved2;
} __attribute__ ((packed)) unknown;
} device_path;
__u8 reserved4;
__u64 reserved2;
} __attribute__((packed)) unknown;
} device_path;
__u8 reserved4;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 checksum;
} __attribute__ ((packed));
__u8 checksum;
} __attribute__((packed));
struct edd_info {
__u8 device;
__u8 device;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 version;
__u16 interface_support;
__u16 legacy_max_cylinder;
__u8 legacy_max_head;
__u8 version;
__u16 interface_support;
__u16 legacy_max_cylinder;
__u8 legacy_max_head;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 legacy_sectors_per_track;
struct edd_device_params params;
} __attribute__ ((packed));
__u8 legacy_sectors_per_track;
struct edd_device_params params;
} __attribute__((packed));
struct edd {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
unsigned int mbr_signature[EDD_MBR_SIG_MAX];
struct edd_info edd_info[EDDMAXNR];
unsigned char mbr_signature_nr;
unsigned char edd_info_nr;
unsigned int mbr_signature[EDD_MBR_SIG_MAX];
struct edd_info edd_info[EDDMAXNR];
unsigned char mbr_signature_nr;
unsigned char edd_info_nr;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
#endif