And add a test.
---
 toys/pending/more.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From 984fc8bb249970845b342e2f0bdc07a97804bf77 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Thu, 21 Apr 2016 17:41:40 -0700
Subject: [PATCH] Fix more to a non-tty.

And add a test.
---
 toys/pending/more.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/pending/more.c b/toys/pending/more.c
index 55bed36..59b5c61 100644
--- a/toys/pending/more.c
+++ b/toys/pending/more.c
@@ -63,7 +63,7 @@ static int prompt(FILE *cin, const char* fmt, ...)
 static void do_cat_operation(int fd, char *name)
 {
   if (toys.optc > 1) show_file_header(name);
-  xsendfile(0, 1);
+  xsendfile(fd, 1);
 }
 
 void more_main()
-- 
2.8.0.rc3.226.g39d4020

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to