dom0/core: section headers in qubesutils

This commit is contained in:
Marek Marczykowski 2012-04-11 01:35:51 +02:00
parent 711bd24268
commit 04d3ef3445

View File

@ -93,6 +93,8 @@ def print_stdout(text):
def print_stderr(text):
print >> sys.stderr, (text)
###### Block devices ########
def block_devid_to_name(devid):
major = devid / 256
minor = devid % 256
@ -340,6 +342,8 @@ def block_detach(vm, frontend = "xvdi", vm_xid = None):
xl_cmd = [ '/usr/sbin/xl', 'block-detach', str(vm_xid), str(frontend)]
subprocess.check_call(xl_cmd)
####### QubesWatch ######
def only_in_first_list(l1, l2):
ret=[]
for i in l1:
@ -423,6 +427,8 @@ class QubesWatch(object):
while True:
self.watch_single()
######## Backups #########
def get_disk_usage(file_or_dir):
if not os.path.exists(file_or_dir):
return 0