struct id_entry *next;
u32 id12, id34;
byte cat;
- byte name[1];
+ char name[1];
};
enum id_entry_type {
return h % HASH_SIZE;
}
-static byte *id_lookup(struct pci_access *a, int cat, int id1, int id2, int id3, int id4)
+static char *id_lookup(struct pci_access *a, int cat, int id1, int id2, int id3, int id4)
{
struct id_entry *n;
u32 id12 = id_pair(id1, id2);
return n ? n->name : NULL;
}
-static int id_insert(struct pci_access *a, int cat, int id1, int id2, int id3, int id4, byte *text)
+static int id_insert(struct pci_access *a, int cat, int id1, int id2, int id3, int id4, char *text)
{
u32 id12 = id_pair(id1, id2);
u32 id34 = id_pair(id3, id4);
return 0;
}
-static int id_hex(byte *p, int cnt)
+static int id_hex(char *p, int cnt)
{
int x = 0;
while (cnt--)
static const char *id_parse_list(struct pci_access *a, FILE *f, int *lino)
{
- byte line[MAX_LINE];
- byte *p;
+ char line[MAX_LINE];
+ char *p;
int id1=0, id2=0, id3=0, id4=0;
int cat = -1;
int nest;
}
}
-static byte *
+static char *
id_lookup_subsys(struct pci_access *a, int iv, int id, int isv, int isd)
{
- byte *d = NULL;
+ char *d = NULL;
if (iv > 0 && id > 0) /* Per-device lookup */
d = id_lookup(a, ID_SUBSYSTEM, iv, id, isv, isd);
if (!d) /* Generic lookup */
return d;
}
-static byte *
-format_name(char *buf, int size, int flags, byte *name, byte *num, byte *unknown)
+static char *
+format_name(char *buf, int size, int flags, char *name, char *num, char *unknown)
{
int res;
if ((flags & PCI_LOOKUP_NO_NUMBERS) && !name)
return buf;
}
-static byte *
-format_name_pair(char *buf, int size, int flags, byte *v, byte *d, byte *num)
+static char *
+format_name_pair(char *buf, int size, int flags, char *v, char *d, char *num)
{
int res;
if ((flags & PCI_LOOKUP_NO_NUMBERS) && (!v || !d))
pci_lookup_name(struct pci_access *a, char *buf, int size, int flags, ...)
{
va_list args;
- byte *v, *d, *cls, *pif;
+ char *v, *d, *cls, *pif;
int iv, id, isv, isd, icls, ipif;
- byte numbuf[16], pifbuf[32];
+ char numbuf[16], pifbuf[32];
va_start(args, flags);
{
int c;
struct pci_dev *p = d->dev;
- byte classbuf[128], devbuf[128];
+ char classbuf[128], devbuf[128];
show_slot_name(d);
printf(" %s: %s",
static void
show_pcix_bridge(struct device *d, int where)
{
- static const byte * const sec_clock_freq[8] = { "conv", "66MHz", "100MHz", "133MHz", "?4", "?5", "?6", "?7" };
+ static const char * const sec_clock_freq[8] = { "conv", "66MHz", "100MHz", "133MHz", "?4", "?5", "?6", "?7" };
u16 secstatus;
u32 status, upstcr, downstcr;
}
static void
-print_it(byte *line, byte *p)
+print_it(char *line, char *p)
{
*p++ = '\n';
*p = 0;
*p = ' ';
}
-static void show_tree_bridge(struct bridge *, byte *, byte *);
+static void show_tree_bridge(struct bridge *, char *, char *);
static void
-show_tree_dev(struct device *d, byte *line, byte *p)
+show_tree_dev(struct device *d, char *line, char *p)
{
struct pci_dev *q = d->dev;
struct bridge *b;
}
static void
-show_tree_bus(struct bus *b, byte *line, byte *p)
+show_tree_bus(struct bus *b, char*line, char *p)
{
if (!b->first_dev)
print_it(line, p);
}
static void
-show_tree_bridge(struct bridge *b, byte *line, byte *p)
+show_tree_bridge(struct bridge *b, char *line, char *p)
{
*p++ = '-';
if (!b->first_bus->sibling)
else
{
struct bus *u = b->first_bus;
- byte *k;
+ char *k;
while (u->sibling)
{