diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-06-21 23:32:12 +0900 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-06-21 17:34:54 +0200 |
commit | aefb9196cfb60c534ce1ce31db38940f3bf4df83 (patch) | |
tree | f908fb2abd0471c609672f19bacae01df88f04c2 | |
parent | 7292486ec38fbef8b81ccbe64d7695804bbf7751 (diff) |
curl: Prefixed all Metalink related messages with "Metalink: "
-rw-r--r-- | src/tool_metalink.c | 20 | ||||
-rw-r--r-- | src/tool_operate.c | 5 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/tool_metalink.c b/src/tool_metalink.c index 74a0012ac..89a99d3ec 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -330,11 +330,13 @@ static int check_hash(const char *filename, digest_context *dctx; int check_ok; int fd; - fprintf(error, "Validating %s checksum (This may take some time)...\n", + fprintf(error, + "Metalink: Validating %s checksum (This may take some time)...\n", digest_def->hash_name); fd = open(filename, O_RDONLY); if(fd == -1) { - fprintf(error, "Could not open file %s: %s\n", filename, strerror(errno)); + fprintf(error, "Metalink: Could not open file %s: %s\n", filename, + strerror(errno)); return -1; } dctx = Curl_digest_init(digest_def->dparams); @@ -346,7 +348,7 @@ static int check_hash(const char *filename, break; } else if(len == -1) { - fprintf(error, "Could not read file %s: %s\n", filename, + fprintf(error, "Metalink: Could not read file %s: %s\n", filename, strerror(errno)); Curl_digest_final(dctx, result); close(fd); @@ -359,9 +361,9 @@ static int check_hash(const char *filename, digest_def->dparams->digest_resultlen) == 0; /* sha*sum style verdict output */ if(check_ok) - fprintf(error, "%s: OK\n", filename); + fprintf(error, "Metalink: %s: OK\n", filename); else - fprintf(error, "%s: FAILED\n", filename); + fprintf(error, "Metalink: %s: FAILED\n", filename); free(result); close(fd); @@ -480,7 +482,8 @@ int parse_metalink(struct Configurable *config, struct OutStruct *outs) return -1; } if(metalink->files == NULL) { - fprintf(config->errors, "\nMetalink does not contain any file.\n"); + fprintf(config->errors, + "\nMetalink: Metalink XML file does not contain any file.\n"); metalink_delete(metalink); return 0; } @@ -488,7 +491,8 @@ int parse_metalink(struct Configurable *config, struct OutStruct *outs) struct getout *url; /* Skip an entry which has no resource. */ if(!(*files)->resources) { - fprintf(config->errors, "\nFile %s does not have any resource.\n", + fprintf(config->errors, + "\nMetalink: File %s does not have any resource.\n", (*files)->name); continue; } @@ -554,7 +558,7 @@ size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb, if(rv == 0) return sz * nmemb; else { - warnf(config, "Failed to parse Metalink XML\n"); + warnf(config, "Metalink: Failed to parse Metalink XML file\n"); return failure; } } diff --git a/src/tool_operate.c b/src/tool_operate.c index 4b9c42dc7..3fcdf4781 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1602,9 +1602,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) if(!metalink && config->use_metalink && res == CURLE_OK) { if(parse_metalink(config, &outs) == 0) fprintf(config->errors, - "Metalink XML is parsed successfully\n"); + "Metalink: Metalink XML file was parsed successfully\n"); else - fprintf(config->errors, "Could not parse Metalink XML.\n"); + fprintf(config->errors, + "Metalink: Could not parse Metalink XML file\n"); } else if(metalink && res == CURLE_OK && !metalink_next_res) { int rv = metalink_check_hash(config, mlfile, outs.filename); |