File initviocons.minimal-termsize.patch of Package initviocons

 main.c |    9 +++++++++
 1 files changed, 9 insertions(+)

Index: initviocons-0.4/main.c
===================================================================
--- initviocons-0.4.orig/main.c
+++ initviocons-0.4/main.c
@@ -245,6 +245,15 @@ int main(int argc, char *argv[])
 		}
 		if (Debug) printf ("%d cols, %d lines \n", cols, lines);
 
+		/*
+		 * a terminal size smaller than the defaults doesnt make sense
+		 * this will happen on the POWER4/POWER5 hvc console
+		 */
+		if (DEFAULT_COLS >= cols)
+			cols = DEFAULT_COLS;
+		if (DEFAULT_ROWS >= lines)
+			lines = DEFAULT_ROWS;
+
 
 		/* get more info to discriminate terminals */
 		switch (foundterm) {
openSUSE Build Service is sponsored by