mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
util: Remove some unused functions
This commit is contained in:
parent
44dd5ae0a6
commit
49ad2df0cb
@ -69,29 +69,6 @@ def stat_disk(path):
|
|||||||
return True, 0
|
return True, 0
|
||||||
|
|
||||||
|
|
||||||
def blkdev_size(path):
|
|
||||||
"""Return the size of the block device. We can't use os.stat() as
|
|
||||||
that returns zero on many platforms."""
|
|
||||||
fd = os.open(path, os.O_RDONLY)
|
|
||||||
# os.SEEK_END is not present on all systems
|
|
||||||
size = os.lseek(fd, 0, 2)
|
|
||||||
os.close(fd)
|
|
||||||
return size
|
|
||||||
|
|
||||||
|
|
||||||
def sanitize_arch(arch):
|
|
||||||
"""Ensure passed architecture string is the format we expect it.
|
|
||||||
Returns the sanitized result"""
|
|
||||||
if not arch:
|
|
||||||
return arch
|
|
||||||
tmparch = arch.lower().strip()
|
|
||||||
if re.match(r'i[3-9]86', tmparch):
|
|
||||||
return "i686"
|
|
||||||
elif tmparch == "amd64":
|
|
||||||
return "x86_64"
|
|
||||||
return arch
|
|
||||||
|
|
||||||
|
|
||||||
def vm_uuid_collision(conn, uuid):
|
def vm_uuid_collision(conn, uuid):
|
||||||
"""
|
"""
|
||||||
Check if passed UUID string is in use by another guest of the connection
|
Check if passed UUID string is in use by another guest of the connection
|
||||||
|
Loading…
Reference in New Issue
Block a user