Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/tuned/hardware/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/tuned/hardware/device_matcher.pyo
�
��\c@s;ddlZddlZdgZdefd��YZdS(i����Nt
DeviceMatchercBs eZdZd�Zd�ZRS(s,
	Device name matching against the devices specification in tuning profiles.

	The devices specification consists of multiple rules separated by spaces.
	The rules have a syntax of shell-style wildcards and are either positive
	or negative. The negative rules are prefixed with an exclamation mark.
	cCst|t�r$tjd|�}ng|D]/}|jd�r+|j�dkr+|^q+}g|D]}||krg|d^qg}t|�dkr�|jd�nt}x*|D]"}t	j	||�r�t
}Pq�q�Wx*|D]"}t	j	||�r�t}Pq�q�W|S(s
		Match a device against the specification in the profile.

		If there is no positive rule in the specification, implicit rule
		which matches all devices is added. The device matches if and only
		if it matches some positive rule, but no negative rule.
		s\s|,\s*t!tiit*(t
isinstancetstrtretsplitt
startswithtstriptlentappendtFalsetfnmatchtTrue(tselftrulestdevice_nametruletpositive_rulestnegative_rulestmatches((sA/usr/lib/python2.7/site-packages/tuned/hardware/device_matcher.pytmatchs <)

cCs=g}x0|D](}|j||�r
|j|�q
q
W|S(s�
		Match a device list against the specification in the profile. Returns
		the list, which is a subset of devices which match.
		(RR(RRtdevice_listtmatching_devicestdevice((sA/usr/lib/python2.7/site-packages/tuned/hardware/device_matcher.pyt
match_list,s

(t__name__t
__module__t__doc__RR(((sA/usr/lib/python2.7/site-packages/tuned/hardware/device_matcher.pyRs	(R
Rt__all__tobjectR(((sA/usr/lib/python2.7/site-packages/tuned/hardware/device_matcher.pyt<module>s	

ZeroDay Forums Mini