From be3e888bbed9d94b4500fbd2489bcc0e595d1ee3 Mon Sep 17 00:00:00 2001 From: Jason Mehring Date: Thu, 18 Dec 2014 08:36:09 -0500 Subject: [PATCH] Fixed typos --- core-modules/000QubesVm.py | 4 ++-- doc/qvm-tools/qvm-prefs.rst | 2 +- doc/qvm-tools/qvm-revert-template-changes.rst | 2 +- doc/qvm-tools/qvm-service.rst | 4 ++-- qmemman/qmemman_algo.py | 20 +++++++++---------- qubes/dochelpers.py | 6 +++--- qubes/vm/__init__.py | 2 +- qvm-tools/qvm-revert-template-changes | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 18f8813b..4fb882d1 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -168,7 +168,7 @@ class QubesVm(object): "func": lambda value: datetime.datetime.fromtimestamp(int(value)) if value else None }, - ##### Internal attributes - will be overriden in __init__ regardless of args + ##### Internal attributes - will be overridden in __init__ regardless of args "config_file_template": { "func": lambda x: system_path["config_template_pv"] }, "icon_path": { @@ -316,7 +316,7 @@ class QubesVm(object): qubes_host = QubesHost() total_mem_mb = qubes_host.memory_total/1024 self.maxmem = total_mem_mb/2 - + # Linux specific cap: max memory can't scale beyond 10.79*init_mem if self.maxmem > self.memory * 10: self.maxmem = self.memory * 10 diff --git a/doc/qvm-tools/qvm-prefs.rst b/doc/qvm-tools/qvm-prefs.rst index 8ca298d3..3ad952b7 100644 --- a/doc/qvm-tools/qvm-prefs.rst +++ b/doc/qvm-tools/qvm-prefs.rst @@ -181,7 +181,7 @@ guiagent_installed Accepted values: ``True``, ``False`` This HVM have gui agent installed. This option disables full screen GUI - virtualization and enables per-window seemless GUI mode. This option will + virtualization and enables per-window seamless GUI mode. This option will be automatically turned on during Qubes Windows Tools installation, but if you install qubes gui agent in some other OS, you need to turn this option on manually. You can turn this option off to troubleshoot some early HVM OS diff --git a/doc/qvm-tools/qvm-revert-template-changes.rst b/doc/qvm-tools/qvm-revert-template-changes.rst index dee5c377..f3ff3c6a 100644 --- a/doc/qvm-tools/qvm-revert-template-changes.rst +++ b/doc/qvm-tools/qvm-revert-template-changes.rst @@ -17,7 +17,7 @@ Options .. option:: --force - Do not prompt for comfirmation + Do not prompt for confirmation Authors ======= diff --git a/doc/qvm-tools/qvm-service.rst b/doc/qvm-tools/qvm-service.rst index e5afa7a5..2704a4c5 100644 --- a/doc/qvm-tools/qvm-service.rst +++ b/doc/qvm-tools/qvm-service.rst @@ -36,7 +36,7 @@ Supported services ================== This list can be incomplete as VM can implement any additional service without -knowlege of qubes-core code. +knowledge of qubes-core code. meminfo-writer Default: enabled everywhere excluding NetVM @@ -47,7 +47,7 @@ meminfo-writer .. note:: This service is enforced to be set by dom0 code. If you try to - remove it (reset to defult state), will be recreated with the rule: enabled + remove it (reset to default state), will be recreated with the rule: enabled if VM have no PCI devices assigned, otherwise disabled. qubes-dvm diff --git a/qmemman/qmemman_algo.py b/qmemman/qmemman_algo.py index 7bd0960d..271ee1fa 100755 --- a/qmemman/qmemman_algo.py +++ b/qmemman/qmemman_algo.py @@ -24,7 +24,7 @@ import logging import string -# This are only defaults - can be overriden by QMemmanServer with values from +# This are only defaults - can be overridden by QMemmanServer with values from # config file CACHE_FACTOR = 1.3 MIN_PREFMEM = 200*1024*1024 @@ -68,7 +68,7 @@ def is_meminfo_suspicious(domain, untrusted_meminfo): if not ret and untrusted_meminfo['MemTotal'] < untrusted_meminfo['MemFree'] + untrusted_meminfo['Cached'] + untrusted_meminfo['Buffers']: ret = True #we could also impose some limits on all the above values -#but it has little purpose - all the domain can gain by passing e.g. +#but it has little purpose - all the domain can gain by passing e.g. #very large SwapTotal is that it will be assigned all free Xen memory #it can be achieved with legal values, too, and it will not allow to #starve existing domains, by design @@ -93,7 +93,7 @@ def refresh_meminfo_for_domain(domain, untrusted_xenstore_key): #sanitized, can assign domain.meminfo = untrusted_meminfo domain.mem_used = domain.meminfo['MemTotal'] - domain.meminfo['MemFree'] - domain.meminfo['Cached'] - domain.meminfo['Buffers'] + domain.meminfo['SwapTotal'] - domain.meminfo['SwapFree'] - + def prefmem(domain): #dom0 is special, as it must have large cache, for vbds. Thus, give it a special boost if domain.id == '0': @@ -105,7 +105,7 @@ def memory_needed(domain): #in balance(), "distribute total_available_memory proportionally to mempref" relies on this exact formula ret = prefmem(domain) - domain.memory_actual return ret - + #prepare list of (domain, memory_target) pairs that need to be passed #to "xm memset" equivalent in order to obtain "memsize" of memory #return empty list when the request cannot be satisfied @@ -208,7 +208,7 @@ def balance_when_enough_memory(domain_dictionary, return donors_rq + acceptors_rq -#when not enough mem to make everyone be above prefmem, make donors be at prefmem, and +#when not enough mem to make everyone be above prefmem, make donors be at prefmem, and #redistribute anything left between acceptors def balance_when_low_on_memory(domain_dictionary, xen_free_memory, total_mem_pref_acceptors, donors, acceptors): @@ -239,15 +239,15 @@ def balance_when_low_on_memory(domain_dictionary, #redistribute memory across domains -#called when one of domains update its 'meminfo' xenstore key +#called when one of domains update its 'meminfo' xenstore key #return the list of (domain, memory_target) pairs to be passed to -#"xm memset" equivalent +#"xm memset" equivalent def balance(xen_free_memory, domain_dictionary): log.debug('balance(xen_free_memory={!r}, domain_dictionary={!r})'.format( xen_free_memory, domain_dictionary)) #sum of all memory requirements - in other words, the difference between -#memory required to be added to domains (acceptors) to make them be at their +#memory required to be added to domains (acceptors) to make them be at their #preferred memory, and memory that can be taken from domains (donors) that #can provide memory. So, it can be negative when plenty of memory. total_memory_needed = 0 @@ -257,7 +257,7 @@ def balance(xen_free_memory, domain_dictionary): #sum of memory preferences of all domains that require more memory total_mem_pref_acceptors = 0 - + donors = list() # domains that can yield memory acceptors = list() # domains that require more memory #pass 1: compute the above "total" values @@ -276,7 +276,7 @@ def balance(xen_free_memory, domain_dictionary): total_memory_needed += need total_mem_pref += prefmem(domain_dictionary[i]) - total_available_memory = xen_free_memory - total_memory_needed + total_available_memory = xen_free_memory - total_memory_needed if total_available_memory > 0: return balance_when_enough_memory(domain_dictionary, xen_free_memory, total_mem_pref, total_available_memory) else: diff --git a/qubes/dochelpers.py b/qubes/dochelpers.py index f8abf3ab..6791d799 100644 --- a/qubes/dochelpers.py +++ b/qubes/dochelpers.py @@ -3,8 +3,8 @@ '''Documentation helpers -This module contains classes and functions which help to mainain documentation, -particulary our custom Sphinx extension. +This module contains classes and functions which help to maintain documentation, +particularly our custom Sphinx extension. ''' @@ -44,7 +44,7 @@ def ticket(name, rawtext, text, lineno, inliner, options={}, content=[]): :param str name: The role name used in the document :param str rawtext: The entire markup snippet, with role :param str text: The text marked with the role - :param int lineno: The line noumber where rawtext appearn in the input + :param int lineno: The line number where rawtext appears in the input :param docutils.parsers.rst.states.Inliner inliner: The inliner instance that called this function :param options: Directive options for customisation :param content: The directive content for customisation diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index cedb4384..dcd380f1 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -142,7 +142,7 @@ class BaseVM(qubes.PropertyHolder): :param xml: xml node from which to deserialise :type xml: :py:class:`lxml.etree._Element` or :py:obj:`None` - This class is responsible for serialising and deserialising machines and + This class is responsible for serializing and deserialising machines and provides basic framework. It contains no management logic. For that, see :py:class:`qubes.vm.qubesvm.QubesVM`. ''' diff --git a/qvm-tools/qvm-revert-template-changes b/qvm-tools/qvm-revert-template-changes index 29c491ca..8b2500ae 100755 --- a/qvm-tools/qvm-revert-template-changes +++ b/qvm-tools/qvm-revert-template-changes @@ -34,7 +34,7 @@ def main(): usage = "usage: %prog [options] " parser = OptionParser (usage) parser.add_option ("--force", action="store_true", dest="force", default=False, - help="Do not prompt for comfirmation") + help="Do not prompt for confirmation") (options, args) = parser.parse_args () if (len (args) != 1): @@ -98,7 +98,7 @@ def main(): prompt = raw_input ("Do you want to proceed? [y/N] ") if not (prompt == "y" or prompt == "Y"): exit (0) - + p = subprocess.Popen(["/sbin/dmsetup", "table", old_dmdev], stdout=subprocess.PIPE) result = p.communicate() dm_table = result[0]