aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-20 14:25:27 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-20 14:25:27 +0000
commit900c24dc4e98edb5fdb96035028f5d344ce72792 (patch)
treeb1a6a2760cc34af603bbe372dce951415db95ee3
parent5a406510466943f9c70b88bd1a9398147e02e470 (diff)
downloadbusybox-w32-900c24dc4e98edb5fdb96035028f5d344ce72792.tar.gz
busybox-w32-900c24dc4e98edb5fdb96035028f5d344ce72792.tar.bz2
busybox-w32-900c24dc4e98edb5fdb96035028f5d344ce72792.zip
Patch from Jeff Studer <jstuder@aquilagroup.com> to supply a defaults for
localfilename from remotefilename, and for remotefilename from localfilename when the other one is not supplied.
-rw-r--r--networking/tftp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 1e5dddbd2..c03776459 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -548,6 +548,13 @@ int tftp_main(int argc, char **argv)
548 if ((cmd == 0) || (optind == argc)) { 548 if ((cmd == 0) || (optind == argc)) {
549 show_usage(); 549 show_usage();
550 } 550 }
551 if(cmd == tftp_cmd_get)
552 if(localfile == NULL)
553 localfile = remotefile;
554
555 if(cmd == tftp_cmd_put)
556 if(remotefile == NULL)
557 remotefile = localfile;
551 558
552 fd = open(localfile, flags, 0644); 559 fd = open(localfile, flags, 0644);
553 if (fd < 0) { 560 if (fd < 0) {