fix some missed binary prefixes for units

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
Chen Hanxiao 2014-06-17 09:33:14 +08:00
parent 100023baa6
commit 75d43f6a37
4 changed files with 6 additions and 6 deletions

View File

@ -479,7 +479,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label">1.59 GB of 2.2 GB</property>
<property name="label">1.59 GiB of 2.2 GiB</property>
</object>
<packing>
<property name="expand">False</property>
@ -1397,7 +1397,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label">&lt;span size="large"&gt;1234 GB Free&lt;/span&gt; / &lt;i&gt;6000 GB In Use&lt;/i&gt;</property>
<property name="label">&lt;span size="large"&gt;1234 GiB Free&lt;/span&gt; / &lt;i&gt;6000 GiB In Use&lt;/i&gt;</property>
<property name="use_markup">True</property>
</object>
<packing>

View File

@ -139,7 +139,7 @@ def _convert_alloc_val(ignore, val):
return int(round(val / 1024.0))
elif val < 32:
# Assume GB
# Assume GiB
return int(val * 1024)
return int(val)

View File

@ -820,7 +820,7 @@ def add_disk_option(stog, editexample=False):
editmsg += "\n--disk cache= (unset cache)"
stog.add_argument("--disk", action="append",
help=_("Specify storage with various options. Ex.\n"
"--disk size=10 (new 10GB image in default location)\n"
"--disk size=10 (new 10GiB image in default location)\n"
"--disk path=/my/existing/disk,cache=none\n"
"--disk device=cdrom,bus=scsi\n"
"--disk=?") + editmsg)

View File

@ -352,8 +352,8 @@ class XMLProperty(property):
if xpath isn't specified.
@param set_converter: optional function for converting the property
value from the virtinst API to the guest XML. For example,
the Guest.memory API was once in MB, but the libvirt domain
memory API is in KB. So, if xpath is specified, on a 'get'
the Guest.memory API was once in MiB, but the libvirt domain
memory API is in KiB. So, if xpath is specified, on a 'get'
operation we convert the XML value with int(val) / 1024.
@param validate_cb: Called once when value is set, should
raise a RuntimeError if the value is not proper.