|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
# Copyright 2008-2016 Mir Calculate. http://www.calculate-linux.org
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import re
|
|
|
|
|
import os
|
|
|
|
|
from os import path
|
|
|
|
|
from calculate.lib.utils.tools import deprecated
|
|
|
|
|
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
|
|
|
|
|
setLocalTranslate('cl_lib3', sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
# используется для кэша функции getLvmPartitions()
|
|
|
|
|
_lvm_partitions_cache = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getUUIDDict(revers=False, devs=()):
|
|
|
|
|
"""Get dict UUID -> dev"""
|
|
|
|
|
blkidProcess = process("/sbin/blkid", "-s", "UUID", "-c", "/dev/null",
|
|
|
|
|
*list(devs))
|
|
|
|
|
if revers:
|
|
|
|
|
datafunc = lambda x, y: (y, x)
|
|
|
|
|
else:
|
|
|
|
|
datafunc = lambda x, y: (x, y)
|
|
|
|
|
DEV, UUID = 0, 1
|
|
|
|
|
reSplit = re.compile('^([^:]+):.*UUID="([^"]+)"', re.S)
|
|
|
|
|
return dict(
|
|
|
|
|
map(lambda x: datafunc("UUID=%s" % x[UUID],
|
|
|
|
|
udev.get_device_info(name=x[DEV]).get('DEVNAME',
|
|
|
|
|
x[DEV])),
|
|
|
|
|
map(lambda x: x.groups(),
|
|
|
|
|
filter(lambda x: x,
|
|
|
|
|
map(reSplit.search,
|
|
|
|
|
blkidProcess)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from files import (getProgPath, pathJoin, listDirectory,
|
|
|
|
|
checkUtils, process)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def detectDeviceForPartition(dev):
|
|
|
|
|
"""Detect parent device for partition by udev and return property"""
|
|
|
|
|
prop = udev.get_device_info(name=dev)
|
|
|
|
|
if prop.get('DEVTYPE', '') != 'partition':
|
|
|
|
|
return ''
|
|
|
|
|
parentpath = path.dirname(prop.get('DEVPATH', ''))
|
|
|
|
|
if parentpath:
|
|
|
|
|
devProp = udev.get_device_info(path=parentpath)
|
|
|
|
|
return devProp.get('DEVNAME', '')
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def countPartitions(devname):
|
|
|
|
|
"""Count partition for specified device"""
|
|
|
|
|
syspath = udev.get_device_info(name=devname).get('DEVPATH', '')
|
|
|
|
|
if not syspath:
|
|
|
|
|
return 0
|
|
|
|
|
deviceName = path.basename(syspath)
|
|
|
|
|
if not syspath.startswith("/sys"):
|
|
|
|
|
syspath = pathJoin("/sys", syspath)
|
|
|
|
|
return len(filter(lambda x: x.startswith(deviceName),
|
|
|
|
|
listDirectory(syspath)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getLvmGroups():
|
|
|
|
|
"""Get LVM groups"""
|
|
|
|
|
pvdisplayCmd = getProgPath('/sbin/pvdisplay')
|
|
|
|
|
pvdata = process(pvdisplayCmd, "-C", "-o", "vg_name", "--noh")
|
|
|
|
|
return filter(lambda x: x, pvdata.read().split())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getLvmPartitions(vg_name, lv_name, cache=None):
|
|
|
|
|
"""Get lvm partitions"""
|
|
|
|
|
if cache is None:
|
|
|
|
|
cache = _lvm_partitions_cache
|
|
|
|
|
if not cache:
|
|
|
|
|
pvdisplayCmd = getProgPath('/sbin/pvdisplay')
|
|
|
|
|
pvdata = process(pvdisplayCmd, "-C", "-o",
|
|
|
|
|
"vg_name,lv_name,pv_name", "--noh")
|
|
|
|
|
if pvdata.success():
|
|
|
|
|
cache.extend(filter(
|
|
|
|
|
lambda x: x and len(x) == 3,
|
|
|
|
|
map(lambda x: x.split(),
|
|
|
|
|
pvdata.read().split('\n'))))
|
|
|
|
|
if cache:
|
|
|
|
|
res = map(lambda x: x[2],
|
|
|
|
|
filter(lambda x: x[0] == vg_name and x[1] == lv_name, cache))
|
|
|
|
|
if res:
|
|
|
|
|
return res
|
|
|
|
|
return []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getPartitionDevice(syspath):
|
|
|
|
|
"""Get real parent device by partition,lvm,mdraid"""
|
|
|
|
|
if not syspath.startswith('/sys'):
|
|
|
|
|
syspath = pathJoin('/sys', syspath)
|
|
|
|
|
prop = udev.get_device_info(path=syspath)
|
|
|
|
|
# real device
|
|
|
|
|
if (prop.get('DEVTYPE', "") == "disk" and
|
|
|
|
|
(prop.get('ID_TYPE', "") == "disk" or
|
|
|
|
|
path.exists(path.join(syspath, "device")))):
|
|
|
|
|
return prop.get('DEVNAME', "")
|
|
|
|
|
# partition
|
|
|
|
|
if prop.get('DEVTYPE') == "partition":
|
|
|
|
|
return getPartitionDevice(path.dirname(syspath))
|
|
|
|
|
# md raid
|
|
|
|
|
if prop.get('MD_LEVEL', "").startswith("raid"):
|
|
|
|
|
syspath = pathJoin(syspath, "md")
|
|
|
|
|
for rd in filter(lambda x: path.basename(x).startswith('rd'),
|
|
|
|
|
listDirectory(syspath, fullPath=True)):
|
|
|
|
|
rdBlockPath = path.join(rd, "block")
|
|
|
|
|
if path.exists(rdBlockPath):
|
|
|
|
|
return getPartitionDevice(path.realpath(rdBlockPath))
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
# lvm
|
|
|
|
|
if prop.get('DM_LV_NAME', "") != "":
|
|
|
|
|
parts = getLvmPartitions(prop.get('DM_VG_NAME', ''),
|
|
|
|
|
prop.get('DM_LV_NAME', ''))
|
|
|
|
|
if parts:
|
|
|
|
|
propPartLvm = udev.get_device_info(name=parts[0])
|
|
|
|
|
if 'DEVPATH' in propPartLvm:
|
|
|
|
|
return getPartitionDevice(propPartLvm['DEVPATH'])
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def lspci(filtername=None, shortInfo=False):
|
|
|
|
|
"""Get hash of lspci, filtred by filtername. If shortInfo, then
|
|
|
|
|
type,vendor and name get only first word
|
|
|
|
|
|
|
|
|
|
pcidata(domain,bus,slot,func)
|
|
|
|
|
'type'
|
|
|
|
|
'vendor'
|
|
|
|
|
'name'"""
|
|
|
|
|
reData = re.compile(r'(\S+)\s"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"', re.S)
|
|
|
|
|
if filtername:
|
|
|
|
|
if hasattr(filtername, '__call__'):
|
|
|
|
|
filterfunc = filtername
|
|
|
|
|
else:
|
|
|
|
|
filterfunc = lambda x: filtername in x
|
|
|
|
|
else:
|
|
|
|
|
filterfunc = lambda x: x
|
|
|
|
|
if shortInfo:
|
|
|
|
|
sfunc = lambda x: x.partition(" ")[0]
|
|
|
|
|
else:
|
|
|
|
|
sfunc = lambda x: x
|
|
|
|
|
lspciProg = checkUtils('/usr/sbin/lspci')
|
|
|
|
|
processLsPci = process(lspciProg, "-m")
|
|
|
|
|
retData = {}
|
|
|
|
|
for device in map(lambda x: x.groups(),
|
|
|
|
|
filter(lambda x: x,
|
|
|
|
|
map(reData.search,
|
|
|
|
|
filter(filterfunc,
|
|
|
|
|
processLsPci)))):
|
|
|
|
|
retData[device[0]] = {'type': sfunc(device[1]),
|
|
|
|
|
'vendor': sfunc(device[2]),
|
|
|
|
|
'name': sfunc(device[3])}
|
|
|
|
|
return retData
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UdevAdm(object):
|
|
|
|
|
"""
|
|
|
|
|
Объект взаимодействия с udevadm
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
|
self.udevadmCmd = getProgPath('/sbin/udevadm')
|
|
|
|
|
self.first_run = True
|
|
|
|
|
|
|
|
|
|
def info_property(self, path=None, name=None):
|
|
|
|
|
if self.first_run:
|
|
|
|
|
refreshUdev(onlyTrigger=True)
|
|
|
|
|
self.first_run = False
|
|
|
|
|
|
|
|
|
|
if name:
|
|
|
|
|
type_query = "--name"
|
|
|
|
|
value = name
|
|
|
|
|
else:
|
|
|
|
|
type_query = "--path"
|
|
|
|
|
value = path
|
|
|
|
|
udev_output = process(self.udevadmCmd, "info", "--query",
|
|
|
|
|
"property",
|
|
|
|
|
type_query, value).read().split("\n")
|
|
|
|
|
|
|
|
|
|
return dict(x.partition("=")[0::2] for x in udev_output if "=" in x)
|
|
|
|
|
|
|
|
|
|
def info_export(self):
|
|
|
|
|
return process(self.udevadmCmd, "info", "-e").read().strip()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Udev(object):
|
|
|
|
|
"""
|
|
|
|
|
Объект возвращающий преобразованную или кэшированную информацию о системе
|
|
|
|
|
из udev
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def clear_cache(self):
|
|
|
|
|
self.path_cache = {}
|
|
|
|
|
self.name_cache = {}
|
|
|
|
|
self.udevadm = UdevAdm()
|
|
|
|
|
|
|
|
|
|
def realpath(self, dn):
|
|
|
|
|
return os.path.realpath(dn)
|
|
|
|
|
|
|
|
|
|
def __init__(self, udevadm=None):
|
|
|
|
|
self.path_cache = {}
|
|
|
|
|
self.name_cache = {}
|
|
|
|
|
if isinstance(udevadm, UdevAdm):
|
|
|
|
|
self.udevadm = udevadm
|
|
|
|
|
else:
|
|
|
|
|
self.udevadm = UdevAdm()
|
|
|
|
|
|
|
|
|
|
def get_device_info(self, path=None, name=None):
|
|
|
|
|
"""Get device info by syspath of name"""
|
|
|
|
|
if name:
|
|
|
|
|
cache = self.name_cache
|
|
|
|
|
value = name
|
|
|
|
|
else:
|
|
|
|
|
cache = self.path_cache
|
|
|
|
|
value = path
|
|
|
|
|
|
|
|
|
|
value = self.realpath(value)
|
|
|
|
|
|
|
|
|
|
if value not in cache:
|
|
|
|
|
data = self.udevadm.info_property(path, name)
|
|
|
|
|
devname = data.get('DEVNAME', '')
|
|
|
|
|
devpath = data.get('DEVPATH', '')
|
|
|
|
|
if devpath:
|
|
|
|
|
devpath = "/sys%s" % devpath
|
|
|
|
|
if devname:
|
|
|
|
|
self.name_cache[devname] = data
|
|
|
|
|
if devpath:
|
|
|
|
|
self.path_cache[devname] = data
|
|
|
|
|
return data
|
|
|
|
|
else:
|
|
|
|
|
# print "fromCache",keyCache
|
|
|
|
|
return cache[value]
|
|
|
|
|
|
|
|
|
|
def get_block_devices(self):
|
|
|
|
|
block_entries = (x for x in self.udevadm.info_export().split("\n\n")
|
|
|
|
|
if "SUBSYSTEM=block" in x)
|
|
|
|
|
for block in block_entries:
|
|
|
|
|
for entry in (x[3:] for x in block.split("\n")
|
|
|
|
|
if x.startswith("P:")):
|
|
|
|
|
if "block/" in entry:
|
|
|
|
|
yield entry.rpartition("block/")[2]
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
udev = Udev()
|
|
|
|
|
|
|
|
|
|
def convertNameToSyspath(name):
|
|
|
|
|
dev = udev.get_device_info(name=name).get('DEVPATH', "")
|
|
|
|
|
if dev and not dev.startswith('/sys'):
|
|
|
|
|
dev = pathJoin('/sys', dev)
|
|
|
|
|
return dev
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def humanreadableSize(size):
|
|
|
|
|
"""
|
|
|
|
|
Human readable size (1024 -> 1K and etc)
|
|
|
|
|
"""
|
|
|
|
|
try:
|
|
|
|
|
size = int(size)
|
|
|
|
|
except ValueError:
|
|
|
|
|
return ""
|
|
|
|
|
suffix = (((1024 ** 0), "", False),
|
|
|
|
|
((1024 ** 1), "K", False),
|
|
|
|
|
((1024 ** 2), "M", False),
|
|
|
|
|
((1024 ** 3), "G", True),
|
|
|
|
|
((1024 ** 4), "T", True),
|
|
|
|
|
((1024 ** 5), "P", True))
|
|
|
|
|
suffix = filter(lambda x: size > x[0], suffix)
|
|
|
|
|
if suffix:
|
|
|
|
|
suffix = suffix[-1]
|
|
|
|
|
printSize = int(size / (float(suffix[0]) / 10))
|
|
|
|
|
printSizeTail = printSize % 10
|
|
|
|
|
printSize /= 10
|
|
|
|
|
if suffix[2] and printSizeTail:
|
|
|
|
|
return "%d.%d%s" % (printSize, printSizeTail, suffix[1])
|
|
|
|
|
else:
|
|
|
|
|
return "%d%s" % (printSize, suffix[1])
|
|
|
|
|
return str(size)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getPartitionSize(syspath=None, name=None, inBytes=False):
|
|
|
|
|
"""
|
|
|
|
|
Get partition size
|
|
|
|
|
"""
|
|
|
|
|
if name:
|
|
|
|
|
dev = convertNameToSyspath(name)
|
|
|
|
|
else:
|
|
|
|
|
dev = syspath
|
|
|
|
|
SECTORSIZE = 512
|
|
|
|
|
sizeFile = pathJoin(dev, "size")
|
|
|
|
|
if path.exists(sizeFile):
|
|
|
|
|
size = int(open(sizeFile, 'r').read().strip()) * SECTORSIZE
|
|
|
|
|
if inBytes:
|
|
|
|
|
return str(size)
|
|
|
|
|
else:
|
|
|
|
|
return humanreadableSize(size)
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getDeviceType(syspath=None, name=None):
|
|
|
|
|
"""Get device type (disk,partition,lvm,raid)"""
|
|
|
|
|
if name:
|
|
|
|
|
prop = udev.get_device_info(name=name)
|
|
|
|
|
syspath = prop.get('DEVPATH', '')
|
|
|
|
|
else:
|
|
|
|
|
prop = udev.get_device_info(path=syspath)
|
|
|
|
|
# real device
|
|
|
|
|
if prop.get('ID_CDROM', ""):
|
|
|
|
|
return "cdrom"
|
|
|
|
|
# regular disk
|
|
|
|
|
if (prop.get('ID_TYPE', "") == "disk" and
|
|
|
|
|
prop.get('DEVTYPE', "") == "disk"):
|
|
|
|
|
return "disk"
|
|
|
|
|
# nvme
|
|
|
|
|
if (prop.get('DEVTYPE', "") == "disk" and
|
|
|
|
|
path.split(syspath)[1].startswith("nvme")):
|
|
|
|
|
return "disk"
|
|
|
|
|
# partition
|
|
|
|
|
if prop.get('DEVTYPE') == "partition":
|
|
|
|
|
return getDeviceType(path.dirname(syspath)) + "-partition"
|
|
|
|
|
# md raid
|
|
|
|
|
if prop.get('MD_LEVEL', "").startswith("raid"):
|
|
|
|
|
if not syspath.startswith('/sys'):
|
|
|
|
|
syspath = pathJoin('/sys', syspath)
|
|
|
|
|
syspath = pathJoin(syspath, "md")
|
|
|
|
|
for rd in filter(lambda x: path.basename(x).startswith('rd'),
|
|
|
|
|
listDirectory(syspath, fullPath=True)):
|
|
|
|
|
rdBlockPath = path.join(rd, "block")
|
|
|
|
|
if path.exists(rdBlockPath):
|
|
|
|
|
return getDeviceType(path.realpath(rdBlockPath)) + "-raid"
|
|
|
|
|
else:
|
|
|
|
|
return "loop"
|
|
|
|
|
# lvm
|
|
|
|
|
if prop.get('DM_LV_NAME', "") != "":
|
|
|
|
|
parts = getLvmPartitions(prop.get('DM_VG_NAME', ''),
|
|
|
|
|
prop.get('DM_LV_NAME', ''))
|
|
|
|
|
if parts:
|
|
|
|
|
propPartLvm = udev.get_device_info(name=parts[0])
|
|
|
|
|
if 'DEVPATH' in propPartLvm:
|
|
|
|
|
return getDeviceType(propPartLvm['DEVPATH']) + "-lvm"
|
|
|
|
|
return "loop"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getRaidPartitions(raidpath):
|
|
|
|
|
"""Get raid partitions"""
|
|
|
|
|
prop = udev.get_device_info(path=raidpath)
|
|
|
|
|
raidParts = []
|
|
|
|
|
if prop.get('MD_LEVEL', "").startswith("raid"):
|
|
|
|
|
if not raidpath.startswith('/sys'):
|
|
|
|
|
raidpath = pathJoin('/sys', raidpath)
|
|
|
|
|
raidpath = pathJoin(raidpath, "md")
|
|
|
|
|
for rd in filter(lambda x: path.basename(x).startswith('rd'),
|
|
|
|
|
listDirectory(raidpath, fullPath=True)):
|
|
|
|
|
rdpath = path.join(raidpath, rd, "block")
|
|
|
|
|
if path.exists(rdpath):
|
|
|
|
|
raidParts.append(
|
|
|
|
|
udev.get_device_info(path=path.realpath(rdpath)).get(
|
|
|
|
|
"DEVNAME", ''))
|
|
|
|
|
return filter(lambda x: x, raidParts)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getPartitionType(prop):
|
|
|
|
|
"""Get type of dos part table (primary,extended or logical)"""
|
|
|
|
|
if prop.get('ID_PART_ENTRY_SCHEME') == 'dos':
|
|
|
|
|
partId = prop.get('ID_PART_ENTRY_TYPE', '')
|
|
|
|
|
partNumber = prop.get('ID_PART_ENTRY_NUMBER', '')
|
|
|
|
|
if partId and partNumber:
|
|
|
|
|
if partId == "0x5":
|
|
|
|
|
return "extended"
|
|
|
|
|
elif int(partNumber) > 4:
|
|
|
|
|
return "logical"
|
|
|
|
|
else:
|
|
|
|
|
return "primary"
|
|
|
|
|
return prop.get('ID_PART_TABLE_TYPE', '')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def refreshLVM():
|
|
|
|
|
"""Run command which refresh information about LVM"""
|
|
|
|
|
vgscan = getProgPath('/sbin/vgscan')
|
|
|
|
|
vgchange = getProgPath('/sbin/vgchange')
|
|
|
|
|
lvchange = getProgPath('/sbin/lvchange')
|
|
|
|
|
|
|
|
|
|
if vgscan and vgchange and lvchange:
|
|
|
|
|
process(vgscan).success()
|
|
|
|
|
process(vgchange, '-ay').success()
|
|
|
|
|
process(vgchange, '--refresh').success()
|
|
|
|
|
for group in getLvmGroups():
|
|
|
|
|
if not os.environ.get('EBUILD_PHASE'):
|
|
|
|
|
process(lvchange, '-ay', group).success()
|
|
|
|
|
process(lvchange, '--refresh', group).success()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def loadEfiVars():
|
|
|
|
|
"""
|
|
|
|
|
Load module with efivars
|
|
|
|
|
"""
|
|
|
|
|
efivars_path = "/sys/firmware/efi"
|
|
|
|
|
from calculate.lib.utils.files import Mounts
|
|
|
|
|
modprobe = getProgPath('/sbin/modprobe')
|
|
|
|
|
if not path.exists(path.dirname(efivars_path)) and modprobe:
|
|
|
|
|
process(modprobe, 'efivars').success()
|
|
|
|
|
mount = getProgPath('/bin/mount')
|
|
|
|
|
mtab = Mounts()
|
|
|
|
|
if mtab.exists(efivars_path) and mtab.readonly(efivars_path):
|
|
|
|
|
process(mount, "-o", "rw,remount", efivars_path)
|
|
|
|
|
mtab.rebuildCache()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def refreshUdev(onlyTrigger=False):
|
|
|
|
|
"""Run command which refresh information about device in udev"""
|
|
|
|
|
if not onlyTrigger:
|
|
|
|
|
udev.clear_cache()
|
|
|
|
|
udevadm = getProgPath('/bin/udevadm')
|
|
|
|
|
if udevadm:
|
|
|
|
|
blkidFile = '/etc/blkid.tab'
|
|
|
|
|
try:
|
|
|
|
|
if path.exists(blkidFile):
|
|
|
|
|
os.unlink(blkidFile)
|
|
|
|
|
except OSError:
|
|
|
|
|
pass
|
|
|
|
|
if not os.environ.get('EBUILD_PHASE'):
|
|
|
|
|
process(udevadm, "trigger", "--subsystem-match", "block").success()
|
|
|
|
|
process(udevadm, "settle", "--timeout=15").success()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getCommonDeviceName(dev):
|
|
|
|
|
"""
|
|
|
|
|
Get common device name (example: LVM -> /dev/dm- and etc)
|
|
|
|
|
"""
|
|
|
|
|
return udev.get_device_info(name=dev).get('DEVNAME', dev)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _UdevInfoFuncStub(object):
|
|
|
|
|
@deprecated
|
|
|
|
|
def __call__(self, *args, **kw):
|
|
|
|
|
return udev.get_device_info(*args, **kw)
|
|
|
|
|
|
|
|
|
|
@deprecated
|
|
|
|
|
def clearCache(self):
|
|
|
|
|
return udev.clear_cache()
|
|
|
|
|
|
|
|
|
|
getUdevDeviceInfo = _UdevInfoFuncStub()
|
|
|
|
|
|
|
|
|
|
|