Helmut Schellong
2014-02-19 08:07:33 UTC
int nvidia_sysctl_bus_type(SYSCTL_HANDLER_ARGS)
{
struct nvidia_softc *sc = arg1;
char *bus_type;
if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_AGP) != 0)
sprintf(bus_type, "AGP");
else
if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_EXP) != 0)
bus_type = "PCIe";
else
bus_type = "PCI";
return SYSCTL_OUT(req, bus_type, strlen(bus_type) + 1);
}
Der Code stammt nicht von mir.
make brach ab, weil der Compiler per Option
Warnungen als Fehler bewerten sollte.
Ich wundere mich, daß solch ein Code rausgeht, wo doch make
in 100% aller Fälle abbricht.
{
struct nvidia_softc *sc = arg1;
char *bus_type;
if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_AGP) != 0)
sprintf(bus_type, "AGP");
else
if (nvidia_pci_find_capability(sc->dev, PCIR_CAP_ID_EXP) != 0)
bus_type = "PCIe";
else
bus_type = "PCI";
return SYSCTL_OUT(req, bus_type, strlen(bus_type) + 1);
}
Der Code stammt nicht von mir.
make brach ab, weil der Compiler per Option
Warnungen als Fehler bewerten sollte.
Ich wundere mich, daß solch ein Code rausgeht, wo doch make
in 100% aller Fälle abbricht.
--
Mit freundlichen Grüßen
Helmut Schellong ***@schellong.biz
www.schellong.de www.schellong.com www.schellong.biz
http://www.schellong.de/c.htm
Mit freundlichen Grüßen
Helmut Schellong ***@schellong.biz
www.schellong.de www.schellong.com www.schellong.biz
http://www.schellong.de/c.htm