ok
Direktori : /proc/thread-self/root/lib/python2.7/site-packages/tuned/plugins/ |
Current File : //proc/thread-self/root/lib/python2.7/site-packages/tuned/plugins/hotplug.pyo |
� ��\c @ sW d d l m Z d d l j Z d d l Z e j j � Z d e j f d � � YZ d S( i ( t basei����Nt Pluginc B sh e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s: Base class for plugins with device hotpluging support. c O s t t | � j | | � d S( N( t superR t __init__( t selft argst kwargs( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR s c C s! t t | � j � | j � d S( N( R R t cleanupt _hardware_events_cleanup( R ( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR s c C s t � � d S( N( t NotImplementedError( R ( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt _hardware_events_init s c C s t � � d S( N( R ( R ( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR s c C s | j � d S( N( R ( R ( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt _init_devices s c C sd | d k r0 t j d | j � | j | � n0 | d k r` t j d | j � | j | � n d S( Nt adds device '%s' addedt removes device '%s' removed( t logt infot sys_namet _add_devicet _remove_device( R t eventt device( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt _hardware_events_callback s c C s | j } | | j | j Bk r# d Sx� t | j j � � D]� \ } } t | j | | g � � d k r9 t j d | | f � | j j | � | j | | j d | g � | j | | � | j | | j d | g � | j j | � Pq9 q9 Wt j d | � | j j | � d S( Ni s! instance %s: adding new device %st applys no instance wants %s( R t _assigned_devicest _free_devicest listt _instancest itemst lent _get_matching_devicesR R R t _call_device_scriptt script_pret _added_device_apply_tuningt script_postt processed_devicest debug( R R t device_namet instance_namet instance( ( s9 /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR $ s "!c C s� | j } | | j | j Bk r# d Sx� t | j j � � D]� } | | j k r9 | j | | j d | g � | j | | � | j | | j d | g � | j j | � t | j � t | j � d k | _ | j j | � Pq9 q9 W| j j | � d S( Nt unapplyi ( R R R R R t valuesR"