o
    id4                     @   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 devicespci)hardwaresystemc                 C   s6   |  dsdS | d}d|v r|d t|dkS )N/proc/bus/pciFdevicesr   )
path_isdirlistdirremovelen)self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   s8   |  g d |  r| jdddd | d d S d S )N)z/proc/ioportsz/proc/iomemr   zlspci -nnvvlspci)root_symlinktagsz	lspci -tv)add_copy_specr   add_cmd_output)r   r   r   r   setup   s   z	Pci.setupN)__name__
__module____qualname__
short_descplugin_nameprofilesr   r   r   r   r   r   r      s    
r   N)sos.report.pluginsr   r   r   r   r   r   r   <module>   s   