[PATCH v1] dm: vdisplay: terminate acrn-dm process when SDL init failed

Sun, Peng

From: Sun Peng <peng.p.sun@...>

Virtual display is component which based on native window system.
This feature depended phisical monitor connected and graphic driver in
SOS running correctly. If these dependencies fail, it is a fatal error
for virtual display. We have to terminate the device model to let user
fix runtime environment issue for graphics.

Tracked-On: #7672
Signed-off-by: Sun Peng <peng.p.sun@...>
devicemodel/hw/vdisplay_sdl.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/devicemodel/hw/vdisplay_sdl.c b/devicemodel/hw/vdisplay_sdl.c
index dfad4c6a8..e6127f846 100644
--- a/devicemodel/hw/vdisplay_sdl.c
+++ b/devicemodel/hw/vdisplay_sdl.c
@@ -1141,6 +1141,7 @@ gfx_ui_init()

pr_err("Failed to Init SDL2 system");
+ exit(1);

SDL_GetDisplayBounds(0, &disp_rect);

Join {acrn-dev@lists.projectacrn.org to automatically receive all group messages.