diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-20 14:25:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-20 14:25:27 +0000 |
commit | 900c24dc4e98edb5fdb96035028f5d344ce72792 (patch) | |
tree | b1a6a2760cc34af603bbe372dce951415db95ee3 /networking | |
parent | 5a406510466943f9c70b88bd1a9398147e02e470 (diff) | |
download | 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.c | 7 |
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) 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) { |