提交 8ec338ac 编写于 作者: P Philippe Mathieu-Daudé 提交者: Paolo Bonzini

monitor: Use the IEC binary prefix definitions

It eases code review, unit is explicit.

Patch generated using:

  $ git grep -n '[<>][<>]= ?[1-5]0'

and modified manually.
Suggested-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180625124238.25339-43-f4bug@amsat.org>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 af5ecb47
......@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/units.h"
#include <dirent.h>
#include "cpu.h"
#include "hw/hw.h"
......@@ -3303,7 +3304,7 @@ static QDict *monitor_parse_arguments(Monitor *mon,
monitor_printf(mon, "enter a positive value\n");
goto fail;
}
val <<= 20;
val *= MiB;
}
qdict_put_int(qdict, key, val);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册