aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index e5efb7b845..6ab3efd6c0 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -364,11 +364,12 @@ int main(int argc, char **argv)
} else if (!strcmp(r, "L")) {
interp_prefix = argv[optind++];
} else if (!strcmp(r, "p")) {
- qemu_host_page_size = atoi(argv[optind++]);
- if (qemu_host_page_size == 0 ||
- (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
- fprintf(stderr, "page size must be a power of two\n");
- exit(1);
+ unsigned size, want = qemu_real_host_page_size();
+
+ r = argv[optind++];
+ if (qemu_strtoui(r, NULL, 10, &size) || size != want) {
+ warn_report("Deprecated page size option cannot "
+ "change host page size (%u)", want);
}
} else if (!strcmp(r, "g")) {
gdbstub = g_strdup(argv[optind++]);