dom0/core: section headers in qubesutils
This commit is contained in:
		
							parent
							
								
									9a2feeb214
								
							
						
					
					
						commit
						37c7dcc270
					
				| @ -93,6 +93,8 @@ def print_stdout(text): | |||||||
| def print_stderr(text): | def print_stderr(text): | ||||||
|     print >> sys.stderr, (text) |     print >> sys.stderr, (text) | ||||||
| 
 | 
 | ||||||
|  | ###### Block devices ######## | ||||||
|  | 
 | ||||||
| def block_devid_to_name(devid): | def block_devid_to_name(devid): | ||||||
|     major = devid / 256 |     major = devid / 256 | ||||||
|     minor = 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)] |     xl_cmd = [ '/usr/sbin/xl', 'block-detach', str(vm_xid), str(frontend)] | ||||||
|     subprocess.check_call(xl_cmd) |     subprocess.check_call(xl_cmd) | ||||||
| 
 | 
 | ||||||
|  | ####### QubesWatch ###### | ||||||
|  | 
 | ||||||
| def only_in_first_list(l1, l2): | def only_in_first_list(l1, l2): | ||||||
|     ret=[] |     ret=[] | ||||||
|     for i in l1: |     for i in l1: | ||||||
| @ -423,6 +427,8 @@ class QubesWatch(object): | |||||||
|         while True: |         while True: | ||||||
|             self.watch_single() |             self.watch_single() | ||||||
| 
 | 
 | ||||||
|  | ######## Backups ######### | ||||||
|  | 
 | ||||||
| def get_disk_usage(file_or_dir): | def get_disk_usage(file_or_dir): | ||||||
|     if not os.path.exists(file_or_dir): |     if not os.path.exists(file_or_dir): | ||||||
|         return 0 |         return 0 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marek Marczykowski
						Marek Marczykowski