grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH 1/3] Decrease minimal gfxterm size to 10x6
Date: Thu, 16 May 2024 22:34:42 +0300	[thread overview]
Message-ID: <20240516193444.4750-1-phcoder@gmail.com> (raw)

10x6 is still marginally usable. Erroring out may leave user without any console

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 grub-core/term/gfxterm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c
index addad5ee2..e8734a388 100644
--- a/grub-core/term/gfxterm.c
+++ b/grub-core/term/gfxterm.c
@@ -234,12 +234,13 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y,
 
   /*
    * There must be a minimum number of rows and columns for the screen to
-   * make sense. Arbitrarily pick half of 80x24. If either dimensions is 0
+   * make sense. Arbitrarily pick 10x6. If either dimensions is 0
    * we would allocate 0 bytes for the text_buffer.
    */
-  if (virtual_screen.columns < 40 || virtual_screen.rows < 12)
+  if (virtual_screen.columns < 10 || virtual_screen.rows < 6)
     return grub_error (GRUB_ERR_BAD_FONT,
-		       "font: glyphs too large to fit on screen");
+		       "font: glyphs too large to fit on screen (%dx%d)",
+		       virtual_screen.columns, virtual_screen.rows);
 
   /* Allocate memory for text buffer.  */
   virtual_screen.text_buffer =
-- 
2.39.2


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

             reply	other threads:[~2024-05-16 19:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 19:34 Vladimir Serbinenko [this message]
2024-05-16 19:34 ` [PATCH 2/3] Don't attempt to do terminal functions on non-functional gfxterm Vladimir Serbinenko
2024-05-16 19:34 ` [PATCH 3/3] grub_unicode_destroy_glyph: Don't destroy NULL glyph 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=20240516193444.4750-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).