Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/37479 )
Change subject: curl: Handle errors in curl_easy_perform() ......................................................................
curl: Handle errors in curl_easy_perform()
Not much we can do, but at least warn the user that something went wrong.
Change-Id: I96374d1b153113a302fa98c27873db863a22f77e Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M curl.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/79/37479/1
diff --git a/curl.c b/curl.c index 6895c62..51c4a11 100644 --- a/curl.c +++ b/curl.c @@ -110,6 +110,9 @@
/* Fetch the file */ res = curl_easy_perform(curl); + if (res != CURLE_OK) + printf("Error while downloading %s: %s\n", filename, + curl_easy_strerror(res));
/* Close file */ fclose(file);
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/37479 )
Change subject: curl: Handle errors in curl_easy_perform() ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/em100/+/37479/2/curl.c File curl.c:
https://review.coreboot.org/c/em100/+/37479/2/curl.c@123 PS2, Line 123: return 0; maybe return (res == CURLE_OK)?0:-1;
Hello build bot (Jenkins), Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/em100/+/37479
to look at the new patch set (#3).
Change subject: curl: Handle errors in curl_easy_perform() ......................................................................
curl: Handle errors in curl_easy_perform()
Not much we can do, but at least warn the user that something went wrong.
Change-Id: I96374d1b153113a302fa98c27873db863a22f77e Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M curl.c 1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/79/37479/3
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/em100/+/37479 )
Change subject: curl: Handle errors in curl_easy_perform() ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/em100/+/37479/2/curl.c File curl.c:
https://review.coreboot.org/c/em100/+/37479/2/curl.c@123 PS2, Line 123: return 0;
maybe return (res == CURLE_OK)?0:-1;
Done
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/37479 )
Change subject: curl: Handle errors in curl_easy_perform() ......................................................................
Patch Set 3: Code-Review+2
Stefan Reinauer has submitted this change. ( https://review.coreboot.org/c/em100/+/37479 )
Change subject: curl: Handle errors in curl_easy_perform() ......................................................................
curl: Handle errors in curl_easy_perform()
Not much we can do, but at least warn the user that something went wrong.
Change-Id: I96374d1b153113a302fa98c27873db863a22f77e Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Reviewed-on: https://review.coreboot.org/c/em100/+/37479 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M curl.c 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/curl.c b/curl.c index 747a98d..d13dfe8 100644 --- a/curl.c +++ b/curl.c @@ -110,6 +110,9 @@
/* Fetch the file */ res = curl_easy_perform(curl); + if (res != CURLE_OK) + printf("Error while downloading %s: %s\n", filename, + curl_easy_strerror(res));
/* Close file */ fclose(file); @@ -117,7 +120,7 @@ /* Clean up */ curl_easy_cleanup(curl);
- return 0; + return (res == CURLE_OK) ? 0 : -1; }
void download(const char *name, const char *id)