/**
  * getDevs 
  * 
  * @access private
  * @return array of devices
  */
 private function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new LinfoTimerStart('Hardware Devices');
     }
     // Location of useful paths
     $pci_ids = locate_actual_path(array('/usr/share/misc/pci.ids', '/usr/share/pci.ids', '/usr/share/hwdata/pci.ids'));
     $usb_ids = locate_actual_path(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 HW_IDS($usb_ids, $pci_ids);
     $hw->work('linux');
     return $hw->result();
 }
예제 #2
0
 /**
  * getDevs 
  * 
  * @access private
  * @return array of devices
  */
 private function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new LinfoTimerStart('Hardware Devices');
     }
     // Location of useful paths
     $pci_ids = locate_actual_path(array('/usr/share/misc/pci.ids', '/usr/share/pci.ids', '/usr/share/hwdata/pci.ids'));
     $usb_ids = locate_actual_path(array('/usr/share/misc/usb.ids', '/usr/share/usb.ids', '/usr/share/hwdata/usb.ids'));
     // Class that does it
     $hw = new HW_IDS($usb_ids, $pci_ids);
     $hw->work('linux');
     return $hw->result();
 }
 public function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new LinfoTimerStart('Hardware Devices');
     }
     $hw = new HW_IDS($usb_ids, '/usr/share/misc/pci_vendors');
     $hw->work('dragonfly');
     return $hw->result();
 }
예제 #4
0
 public function getDevs()
 {
     // Time?
     if (!empty($this->settings['timer'])) {
         $t = new LinfoTimerStart('Hardware Devices');
     }
     // Class that does it
     $hw = new HW_IDS(false, '/usr/share/misc/pci_vendors');
     $hw->work('freebsd');
     return $hw->result();
 }