Skip to contentSkip to conversation

linux-user: drop redundant handling of environment variables

PATCH Applied Max Filippov 2 participants 3 messages Sep 6, 2019 – Sep 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: drop redundant handling of environment variables

QEMU_STRACE and QEMU_RAND_SEED are handled by the parse_args, no need to do it again in main.

---
 linux-user/main.c | 7 -------
 1 file changed, 7 deletions(-)
linux-user/main.c +0 -7
index c9d97d2b1fc6..22ae2b3e65d1 100644
@@ -701,13 +701,6 @@ int main(int argc, char **argv, char **envp)
 
     thread_cpu = cpu;
 
-    if (getenv("QEMU_STRACE")) {
-        do_strace = 1;
-    }
-
-    if (seed_optarg == NULL) {
-        seed_optarg = getenv("QEMU_RAND_SEED");
-    }
     {
         Error *err = NULL;
         if (seed_optarg != NULL) {
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw

Le 06/09/2019 à 18:57, Max Filippov a écrit :

Quoted 17 lines

QEMU_STRACE and QEMU_RAND_SEED are handled by the parse_args, no need to do it again in main.

---
 linux-user/main.c | 7 -------
 1 file changed, 7 deletions(-)
linux-user/main.c +0 -0
index c9d97d2b1fc6..22ae2b3e65d1 100644
@@ -701,13 +701,6 @@ int main(int argc, char **argv, char **envp)
 
     thread_cpu = cpu;
 

linux-user/main.c int main(int argc, char **argv, char **envp) · line 706

Quoted 10 lines
linux-user/main.c +0 -7
-    if (getenv("QEMU_STRACE")) {
-        do_strace = 1;
-    }
-
-    if (seed_optarg == NULL) {
-        seed_optarg = getenv("QEMU_RAND_SEED");
-    }
     {
         Error *err = NULL;
         if (seed_optarg != NULL) {
#2 lore raw
In reply to Max Filippov

Le 06/09/2019 à 18:57, Max Filippov a écrit :

Quoted 17 lines

QEMU_STRACE and QEMU_RAND_SEED are handled by the parse_args, no need to do it again in main.

---
 linux-user/main.c | 7 -------
 1 file changed, 7 deletions(-)
linux-user/main.c +0 -0
index c9d97d2b1fc6..22ae2b3e65d1 100644
@@ -701,13 +701,6 @@ int main(int argc, char **argv, char **envp)
 
     thread_cpu = cpu;
 

linux-user/main.c int main(int argc, char **argv, char **envp) · line 706

Quoted 10 lines
linux-user/main.c +0 -7
-    if (getenv("QEMU_STRACE")) {
-        do_strace = 1;
-    }
-
-    if (seed_optarg == NULL) {
-        seed_optarg = getenv("QEMU_RAND_SEED");
-    }
     {
         Error *err = NULL;
         if (seed_optarg != NULL) {

Applied to my linux-user branch.

Thanks,
Laurent