From 027a73a903af306449710ce12bc09e0e3550c6c9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 4 Aug 2016 10:16:59 -0500 Subject: Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout, add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users. --- toys/pending/tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/pending/tftp.c') diff --git a/toys/pending/tftp.c b/toys/pending/tftp.c index 60d5f172..1c6fe9e6 100644 --- a/toys/pending/tftp.c +++ b/toys/pending/tftp.c @@ -381,7 +381,7 @@ int file_put(void) sd = init_tftp(&server); packet = (uint8_t*)xzalloc(TFTP_IOBUFSIZE); - fd = xopen(TT.local_file, O_RDONLY); + fd = xopenro(TT.local_file); for (;;) { //first loop for request send and confirmation from server. packetlen = mkpkt_request(packet, TFTP_OP_WRQ, TT.remote_file, 1); -- cgit v1.2.3