+
     Gi
  c                   s    ^RI Ht ^ RIt^ RIt^ RIt^RI5 ^ RIt^ RI	H
t
 ^ RI5 ^ RIHt ]P                  P                  4       t ! R R]P"                  4      tR# )i   )baseN)Z*)commandsc                   s   a a ] tR t^t oRtV 3R ltR tR tR tR t	]
P                  3R ltR tR	 tR
 tRtVtV ;t# )SysfsPluginaY  
Sets various `sysfs` settings specified by the plug-in options.

The syntax is `_name_=_value_`, where
`_name_` is the `sysfs` path to use and `_value_` is
the value to write. The `sysfs` path supports the shell-style
wildcard characters (see `man 7 glob` for additional detail).

Use this plugin in case you need to change some settings that are
not covered by other plug-ins. Prefer specific plug-ins if they
cover the required settings.

.Ignore corrected errors and associated scans that cause latency spikes
====
----
[sysfs]
/sys/devices/system/machinecheck/machinecheck*/ignore_ce=1
----
====
c                s\   < \         \        V `
  ! V/ VB  R V n        \	        4       V n        R# )TN)Zsuperr   __init___has_dynamic_optionsr   _cmd)selfZargsZkwargs	__class__s   &*,?/usr/lib/python3.14/site-packages/tuned/plugins/plugin_sysfs.pyr   ZSysfsPlugin.__init__%   s(    T#T4V4"$j$)    c           	     s   R Vn         RVn        \        \        VP                  P                  4       4       Uu. uF2  p\        P                  P                  V^ ,          4      V^,          3NK4  	  up4      Vn	        / Vn
        R# u upi )FTN)Z_has_dynamic_tuningZ_has_static_tuningZdictlistZoptionsitemsosZpathZnormpath_sysfs_sysfs_original)r   instanceZ	key_value   && r   _instance_initZSysfsPlugin._instance_init*   so    !&( $(Z^_g_o_o_u_u_wZxyZxY277++IaL99Q<HZxyz(/( zs   8Bc                s    R # N )r   r      &&r   _instance_cleanupZSysfsPlugin._instance_cleanup1   s    r	   c                s   \        VP                  P                  4       4       F  w  r#V P                  P	                  V4      p\
        P                  ! V4       Fg  pV P                  V4      '       d2   V P                  V4      VP                  V&   V P                  WT4       KK  \        P                  R V,          4       Ki  	  K  	  R# )z)rejecting write to '%s' (not inside /sys)N)r
   r   r   
_variablesexpandglobiglob_check_sysfs_read_sysfsr   _write_sysfslogZerror)r   r   keyvaluevfs   &&    r   _instance_apply_staticZ"SysfsPlugin._instance_apply_static4   s    ..01jce$1JJsOq#'#3#3A#6Xa 	qYY:Q>?  2r	   c                s\   R p\        VP                  P                  4       4       F  w  rVV P                  P	                  V4      p\
        P                  ! V4       FH  pV P                  V4      '       g   K  V P                  V4      p	V P                  WW4      R8X  g   KF  RpKJ  	  K  	  V# )TF)
r
   r   r   r   r   r   r   r   r   Z_verify_value)
r   r   Zignore_missingZdevicesZretr   r   r    r!   Zcurr_vals
   &&&&      r   _instance_verify_staticZ#SysfsPlugin._instance_verify_static>   s    #..01jce$1JJsOq  #X1:eCc	  2 
*r	   c                s    \        VP                  P                  4       4       F  w  r4V P                  W44       K  	  R # r   )r
   r   r   r   )r   r   Zrollbackr   r   s   &&&  r   _instance_unapply_staticZ$SysfsPlugin._instance_unapply_staticI   s0    11779:jcS  ;r	   c                s0    \         P                  ! R V4      # )z^/sys/.*)reZmatch)r   
sysfs_filer   r   r   ZSysfsPlugin._check_sysfsM   s    	+z	**r	   c                s    V P                   P                  V4      P                  4       p\        V4      ^ 8  d   V P                   P	                  VR4      # R# )i    FN)r   Z	read_fileZstripZlenZget_active_option)r   r&   Zdatar   r   r   ZSysfsPlugin._read_sysfsP   sD    			Z	(	.	.	0$Y]
))
%
%dE
22
r	   c                s<    V P                   P                  WR R7      # )T)Zignore_same)r   Zwrite_to_file)r   r&   r   s   &&&r   r   ZSysfsPlugin._write_sysfsW   s    		 	 	 	EEr	   )r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   r   r"   r#   constsZROLLBACK_SOFTr$   r   r   r   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   r   r      sK     .
 @	 :@9M9M !+F Fr	   r   )Z r    r   r%   Zos.pathr   Z
decoratorsZ
tuned.logsZtunedZtuned.constsr'   Z
subprocessZtuned.utils.commandsr   ZlogsZgetr   ZPluginr   r   r	   r   <module>r(      sD      	      )jjnnKF$++ KFr	   