Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 141111
Collapse All | Expand All

(-)pciutils-2.2.3/lspci.c.orig (-13 / +22 lines)
Lines 259-268 Link Here
259
259
260
  show_slot_name(d);
260
  show_slot_name(d);
261
  printf(" %s: %s",
261
  printf(" %s: %s",
262
	 pci_lookup_name(pacc, classbuf, sizeof(classbuf),
262
	 pci_lookup_name(pacc, (char *)classbuf, sizeof(classbuf),
263
			 PCI_LOOKUP_CLASS,
263
			 PCI_LOOKUP_CLASS,
264
			 get_conf_word(d, PCI_CLASS_DEVICE)),
264
			 get_conf_word(d, PCI_CLASS_DEVICE)),
265
	 pci_lookup_name(pacc, devbuf, sizeof(devbuf),
265
	 pci_lookup_name(pacc, (char *)devbuf, sizeof(devbuf),
266
			 PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
266
			 PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
267
			 p->vendor_id, p->device_id));
267
			 p->vendor_id, p->device_id));
268
  if (c = get_conf_byte(d, PCI_REVISION_ID))
268
  if (c = get_conf_byte(d, PCI_REVISION_ID))
Lines 271-277 Link Here
271
    {
271
    {
272
      char *x;
272
      char *x;
273
      c = get_conf_byte(d, PCI_CLASS_PROG);
273
      c = get_conf_byte(d, PCI_CLASS_PROG);
274
      x = pci_lookup_name(pacc, devbuf, sizeof(devbuf),
274
      x = pci_lookup_name(pacc, (char *)devbuf, sizeof(devbuf),
275
			  PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS,
275
			  PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS,
276
			  get_conf_word(d, PCI_CLASS_DEVICE), c);
276
			  get_conf_word(d, PCI_CLASS_DEVICE), c);
277
      if (c || x)
277
      if (c || x)
Lines 533-539 Link Here
533
static void
533
static void
534
show_pcix_bridge(struct device *d, int where)
534
show_pcix_bridge(struct device *d, int where)
535
{
535
{
536
  static const byte * const sec_clock_freq[8] = { "conv", "66MHz", "100MHz", "133MHz", "?4", "?5", "?6", "?7" };
536
  static const byte * const sec_clock_freq[8] = {
537
    (unsigned char *)"conv",
538
    (unsigned char *)"66MHz",
539
    (unsigned char *)"100MHz",
540
    (unsigned char *)"133MHz",
541
    (unsigned char *)"?4",
542
    (unsigned char *)"?5",
543
    (unsigned char *)"?6",
544
    (unsigned char *)"?7"
545
  };
537
  u16 secstatus;
546
  u16 secstatus;
538
  u32 status, upstcr, downstcr;
547
  u32 status, upstcr, downstcr;
539
  
548
  
Lines 2002-2008 Link Here
2002
{
2011
{
2003
  *p++ = '\n';
2012
  *p++ = '\n';
2004
  *p = 0;
2013
  *p = 0;
2005
  fputs(line, stdout);
2014
  fputs((char *)line, stdout);
2006
  for(p=line; *p; p++)
2015
  for(p=line; *p; p++)
2007
    if (*p == '+' || *p == '|')
2016
    if (*p == '+' || *p == '|')
2008
      *p = '|';
2017
      *p = '|';
Lines 2019-2037 Link Here
2019
  struct bridge *b;
2028
  struct bridge *b;
2020
  char namebuf[256];
2029
  char namebuf[256];
2021
2030
2022
  p += sprintf(p, "%02x.%x", q->dev, q->func);
2031
  p += sprintf((char *)p, "%02x.%x", q->dev, q->func);
2023
  for(b=&host_bridge; b; b=b->chain)
2032
  for(b=&host_bridge; b; b=b->chain)
2024
    if (b->br_dev == d)
2033
    if (b->br_dev == d)
2025
      {
2034
      {
2026
	if (b->secondary == b->subordinate)
2035
	if (b->secondary == b->subordinate)
2027
	  p += sprintf(p, "-[%04x:%02x]-", b->domain, b->secondary);
2036
	  p += sprintf((char *)p, "-[%04x:%02x]-", b->domain, b->secondary);
2028
	else
2037
	else
2029
	  p += sprintf(p, "-[%04x:%02x-%02x]-", b->domain, b->secondary, b->subordinate);
2038
	  p += sprintf((char *)p, "-[%04x:%02x-%02x]-", b->domain, b->secondary, b->subordinate);
2030
        show_tree_bridge(b, line, p);
2039
        show_tree_bridge(b, line, p);
2031
        return;
2040
        return;
2032
      }
2041
      }
2033
  if (verbose)
2042
  if (verbose)
2034
    p += sprintf(p, "  %s",
2043
    p += sprintf((char *)p, "  %s",
2035
		 pci_lookup_name(pacc, namebuf, sizeof(namebuf),
2044
		 pci_lookup_name(pacc, namebuf, sizeof(namebuf),
2036
				 PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
2045
				 PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
2037
				 q->vendor_id, q->device_id));
2046
				 q->vendor_id, q->device_id));
Lines 2072-2078 Link Here
2072
  if (!b->first_bus->sibling)
2081
  if (!b->first_bus->sibling)
2073
    {
2082
    {
2074
      if (b == &host_bridge)
2083
      if (b == &host_bridge)
2075
        p += sprintf(p, "[%04x:%02x]-", b->domain, b->first_bus->number);
2084
        p += sprintf((char *)p, "[%04x:%02x]-", b->domain, b->first_bus->number);
2076
      show_tree_bus(b->first_bus, line, p);
2085
      show_tree_bus(b->first_bus, line, p);
2077
    }
2086
    }
2078
  else
2087
  else
Lines 2082-2092 Link Here
2082
2091
2083
      while (u->sibling)
2092
      while (u->sibling)
2084
        {
2093
        {
2085
          k = p + sprintf(p, "+-[%04x:%02x]-", u->domain, u->number);
2094
          k = p + sprintf((char *)p, "+-[%04x:%02x]-", u->domain, u->number);
2086
          show_tree_bus(u, line, k);
2095
          show_tree_bus(u, line, k);
2087
          u = u->sibling;
2096
          u = u->sibling;
2088
        }
2097
        }
2089
      k = p + sprintf(p, "\\-[%04x:%02x]-", u->domain, u->number);
2098
      k = p + sprintf((char *)p, "\\-[%04x:%02x]-", u->domain, u->number);
2090
      show_tree_bus(u, line, k);
2099
      show_tree_bus(u, line, k);
2091
    }
2100
    }
2092
}
2101
}
Lines 2094-2100 Link Here
2094
static void
2103
static void
2095
show_forest(void)
2104
show_forest(void)
2096
{
2105
{
2097
  char line[256];
2106
  unsigned char line[256];
2098
2107
2099
  grow_tree();
2108
  grow_tree();
2100
  show_tree_bridge(&host_bridge, line, line);
2109
  show_tree_bridge(&host_bridge, line, line);
(-)pciutils-2.2.3/lib/names.c.orig (-2 / +2 lines)
Lines 99-105 Link Here
99
  u32 id34 = id_pair(id3, id4);
99
  u32 id34 = id_pair(id3, id4);
100
  unsigned int h = id_hash(cat, id12, id34);
100
  unsigned int h = id_hash(cat, id12, id34);
101
  struct id_entry *n = a->id_hash[h];
101
  struct id_entry *n = a->id_hash[h];
102
  int len = strlen(text);
102
  int len = strlen((char *)text);
103
103
104
  while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
104
  while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
105
    n = n->next;
105
    n = n->next;
Lines 149-155 Link Here
149
  static const char parse_error[] = "Parse error";
149
  static const char parse_error[] = "Parse error";
150
150
151
  *lino = 0;
151
  *lino = 0;
152
  while (fgets(line, sizeof(line), f))
152
  while (fgets((char *)line, sizeof(line), f))
153
    {
153
    {
154
      (*lino)++;
154
      (*lino)++;
155
      p = line;
155
      p = line;
(-)pciutils-2.2.3/lib/names.c.orig (-6 / +6 lines)
Lines 355-361 Link Here
355
      if (num)
355
      if (num)
356
	res = snprintf(buf, size, "%04x", iv);
356
	res = snprintf(buf, size, "%04x", iv);
357
      else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))
357
      else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))
358
	return v->name;
358
	return (char *)v->name;
359
      else
359
      else
360
	res = snprintf(buf, size, "Unknown vendor %04x", iv);
360
	res = snprintf(buf, size, "Unknown vendor %04x", iv);
361
      break;
361
      break;
Lines 365-371 Link Here
365
      if (num)
365
      if (num)
366
	res = snprintf(buf, size, "%04x", id);
366
	res = snprintf(buf, size, "%04x", id);
367
      else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))
367
      else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))
368
	return d->name;
368
	return (char *)d->name;
369
      else if (synth)
369
      else if (synth)
370
	res = snprintf(buf, size, "Unknown device %04x", id);
370
	res = snprintf(buf, size, "Unknown device %04x", id);
371
      else
371
      else
Lines 395-401 Link Here
395
      if (num)
395
      if (num)
396
	res = snprintf(buf, size, "%04x", isv);
396
	res = snprintf(buf, size, "%04x", isv);
397
      else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))
397
      else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))
398
	return v->name;
398
	return (char *)v->name;
399
      else if (synth)
399
      else if (synth)
400
	res = snprintf(buf, size, "Unknown vendor %04x", isv);
400
	res = snprintf(buf, size, "Unknown vendor %04x", isv);
401
      else
401
      else
Lines 409-415 Link Here
409
      if (num)
409
      if (num)
410
	res = snprintf(buf, size, "%04x", isd);
410
	res = snprintf(buf, size, "%04x", isd);
411
      else if (d = id_lookup_subsys(a, iv, id, isv, isd))
411
      else if (d = id_lookup_subsys(a, iv, id, isv, isd))
412
	return d->name;
412
	return (char *)d->name;
413
      else if (synth)
413
      else if (synth)
414
	res = snprintf(buf, size, "Unknown device %04x", isd);
414
	res = snprintf(buf, size, "Unknown device %04x", isd);
415
      else
415
      else
Lines 441-447 Link Here
441
      if (num)
441
      if (num)
442
	res = snprintf(buf, size, "%04x", icls);
442
	res = snprintf(buf, size, "%04x", icls);
443
      else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))
443
      else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))
444
	return cls->name;
444
	return (char *)cls->name;
445
      else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))
445
      else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))
446
	res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
446
	res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
447
      else if (synth)
447
      else if (synth)
Lines 455-461 Link Here
455
      if (num)
455
      if (num)
456
	res = snprintf(buf, size, "%02x", ipif);
456
	res = snprintf(buf, size, "%02x", ipif);
457
      else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))
457
      else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))
458
	return pif->name;
458
	return (char *)pif->name;
459
      else if (icls == 0x0101 && !(ipif & 0x70))
459
      else if (icls == 0x0101 && !(ipif & 0x70))
460
	{
460
	{
461
	  /* IDE controllers have complex prog-if semantics */
461
	  /* IDE controllers have complex prog-if semantics */
(-)pciutils-2.2.3/pcimodules.c.orig (-1 / +1 lines)
Lines 56-62 Link Here
56
static unsigned long desired_class;
56
static unsigned long desired_class;
57
static unsigned long desired_classmask; /* Default is 0: accept all classes.*/
57
static unsigned long desired_classmask; /* Default is 0: accept all classes.*/
58
58
59
void
59
static void
60
read_pcimap(void)
60
read_pcimap(void)
61
{
61
{
62
	struct utsname utsname;
62
	struct utsname utsname;

Return to bug 141111