mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 17:57:34 +03:00
fix some missed binary prefixes for units
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
parent
100023baa6
commit
75d43f6a37
@ -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"><span size="large">1234 GB Free</span> / <i>6000 GB In Use</i></property>
|
||||
<property name="label"><span size="large">1234 GiB Free</span> / <i>6000 GiB In Use</i></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user