
    -_gf                     ,    d dl mZmZ  G d dee      Zy)    )PluginIndependentPluginc                   $    e Zd ZdZdZdZd Zd Zy)PcizPCI devicespci)hardwaresystemc                     | j                  d      sy| j                  d      }d|v r|j                  d       t        |      dkD  S )z# Check whether PCI devices present /proc/bus/pciFdevicesr   )
path_isdirlistdirremovelen)selfcontents     8/usr/lib/python3/dist-packages/sos/report/plugins/pci.pycheck_for_bus_deviceszPci.check_for_bus_devices   sD    / ,,/NN9%7|a    c                     | j                  g d       | j                         r&| j                  ddd       | j                  d       y y )N)z/proc/ioportsz/proc/iomemr   zlspci -nnvvlspci)root_symlinktagsz	lspci -tv)add_copy_specr   add_cmd_output)r   s    r   setupz	Pci.setup   sP     
 	 %%'G%,   ., (r   N)__name__
__module____qualname__
short_descplugin_nameprofilesr   r    r   r   r   r      s    JK%H	 
-r   r   N)sos.report.pluginsr   r   r   r#   r   r   <module>r%      s    9-&# -r   