protected function _pci()
    {
        if (CommonFunctions::executeProgram('listdev', '', $bufr, PSI_DEBUG)) {
//            $devices = preg_split("/^device |\ndevice /", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            $devices = preg_split("/^device /m", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            foreach ($devices as $device) {
                $ar_buf = preg_split("/\n/", $device);
                if (count($ar_buf) >= 3) {
                    if (preg_match("/^([^\(\[\n]*)/", $device, $ar_buf2)) {
                        if (preg_match("/^[^\(]*\((.*)\)/", $device, $ar_buf3)) {
                            $ar_buf2[1] = $ar_buf3[1];
                        }
                        $name = trim($ar_buf2[1]).": ";

                        if (preg_match("/^\s+vendor\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[1], $ar_buf3)) {
                            $name .=$ar_buf3[1]." ";
                        }
                        if (preg_match("/^\s+device\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[2], $ar_buf3)) {
                            $name .=$ar_buf3[1]." ";
                        }
                        $dev = new HWDevice();
                        $dev->setName(trim($name));
                        $this->sys->setPciDevices($dev);
                    }
                }
            }
        }
    }
protected function _pci()
    {
        if (CommonFunctions::executeProgram('listdev', '', $bufr, PSI_DEBUG)) {
//            $devices = preg_split("/^device |\ndevice /", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            $devices = preg_split("/^device /m", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            foreach ($devices as $device) {
                $ar_buf = preg_split("/\n/", $device);
                if (count($ar_buf) >= 3) {
                    if (preg_match("/^([^\(\[\n]*)/", $device, $ar_buf2)) {
                        if (preg_match("/^[^\(]*\((.*)\)/", $device, $ar_buf3)) {
                            $ar_buf2[1] = $ar_buf3[1];
                        }
                        $name = trim($ar_buf2[1]).": ";

                        if (preg_match("/^\s+vendor\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[1], $ar_buf3)) {
                            $name .=$ar_buf3[1]." ";
                        }
                        if (preg_match("/^\s+device\s+[0-9a-fA-F]{4}:\s+(.*)/", $ar_buf[2], $ar_buf3)) {
                            $name .=$ar_buf3[1]." ";
                        }
                        $dev = new HWDevice();
                        $dev->setName(trim($name));
                        $this->sys->setPciDevices($dev);
                    }
                }
            }
        }
    }
protected function _pci ( ) { if ( CommonFunctions :: executeProgram ( 'listdev' , '' , $ bufr , PSI_DEBUG ) ) { //            $devices = preg_split("/^device |\ndevice /", $bufr, -1, PREG_SPLIT_NO_EMPTY); $ devices = preg_split ( "/^device /m" , $ bufr , - 1 , PREG_SPLIT_NO_EMPTY ) ; foreach ( $ devices as $ device ) { $ ar_buf = preg_split ( "/\n/" , $ device ) ; if ( count ( $ ar_buf ) >= 3 ) { if ( preg_match ( "/^([^\(\[\n]*)/" , $ device , $ ar_buf2 ) ) { if ( preg_match ( "/^[^\(]*\((.*)\)/" , $ device , $ ar_buf3 ) ) { $ ar_buf2 [ 1 ] = $ ar_buf3 [ 1 ] ; } $ name = trim ( $ ar_buf2 [ 1 ] ) . ": " ; if ( preg_match ( "/^\s+vendor\s+[0-9a-fA-F]{4}:\s+(.*)/" , $ ar_buf [ 1 ] , $ ar_buf3 ) ) { $ name .= $ ar_buf3 [ 1 ] . " " ; } if ( preg_match ( "/^\s+device\s+[0-9a-fA-F]{4}:\s+(.*)/" , $ ar_buf [ 2 ] , $ ar_buf3 ) ) { $ name .= $ ar_buf3 [ 1 ] . " " ; } $ dev = new HWDevice ( ) ; $ dev -> setName ( trim ( $ name ) ) ; $ this -> sys -> setPciDevices ( $ dev ) ; } } } } }
PCI devices
get the pci device information

@return void
PCI devices get the pci device information