Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2016-01-15 10:38:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub2 (Old) and /work/SRC/openSUSE:Factory/.grub2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub2" Changes: -------- --- /work/SRC/openSUSE:Factory/grub2/grub2.changes 2015-12-20 10:51:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2016-01-15 10:38:51.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Mon 28 16:53:54 UTC 2015 - [email protected] + +- Add 0001-menu-fix-line-count-calculation-for-long-lines.patch (bsc#943585) + +------------------------------------------------------------------- New: ---- 0001-menu-fix-line-count-calculation-for-long-lines.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2.spec ++++++ --- /var/tmp/diff_new_pack.o8X6gB/_old 2016-01-15 10:38:53.000000000 +0100 +++ /var/tmp/diff_new_pack.o8X6gB/_new 2016-01-15 10:38:53.000000000 +0100 @@ -206,6 +206,7 @@ Patch70: grub2-default-distributor.patch Patch71: grub2-menu-unrestricted.patch Patch72: 0001-Fix-security-issue-when-reading-username-and-passwor.patch +Patch73: 0001-menu-fix-line-count-calculation-for-long-lines.patch # Btrfs snapshot booting related patches Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch Patch102: grub2-btrfs-02-export-subvolume-envvars.patch @@ -481,6 +482,7 @@ %patch70 -p1 %patch71 -p1 %patch72 -p1 +%patch73 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 ++++++ 0001-menu-fix-line-count-calculation-for-long-lines.patch ++++++ >From 7c1f98869a1aedc2210c4d9e5ad9828eeb2dda72 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov <[email protected]> Date: Mon, 28 Dec 2015 19:48:44 +0300 Subject: [PATCH] menu: fix line count calculation for long lines It gave one extra screen line if length was exactly equal to screen width. Reported by Michael Chang. Also-By: Michael Chang <[email protected]> --- grub-core/normal/menu_entry.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c index 62c7e16..2b73225 100644 --- a/grub-core/normal/menu_entry.c +++ b/grub-core/normal/menu_entry.c @@ -126,9 +126,13 @@ ensure_space (struct line *linep, int extra) static int get_logical_num_lines (struct line *linep, struct per_term_screen *term_screen) { - return (grub_getstringwidth (linep->buf, linep->buf + linep->len, - term_screen->term) - / (unsigned) term_screen->geo.entry_width) + 1; + grub_size_t width = grub_getstringwidth (linep->buf, linep->buf + linep->len, + term_screen->term); + + /* Empty line still consumes space on screen */ + return width ? (width + (unsigned) term_screen->geo.entry_width - 1) / + (unsigned) term_screen->geo.entry_width + : 1; } static void -- 1.9.1
