Example #1
0
 public function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new Timer('Hardware Devices');
     }
     $hw = new Hwpci(null, '/usr/share/misc/pci_vendors');
     $hw->work('dragonfly');
     return $hw->result();
 }
Example #2
0
 public function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new Timer('Hardware Devices');
     }
     // Class that does it
     $hw = new Hwpci(false, '/usr/share/misc/pci_vendors');
     $hw->work('freebsd');
     return $hw->result();
 }
Example #3
0
 /**
  * getDevs.
  * 
  * @return array of devices
  */
 public function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new Timer('Hardware Devices');
     }
     // Location of useful paths
     $pci_ids = Common::locateActualPath(array('/usr/share/misc/pci.ids', '/usr/share/pci.ids', '/usr/share/hwdata/pci.ids'));
     $usb_ids = Common::locateActualPath(array('/usr/share/misc/usb.ids', '/usr/share/usb.ids', '/usr/share/hwdata/usb.ids'));
     // Did we not get them?
     $pci_ids || $this->error->add('Linux Device Finder', 'Cannot find pci.ids; ensure pciutils is installed.');
     $usb_ids || $this->error->add('Linux Device Finder', 'Cannot find usb.ids; ensure usbutils is installed.');
     // Class that does it
     $hw = new Hwpci($usb_ids, $pci_ids);
     $hw->work('linux');
     return $hw->result();
 }