[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH 2/2] wget: notify on download begin and end
From: Martin Lewis <martin.lewis.x84 () gmail ! com>
Date: 2018-12-26 15:28:46
Message-ID: 1545838126-28925-2-git-send-email-martin.lewis.x84 () gmail ! com
[Download RAW message or body]
When using -o to file the progress meter is not displayed, so write that
we started the download and that we finished it.
Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com>
---
networking/wget.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/networking/wget.c b/networking/wget.c
index 8da0ce8..914221c 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -876,6 +876,10 @@ static void NOINLINE retrieve_file_data(FILE *dfp)
polldata.fd = fileno(dfp);
polldata.events = POLLIN | POLLPRI;
#endif
+ if (G.output_fd == 1)
+ fprintf(stderr, "writing to stdout\n");
+ else
+ fprintf(stderr, "saving to '%s'\n", G.fname_out);
progress_meter(PROGRESS_START);
if (G.chunked)
@@ -1021,6 +1025,10 @@ static void NOINLINE retrieve_file_data(FILE *dfp)
G.chunked = 0; /* makes it show 100% even for chunked download */
G.got_clen = 1; /* makes it show 100% even for download of (formerly) unknown size */
progress_meter(PROGRESS_END);
+ if (G.output_fd == 1)
+ fprintf(stderr, "written to stdout\n");
+ else
+ fprintf(stderr, "'%s' saved\n", G.fname_out);
}
static void download_one_url(const char *url)
--
1.9.1
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic