8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From 44b38e49885ffcb286e796b572f3f862f3be371a Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
Date: Wed, 21 Jan 2015 15:51:49 +0100
|
|
Subject: [PATCH 168/506] grub_menu_init_page: Avoid returning 0 geometry to
|
|
avoid divisions by 0.
|
|
|
|
---
|
|
ChangeLog | 5 +++++
|
|
grub-core/normal/menu_text.c | 3 +++
|
|
2 files changed, 8 insertions(+)
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index 4b9f9b2..3383d46 100644
|
|
--- a/ChangeLog
|
|
+++ b/ChangeLog
|
|
@@ -1,5 +1,10 @@
|
|
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
|
+ * grub-core/normal/menu_text.c (grub_menu_init_page): Avoid
|
|
+ returning 0 geometry to avoid divisions by 0.
|
|
+
|
|
+2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
|
+
|
|
* grub-core/osdep/unix/cputime.c (grub_util_get_cpu_time_ms): Cache
|
|
sc_clk_tck and check it for sanity.
|
|
|
|
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
|
|
index 2ff2941..e22bb91 100644
|
|
--- a/grub-core/normal/menu_text.c
|
|
+++ b/grub-core/normal/menu_text.c
|
|
@@ -369,6 +369,9 @@ grub_menu_init_page (int nested, int edit,
|
|
geo->border = 0;
|
|
}
|
|
|
|
+ if (geo->entry_width <= 0)
|
|
+ geo->entry_width = 1;
|
|
+
|
|
if (geo->num_entries - msg_num_lines < 3
|
|
&& geo->timeout_lines == 2)
|
|
{
|
|
--
|
|
2.4.3
|
|
|