[PATCH 2 OF 5] Fix for more command

Juan Perez-Sanchez <[email protected]> Mon, 16 Mar 2015 01:16:38 -0600
Newsgroups org.kernel.vger.linux-8086
Message-ID <CAD6VGuYkNyQPmckkexGEyMfH_mir06-Fn15PTTTnyZtKaWQKqA@mail.gmail.com>
Hi,

In ELKS, the console is in /dev/tty1, not /dev/tty0. In the new
images, /dev/tty0 does nor exist, thus the more command does not work
with pipes. This command is useful to check the operation of pipes.
elks-3n.patch (text/x-patch, 447 B)
diff -Nur elkscmd.orig/file_utils/more.c elkscmd/file_utils/more.c
--- elkscmd.orig/file_utils/more.c	2015-03-08 17:08:12.000000000 -0600
+++ elkscmd/file_utils/more.c	2015-03-11 17:16:10.000000000 -0600
@@ -46,7 +46,7 @@
 		write(STDOUT_FILENO," >>\n",4);
 		} else {
 			fd = 0;
-			cin = open("/dev/tty0", "r");
+			cin = open("/dev/tty1", "r");
 			if (!cin)
 				cin = fopen("/dev/console", "r");
 			write(STDOUT_FILENO,"<< stdin >>\n",12);