o
    *b                     @   s&   d dl mZmZ G dd deeZdS )    )PluginIndependentPluginc                   @   s(   e Zd ZdZdZdZdd Zdd ZdS )	PcizPCI devicesZpci)Zhardwaresystemc                 C   s6   |  dsdS | d}d|v r|d t|dkS )N/proc/bus/pciFZdevicesr   )Z
path_isdirlistdirremovelen)selfZcontent r   8/usr/lib/python3/dist-packages/sos/report/plugins/pci.pycheck_for_bus_devices   s   


zPci.check_for_bus_devicesc                 C   s6   |  g d |  r| jddd | d d S d S )N)z/proc/ioportsz/proc/iomemr   zlspci -nnvvZlspci)Zroot_symlinkz	lspci -tv)Zadd_copy_specr   Zadd_cmd_output)r
   r   r   r   setup   s
   z	Pci.setupN)__name__
__module____qualname__Z
short_descZplugin_nameZprofilesr   r   r   r   r   r   r      s    
r   N)Zsos.report.pluginsr   r   r   r   r   r   r   <module>   s   