mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
Add new user mode option -ignore-environment
An empty environment is sometimes useful in user mode. The new option provides it for linux-user and bsd-user (darwin-user still has no environment related options). The patch also adds the documentation for other environment related options. Signed-off-by: Stefan Weil <weil@mail.berlios.de>
This commit is contained in:
parent
999fa40e43
commit
f66724c99a
3 changed files with 26 additions and 0 deletions
|
@ -795,6 +795,12 @@ int main(int argc, char **argv)
|
|||
r = argv[optind++];
|
||||
if (envlist_setenv(envlist, r) != 0)
|
||||
usage();
|
||||
} else if (!strcmp(r, "ignore-environment")) {
|
||||
envlist_free(envlist);
|
||||
if ((envlist = envlist_create()) == NULL) {
|
||||
(void) fprintf(stderr, "Unable to allocate envlist\n");
|
||||
exit(1);
|
||||
}
|
||||
} else if (!strcmp(r, "U")) {
|
||||
r = argv[optind++];
|
||||
if (envlist_unsetenv(envlist, r) != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue