summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen2002-03-20 14:25:27 +0000
committerEric Andersen2002-03-20 14:25:27 +0000
commit900c24dc4e98edb5fdb96035028f5d344ce72792 (patch)
treeb1a6a2760cc34af603bbe372dce951415db95ee3 /networking
parent5a406510466943f9c70b88bd1a9398147e02e470 (diff)
downloadbusybox-900c24dc4e98edb5fdb96035028f5d344ce72792.zip
busybox-900c24dc4e98edb5fdb96035028f5d344ce72792.tar.gz
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.
Diffstat (limited to 'networking')
-rw-r--r--networking/tftp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 1e5dddb..c037764 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -548,6 +548,13 @@ int tftp_main(int argc, char **argv)
if ((cmd == 0) || (optind == argc)) {
show_usage();
}
+ if(cmd == tftp_cmd_get)
+ if(localfile == NULL)
+ localfile = remotefile;
+
+ if(cmd == tftp_cmd_put)
+ if(remotefile == NULL)
+ remotefile = localfile;
fd = open(localfile, flags, 0644);
if (fd < 0) {