| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.9/site-packages/tuned/plugins/__pycache__/ |
Upload File : |
a
�]�i� � @ sX d dl mZ d dlT ddlZddlmZ ddlZddlZej �
� ZG dd� dej�Z
dS )� )�base)�*� N)�commandsc @ sj e Zd ZdZdd� Zdd� Zedd� �Zdd � Zd
d� Z dd
� Z
eddd�dd� �Ze
d�ddd��ZdS )� USBPlugina�
Sets autosuspend timeout of USB devices to the value specified by the
[option]`autosuspend` option in seconds. If the [option]`devices`
option is specified, the [option]`autosuspend` option applies to only
the USB devices specified, otherwise it applies to all USB devices.
The value `0` means that autosuspend is disabled.
.Turn off USB autosuspend for USB devices `1-1` and `1-2`
====
----
[usb]
devices=1-1,1-2
autosuspend=0
----
====
c C sJ d| _ t� | _t� | _| j�d��dd�D ]}| j�|j� q*t � | _
d S )NT�usbZDEVTYPEZ
usb_device)Z_devices_supported�setZ
_free_devicesZ_assigned_devices�_hardware_inventoryZget_devicesZmatch_property�addZsys_namer �_cmd��self�device� r �</usr/lib/python3.9/site-packages/tuned/plugins/plugin_usb.py�
_init_devices s zUSBPlugin._init_devicesc s � fdd�|D �S )Nc s g | ]}� j �d |��qS )r )r Z
get_device)�.0�x�r
r r �
<listcomp>( � z1USBPlugin._get_device_objects.<locals>.<listcomp>r )r
Zdevicesr r r �_get_device_objects'