From 04d3ef34451f02df7baea92f5975234260ce4664 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 11 Apr 2012 01:35:51 +0200 Subject: [PATCH] dom0/core: section headers in qubesutils --- dom0/qvm-core/qubesutils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dom0/qvm-core/qubesutils.py b/dom0/qvm-core/qubesutils.py index 1d3ae20d..e1c4a808 100644 --- a/dom0/qvm-core/qubesutils.py +++ b/dom0/qvm-core/qubesutils.py @@ -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