Back to index

lshw  02.16
Functions
main.h File Reference
#include "hw.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool scan_system (hwNode &system)

Function Documentation

bool scan_system ( hwNode system)

Definition at line 51 of file main.cc.

{
  char hostname[80];

  if (gethostname(hostname, sizeof(hostname)) == 0)
  {
    hwNode computer(::enabled("output:sanitize")?"computer":hostname,
      hw::system);

    status("DMI");
    if (enabled("dmi"))
      scan_dmi(computer);
    status("SMP");
    if (enabled("smp"))
      scan_smp(computer);
    status("PA-RISC");
    if (enabled("parisc"))
      scan_parisc(computer);
    status("device-tree");
    if (enabled("device-tree"))
      scan_device_tree(computer);
    status("SPD");
    if (enabled("spd"))
      scan_spd(computer);
    status("memory");
    if (enabled("memory"))
      scan_memory(computer);
    status("/proc/cpuinfo");
    if (enabled("cpuinfo"))
      scan_cpuinfo(computer);
    status("CPUID");
    if (enabled("cpuid"))
      scan_cpuid(computer);
    status("PCI (sysfs)");
    if (enabled("pci"))
    {
      if(!scan_pci(computer))
      {
        if (enabled("pcilegacy"))
          scan_pci_legacy(computer);
      }
    }
    else
    {
      status("PCI (legacy)");
      if (enabled("pcilegacy"))
        scan_pci_legacy(computer);
    }
    status("ISA PnP");
    if (enabled("isapnp"))
      scan_isapnp(computer);
    status("PCMCIA");
    if (enabled("pcmcia"))
      scan_pcmcia(computer);
    status("PCMCIA");
    if (enabled("pcmcia-legacy"))
      scan_pcmcialegacy(computer);
    status("kernel device tree (sysfs)");
    if (enabled("sysfs"))
      scan_sysfs(computer);
    status("USB");
    if (enabled("usb"))
      scan_usb(computer);
    status("IDE");
    if (enabled("ide"))
      scan_ide(computer);
    if (enabled("ideraid"))
      scan_ideraid(computer);
    status("SCSI");
    if (enabled("scsi"))
      scan_scsi(computer);
    if (enabled("mounts"))
      scan_mounts(computer);
    status("Network interfaces");
    if (enabled("network"))
      scan_network(computer);
    status("Framebuffer devices");
    if (enabled("fb"))
      scan_fb(computer);
    status("Display");
    if (enabled("display"))
      scan_display(computer);
    status("CPUFreq");
    if (enabled("cpufreq"))
      scan_cpufreq(computer);
    status("ABI");
    if (enabled("abi"))
      scan_abi(computer);
    status("");

    if (computer.getDescription() == "")
      computer.setDescription("Computer");
    computer.assignPhysIds();
    computer.fixInconsistencies();

    system = computer;
  }
  else
    return false;

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function: