aboutsummaryrefslogtreecommitdiff
path: root/util-linux/script.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-19 09:48:17 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-19 09:48:17 +0000
commit5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d (patch)
tree44b7cf5fb706b0816dd4525782ca8c37d07c2f43 /util-linux/script.c
parent636a1f85e89432601c59cdc3239fc867b4adf051 (diff)
downloadbusybox-w32-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.tar.gz
busybox-w32-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.tar.bz2
busybox-w32-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.zip
- use STD*_FILENO some more. No object-code changes
Diffstat (limited to 'util-linux/script.c')
-rw-r--r--util-linux/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/script.c b/util-linux/script.c
index c1883328f..e70294e6c 100644
--- a/util-linux/script.c
+++ b/util-linux/script.c
@@ -124,7 +124,7 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv)
124 goto restore; 124 goto restore;
125 } 125 }
126 if (count > 0) { 126 if (count > 0) {
127 full_write(1, buf, count); 127 full_write(STDOUT_FILENO, buf, count);
128 full_write(outfd, buf, count); 128 full_write(outfd, buf, count);
129 if (opt & 4) { /* -f */ 129 if (opt & 4) { /* -f */
130 fsync(outfd); 130 fsync(outfd);
@@ -132,7 +132,7 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv)
132 } 132 }
133 } 133 }
134 if (pfd[1].revents) { 134 if (pfd[1].revents) {
135 count = safe_read(0, buf, sizeof(buf)); 135 count = safe_read(STDIN_FILENO, buf, sizeof(buf));
136 if (count <= 0) { 136 if (count <= 0) {
137 /* err/eof from stdin: don't read stdin anymore */ 137 /* err/eof from stdin: don't read stdin anymore */
138 pfd[1].revents = 0; 138 pfd[1].revents = 0;
@@ -152,7 +152,7 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv)
152 loop = 999; 152 loop = 999;
153 /* pty is in O_NONBLOCK mode, we exit as soon as buffer is empty */ 153 /* pty is in O_NONBLOCK mode, we exit as soon as buffer is empty */
154 while (--loop && (count = safe_read(pty, buf, sizeof(buf))) > 0) { 154 while (--loop && (count = safe_read(pty, buf, sizeof(buf))) > 0) {
155 full_write(1, buf, count); 155 full_write(STDOUT_FILENO, buf, count);
156 full_write(outfd, buf, count); 156 full_write(outfd, buf, count);
157 } 157 }
158 restore: 158 restore: