util: Remove some unused functions

This commit is contained in:
Cole Robinson 2016-08-24 15:37:34 -04:00
parent 44dd5ae0a6
commit 49ad2df0cb

View File

@ -69,29 +69,6 @@ def stat_disk(path):
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):
"""
Check if passed UUID string is in use by another guest of the connection