[PATCH 2 OF 5] Fix for more command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
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);

[Index of Archives]     [Kernel]     [Linux ia64]     [DCCP]     [Linux for ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux