Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2017-06-01 16:28:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc (Old) and /work/SRC/openSUSE:Factory/.linuxrc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "linuxrc" Thu Jun 1 16:28:29 2017 rev:240 rq:497300 version:5.0.103 Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2017-05-04 08:53:34.415998534 +0200 +++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2017-06-01 16:28:30.926817291 +0200 @@ -1,0 +2,9 @@ +Mon May 22 11:48:48 UTC 2017 - wfeldt@opensuse.org + +- merge gh#openSUSE/linuxrc#140 +- enforce linuxrc's maximum screen dimensions properly + (bsc#1027354) +- increase maximun screen size to cover at least 4k displays +- 5.0.103 + +-------------------------------------------------------------------- Old: ---- linuxrc-5.0.102.tar.xz New: ---- linuxrc-5.0.103.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.PaO4ZR/_old 2017-06-01 16:28:31.458742287 +0200 +++ /var/tmp/diff_new_pack.PaO4ZR/_new 2017-06-01 16:28:31.458742287 +0200 @@ -17,7 +17,7 @@ Name: linuxrc -Version: 5.0.102 +Version: 5.0.103 Release: 0 Summary: SUSE Installation Program License: GPL-3.0+ ++++++ linuxrc-5.0.102.tar.xz -> linuxrc-5.0.103.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.102/VERSION new/linuxrc-5.0.103/VERSION --- old/linuxrc-5.0.102/VERSION 2017-04-28 14:12:04.000000000 +0200 +++ new/linuxrc-5.0.103/VERSION 2017-05-22 13:48:48.000000000 +0200 @@ -1 +1 @@ -5.0.102 +5.0.103 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.102/changelog new/linuxrc-5.0.103/changelog --- old/linuxrc-5.0.102/changelog 2017-04-28 14:12:04.000000000 +0200 +++ new/linuxrc-5.0.103/changelog 2017-05-22 13:48:48.000000000 +0200 @@ -1,3 +1,7 @@ +2017-05-19: 5.0.103 + - increase maximun screen size to cover at least 4k displays + - enforce linuxrc's maximum screen dimensions properly (bsc #1027354) + 2017-04-28: 5.0.102 - some small fixes - read license.tar.gz from repomd repositories (fate #322286) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.102/global.h new/linuxrc-5.0.103/global.h --- old/linuxrc-5.0.102/global.h 2017-04-28 14:12:04.000000000 +0200 +++ new/linuxrc-5.0.103/global.h 2017-05-22 13:48:48.000000000 +0200 @@ -83,7 +83,7 @@ /* terminal sizes */ #define X_DEFAULT 80 #define Y_DEFAULT 24 -#define MAX_X 250 +#define MAX_X 500 #define MAX_Y 150 #define MIN_X 8 #define MIN_Y 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.102/keyboard.c new/linuxrc-5.0.103/keyboard.c --- old/linuxrc-5.0.102/keyboard.c 2017-04-28 14:12:04.000000000 +0200 +++ new/linuxrc-5.0.103/keyboard.c 2017-05-22 13:48:48.000000000 +0200 @@ -84,6 +84,7 @@ static void kbd_timeout (int signal_iv); static void get_screen_size(int fd); +static void adjust_screen_size(void); /* @@ -148,15 +149,7 @@ if(first && config.serial) { get_screen_size(config.kbd_fd); - if(max_x_ig > MAX_X) max_x_ig = MAX_X; - if(max_y_ig > MAX_Y) max_y_ig = MAX_Y; - - if(max_x_ig < MIN_X || max_y_ig < MIN_Y) { - max_x_ig = X_DEFAULT; - max_y_ig = Y_DEFAULT; - } - - if(!config.had_segv) log_info("Window size: %d x %d\n", max_x_ig, max_y_ig); + adjust_screen_size(); memset(&winsize_ri, 0, sizeof winsize_ri); @@ -166,6 +159,11 @@ ioctl(config.kbd_fd, TIOCSWINSZ, &winsize_ri); } + if(first) { + adjust_screen_size(); + log_info("Window size: %d x %d\n", max_x_ig, max_y_ig); + } + } @@ -529,3 +527,18 @@ if(fd >= 0) close(fd); } + +/* + * Clip screen size to maximum linuxrc can handle. + */ +void adjust_screen_size() +{ + if(max_x_ig > MAX_X) max_x_ig = MAX_X; + if(max_y_ig > MAX_Y) max_y_ig = MAX_Y; + + if(max_x_ig < MIN_X || max_y_ig < MIN_Y) { + max_x_ig = X_DEFAULT; + max_y_ig = Y_DEFAULT; + } +} +