diff --git a/qubes/tools/qubes_lvm.py b/qubes/tools/qubes_lvm.py index adcfc577..e5bf2103 100644 --- a/qubes/tools/qubes_lvm.py +++ b/qubes/tools/qubes_lvm.py @@ -22,9 +22,7 @@ from __future__ import print_function -import datetime import logging -import os import subprocess import sys import time @@ -35,23 +33,6 @@ import qubes log = logging.getLogger('qubes.storage.lvm') -def lvm_image_changed(vm): - ''' Returns true if source image changed ''' - # TODO: reimplement lvm_image_changed - vm_root = vm.root_img - tp_root = vm.template.root_img - if not os.path.exists(vm_root): - return False - cmd = 'date +"%%s" -d "' + \ - '`sudo tune2fs %s -l|grep "Last write time"|cut -d":" -f2,3,4`"' - result1 = subprocess.check_output(cmd % vm_root, shell=True).strip() - result2 = subprocess.check_output(cmd % tp_root, shell=True).strip() - - result1 = datetime.datetime.strptime(result1, '%c') - result2 = datetime.datetime.strptime(result2, '%c') - return result2 > result1 - - def pool_exists(args): """ Check if given name is an lvm thin volume. """ # TODO Implement a faster and proper working version pool_exists