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