Commit fd727d36c5 for qemu.org
commit fd727d36c55eeaf9d1280cbe670d0d3a9682ff47
Author: Warner Losh <imp@bsdimp.com>
Date: Fri Jun 19 20:50:32 2026 -0600
bsd-user: Move qemu_guest_random_seed_main to same as linux-user
Linux-user initializes this before doing the environment stuff. Go ahead
and move it there for consistency, though it doesn't matter since we
don't use it until later.
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 2fbbfc3d86..13cd752b99 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -541,9 +541,6 @@ int main(int argc, char **argv)
do_strace = 1;
}
- target_environ = envlist_to_environ(envlist, NULL);
- envlist_free(envlist);
-
{
Error *err = NULL;
if (seed_optarg != NULL) {
@@ -557,6 +554,9 @@ int main(int argc, char **argv)
}
}
+ target_environ = envlist_to_environ(envlist, NULL);
+ envlist_free(envlist);
+
/*
* Now that page sizes are configured we can do
* proper page alignment for guest_base.