diff options
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) | |||
548 | if ((cmd == 0) || (optind == argc)) { | 548 | if ((cmd == 0) || (optind == argc)) { |
549 | show_usage(); | 549 | show_usage(); |
550 | } | 550 | } |
551 | if(cmd == tftp_cmd_get) | ||
552 | if(localfile == NULL) | ||
553 | localfile = remotefile; | ||
554 | |||
555 | if(cmd == tftp_cmd_put) | ||
556 | if(remotefile == NULL) | ||
557 | remotefile = localfile; | ||
551 | 558 | ||
552 | fd = open(localfile, flags, 0644); | 559 | fd = open(localfile, flags, 0644); |
553 | if (fd < 0) { | 560 | if (fd < 0) { |