From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH 2/3] gfxmenu: Add missing error handling
Date: Thu, 16 May 2024 22:31:52 +0300 [thread overview]
Message-ID: <20240516193153.4595-2-phcoder@gmail.com> (raw)
In-Reply-To: <20240516193153.4595-1-phcoder@gmail.com>
We don't currently handle errors from gfxterm
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
| 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--git a/grub-core/gfxmenu/view.c b/grub-core/gfxmenu/view.c
index e02eba8b0..19d3f2f14 100644
--- a/grub-core/gfxmenu/view.c
+++ b/grub-core/gfxmenu/view.c
@@ -539,7 +539,7 @@ init_terminal (grub_gfxmenu_view_t view)
/* Note: currently there is no API for changing the gfxterm font
on the fly, so whatever font the initially loaded theme specifies
will be permanent. */
- grub_gfxterm_set_window (GRUB_VIDEO_RENDER_TARGET_DISPLAY,
+ grub_err_t err = grub_gfxterm_set_window (GRUB_VIDEO_RENDER_TARGET_DISPLAY,
view->terminal_rect.x,
view->terminal_rect.y,
view->terminal_rect.width,
@@ -547,6 +547,9 @@ init_terminal (grub_gfxmenu_view_t view)
view->double_repaint,
terminal_font,
view->terminal_border);
+ if (err)
+ return;
+
grub_gfxterm_decorator_hook = grub_gfxmenu_draw_terminal_box;
}
--
2.39.2
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2024-05-16 19:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 19:31 [PATCH 1/3] Add grub_font_get_no_fallback Vladimir Serbinenko
2024-05-16 19:31 ` Vladimir Serbinenko [this message]
2024-05-16 19:31 ` [PATCH 3/3] Improve font fallback scanning and validation for gfxterm Vladimir Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240516193153.4595-2-phcoder@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.