aboutsummaryrefslogtreecommitdiff
path: root/networking/tftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/tftp.c')
-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)
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) {