mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-13 04:38:20 +00:00
vbox: use with_libc
This commit is contained in:
committed by
Christian Helmuth
parent
4eb04119a5
commit
9ba24c0722
@ -237,6 +237,7 @@ void Libc::Component::construct(Libc::Env &env)
|
|||||||
/* enable stdout/stderr for VBox Log infrastructure */
|
/* enable stdout/stderr for VBox Log infrastructure */
|
||||||
init_libc_vbox_logger();
|
init_libc_vbox_logger();
|
||||||
|
|
||||||
|
Libc::with_libc([&] () {
|
||||||
static char argv0[] = { '_', 'm', 'a', 'i', 'n', 0};
|
static char argv0[] = { '_', 'm', 'a', 'i', 'n', 0};
|
||||||
static char *argv[1] = { argv0 };
|
static char *argv[1] = { argv0 };
|
||||||
char **dummy_argv = argv;
|
char **dummy_argv = argv;
|
||||||
@ -250,6 +251,6 @@ void Libc::Component::construct(Libc::Env &env)
|
|||||||
Genode::error("startup of VMM failed - reason ", hrc, " - exiting ...");
|
Genode::error("startup of VMM failed - reason ", hrc, " - exiting ...");
|
||||||
throw -2;
|
throw -2;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
Genode::error("VMM exiting ...");
|
Genode::error("VMM exiting ...");
|
||||||
}
|
}
|
||||||
|
@ -268,6 +268,7 @@ void Libc::Component::construct(Libc::Env &env)
|
|||||||
/* enable stdout/stderr for VBox Log infrastructure */
|
/* enable stdout/stderr for VBox Log infrastructure */
|
||||||
init_libc_vbox_logger();
|
init_libc_vbox_logger();
|
||||||
|
|
||||||
|
Libc::with_libc([&] () {
|
||||||
static char argv0[] = { '_', 'm', 'a', 'i', 'n', 0};
|
static char argv0[] = { '_', 'm', 'a', 'i', 'n', 0};
|
||||||
static char *argv[1] = { argv0 };
|
static char *argv[1] = { argv0 };
|
||||||
char **dummy_argv = argv;
|
char **dummy_argv = argv;
|
||||||
@ -282,6 +283,7 @@ void Libc::Component::construct(Libc::Env &env)
|
|||||||
RTErrCOMGet(hrc)->pszMsgFull, "' - exiting ...");
|
RTErrCOMGet(hrc)->pszMsgFull, "' - exiting ...");
|
||||||
throw -2;
|
throw -2;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Genode::error("VMM exiting ...");
|
Genode::error("VMM exiting ...");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user