404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.133.117.95: ~ $
3

�<�e��@sXddlmZddlTddlZddlmZddlZddlZej	j
�ZGdd�dej�Z
dS)�)�base)�*�N)�commandsc@sjeZdZdZdd�Zdd�Zedd��Zdd	�Zd
d�Z	dd
�Z
eddd�dd��Ze
d�ddd��ZdS)�	USBPlugina�
	`usb`::
	
	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.
	+
	.To turn off USB autosuspend for USB devices `1-1` and `1-2`
	====
	----
	[usb]
	devices=1-1,1-2
	autosuspend=0
	----
	====
	cCsNd|_t�|_t�|_x*|jjd�jdd�D]}|jj|j�q,Wt	�|_
dS)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.6/plugin_usb.py�
_init_devicesszUSBPlugin._init_devicescs�fdd�|D�S)Ncsg|]}�jjd|��qS)r)r	Z
get_device)�.0�x)rrr�
<listcomp>*sz1USBPlugin._get_device_objects.<locals>.<listcomp>r)rZdevicesr)rr�_get_device_objects)szUSBPlugin._get_device_objectscCsddiS)N�autosuspendr)rrrr�_get_config_options,szUSBPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r�instancerrr�_instance_init2szUSBPlugin._instance_initcCsdS)Nr)rrrrr�_instance_cleanup6szUSBPlugin._instance_cleanupcCsd|S)Nz)/sys/bus/usb/devices/%s/power/autosuspendr)rr
rrr�_autosuspend_sysfile9szUSBPlugin._autosuspend_sysfilerT)Z
per_devicecCsR|j|�}|dkrdS|rdnd}|sN|j|�}|jj|||rFtjgndd�|S)N�1�0F)�no_error)Z_option_boolrrZ
write_to_file�errno�ENOENT)r�valuer
Zsim�remove�enable�val�sys_filerrr�_set_autosuspend<s


zUSBPlugin._set_autosuspendFcCs|j|�}|jj||d�j�S)N)r)rrZ	read_file�strip)rr
Zignore_missingr$rrr�_get_autosuspendIs
zUSBPlugin._get_autosuspendN)F)�__name__�
__module__�__qualname__�__doc__rr�classmethodrrrrZcommand_setr%Zcommand_getr'rrrrr
s

r)�rZ
decoratorsZ
tuned.logsZtunedZtuned.utils.commandsrZglobrZlogs�get�logZPluginrrrrr�<module>s


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 173 B 0644
__init__.cpython-36.pyc File 173 B 0644
base.cpython-36.opt-1.pyc File 21.13 KB 0644
base.cpython-36.pyc File 21.13 KB 0644
decorators.cpython-36.opt-1.pyc File 1.06 KB 0644
decorators.cpython-36.pyc File 1.06 KB 0644
exceptions.cpython-36.opt-1.pyc File 354 B 0644
exceptions.cpython-36.pyc File 354 B 0644
hotplug.cpython-36.opt-1.pyc File 4.23 KB 0644
hotplug.cpython-36.pyc File 4.23 KB 0644
plugin_acpi.cpython-36.opt-1.pyc File 3.35 KB 0644
plugin_acpi.cpython-36.pyc File 3.35 KB 0644
plugin_audio.cpython-36.opt-1.pyc File 4.03 KB 0644
plugin_audio.cpython-36.pyc File 4.03 KB 0644
plugin_bootloader.cpython-36.opt-1.pyc File 24.45 KB 0644
plugin_bootloader.cpython-36.pyc File 24.45 KB 0644
plugin_cpu.cpython-36.opt-1.pyc File 26.03 KB 0644
plugin_cpu.cpython-36.pyc File 26.06 KB 0644
plugin_disk.cpython-36.opt-1.pyc File 16.35 KB 0644
plugin_disk.cpython-36.pyc File 16.35 KB 0644
plugin_eeepc_she.cpython-36.opt-1.pyc File 3.43 KB 0644
plugin_eeepc_she.cpython-36.pyc File 3.43 KB 0644
plugin_irqbalance.cpython-36.opt-1.pyc File 4.51 KB 0644
plugin_irqbalance.cpython-36.pyc File 4.51 KB 0644
plugin_modules.cpython-36.opt-1.pyc File 5.45 KB 0644
plugin_modules.cpython-36.pyc File 5.45 KB 0644
plugin_mounts.cpython-36.opt-1.pyc File 5.5 KB 0644
plugin_mounts.cpython-36.pyc File 5.5 KB 0644
plugin_net.cpython-36.opt-1.pyc File 23.21 KB 0644
plugin_net.cpython-36.pyc File 23.21 KB 0644
plugin_rtentsk.cpython-36.opt-1.pyc File 1.34 KB 0644
plugin_rtentsk.cpython-36.pyc File 1.34 KB 0644
plugin_scheduler.cpython-36.opt-1.pyc File 53.44 KB 0644
plugin_scheduler.cpython-36.pyc File 53.44 KB 0644
plugin_script.cpython-36.opt-1.pyc File 4.26 KB 0644
plugin_script.cpython-36.pyc File 4.31 KB 0644
plugin_scsi_host.cpython-36.opt-1.pyc File 4.56 KB 0644
plugin_scsi_host.cpython-36.pyc File 4.56 KB 0644
plugin_selinux.cpython-36.opt-1.pyc File 3 KB 0644
plugin_selinux.cpython-36.pyc File 3 KB 0644
plugin_service.cpython-36.opt-1.pyc File 13.84 KB 0644
plugin_service.cpython-36.pyc File 13.84 KB 0644
plugin_sysctl.cpython-36.opt-1.pyc File 6.7 KB 0644
plugin_sysctl.cpython-36.pyc File 6.7 KB 0644
plugin_sysfs.cpython-36.opt-1.pyc File 3.64 KB 0644
plugin_sysfs.cpython-36.pyc File 3.64 KB 0644
plugin_systemd.cpython-36.opt-1.pyc File 5.92 KB 0644
plugin_systemd.cpython-36.pyc File 5.92 KB 0644
plugin_uncore.cpython-36.opt-1.pyc File 4.75 KB 0644
plugin_uncore.cpython-36.pyc File 4.75 KB 0644
plugin_usb.cpython-36.opt-1.pyc File 2.95 KB 0644
plugin_usb.cpython-36.pyc File 2.95 KB 0644
plugin_video.cpython-36.opt-1.pyc File 4.13 KB 0644
plugin_video.cpython-36.pyc File 4.13 KB 0644
plugin_vm.cpython-36.opt-1.pyc File 4.11 KB 0644
plugin_vm.cpython-36.pyc File 4.11 KB 0644
repository.cpython-36.opt-1.pyc File 1.87 KB 0644
repository.cpython-36.pyc File 1.92 KB 0644