From 900c24dc4e98edb5fdb96035028f5d344ce72792 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 20 Mar 2002 14:25:27 +0000 Subject: [PATCH] Patch from Jeff Studer to supply a defaults for localfilename from remotefilename, and for remotefilename from localfilename when the other one is not supplied. --- networking/tftp.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- 2.25.1