diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-08 18:07:36 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-08 18:07:36 +0100 |
commit | adc08ef19493edac3c3b62c823a1b6c30f582fae (patch) | |
tree | 5d0036327012bb243c79f20eec548c513355b5e8 /networking | |
parent | 8bd0af996226b720342f792129f21581aa08bb5d (diff) |
tftpd: slight correction to progress bar code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/tftp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index 9a9bd2c34..cd5e50c3c 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -129,9 +129,8 @@ static void progress_meter(int flag) errno = save_errno; } -static void tftp_progress_init(const char *file) +static void tftp_progress_init(void) { - G.file = file; progress_meter(-1); } static void tftp_progress_done(void) @@ -139,8 +138,8 @@ static void tftp_progress_done(void) progress_meter(0); } #else -# define tftp_progress_init(file) ((void)0) -# define tftp_progress_done() ((void)0) +# define tftp_progress_init() ((void)0) +# define tftp_progress_done() ((void)0) #endif #if ENABLE_FEATURE_TFTP_BLOCKSIZE @@ -411,7 +410,7 @@ static int tftp_protocol( * we look at server's reply later */ G.size = st.st_size; if (remote_file && st.st_size) - tftp_progress_init(remote_file); + tftp_progress_init(); # endif } #endif @@ -567,7 +566,7 @@ static int tftp_protocol( if (res) { G.size = bb_strtoull(res, NULL, 10); if (remote_file && G.size) - tftp_progress_init(remote_file); + tftp_progress_init(); } } # endif @@ -715,6 +714,9 @@ int tftp_main(int argc UNUSED_PARAM, char **argv) remote_file, local_file); # endif +# if ENABLE_FEATURE_TFTP_PROGRESS_BAR + G.file = remote_file; +# endif result = tftp_protocol( NULL /*our_lsa*/, peer_lsa, local_file, remote_file |