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

linux-user: 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-46-f4bug@amsat.org>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 68dbb6d0
......@@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qemu-version.h"
#include <sys/syscall.h>
#include <sys/resource.h>
......@@ -274,9 +275,9 @@ static void handle_arg_stack_size(const char *arg)
}
if (*p == 'M') {
guest_stack_size *= 1024 * 1024;
guest_stack_size *= MiB;
} else if (*p == 'k' || *p == 'K') {
guest_stack_size *= 1024;
guest_stack_size *= KiB;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册