3535#include <sys/stat.h>
3636#include <unistd.h>
3737
38+ /* We needn't be concerned with the endian-ness of the host,
39+ * only with the endian-ness of the data.
40+ */
41+
42+ #include "types.h"
3843#include "pcihdr.h"
3944
45+
4046char * rom = NULL ;
4147size_t romlen = 0 ;
4248
43- /* Prototypes for functions exported from shared/classcodes.c */
49+
50+ /* Prototypes for functions exported from devsupp/pci/classcodes.c */
4451
4552char * pci_device_class_name (u32 code );
4653char * pci_code_type_name (unsigned char code );
4754
4855/* Functions local to this file:
49- int dump_rom_header(rom_header_t *data);
50- int dump_pci_data(pci_data_t *data);
56+ bool dump_rom_header(rom_header_t *data);
57+ bool dump_pci_data(pci_data_t *data);
5158 void dump_platform_extensions(u8 type, rom_header_t *data);
5259 */
5360
54- static int dump_rom_header (rom_header_t * data )
61+ static bool dump_rom_header (rom_header_t * data )
5562{ /* Return TRUE for "no problem" */
5663 const u16 pci_header_signature = 0x55aa ;
5764 u16 sig = BIG_ENDIAN_WORD_FETCH (data -> signature );
@@ -71,10 +78,10 @@ static int dump_rom_header(rom_header_t *data)
7178 printf ("\n Pointer to PCI Data Structure: 0x%04x\n\n" ,
7279 LITTLE_ENDIAN_WORD_FETCH (data -> data_ptr ));
7380
74- return (sig == pci_header_signature );
81+ return (BOOLVAL ( sig == pci_header_signature ) );
7582}
7683
77- static int dump_pci_data (pci_data_t * data )
84+ static bool dump_pci_data (pci_data_t * data )
7885{ /* Return TRUE for "no problem" */
7986 const u32 pci_data_hdr = PCI_DATA_HDR ;
8087
@@ -106,7 +113,7 @@ static int dump_pci_data(pci_data_t *data)
106113 data -> last_image_flag & 0x80 ?"" :"not " );
107114 printf (" Reserved: 0x%04x\n\n" , little_word (data -> reserved_2 ));
108115
109- return (sig == PCI_DATA_HDR );
116+ return (BOOLVAL ( sig == PCI_DATA_HDR ) );
110117}
111118
112119static void dump_platform_extensions (u8 type , rom_header_t * data )
0 commit comments