From 7cf63e693cfca14d0aa7d5accced2f640cc63c65 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 7 Nov 2008 11:36:41 +0000 Subject: [PATCH] - got rid of some fprintfs... --- tools/repo_patchxml.c | 2 +- tools/repo_products.c | 6 +++--- tools/repo_repomdxml.c | 2 +- tools/repo_rpmmd.c | 2 +- tools/repo_updateinfoxml.c | 2 +- tools/repo_zyppdb.c | 3 +-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tools/repo_patchxml.c b/tools/repo_patchxml.c index b7bc780..f7fdb0e 100644 --- a/tools/repo_patchxml.c +++ b/tools/repo_patchxml.c @@ -754,7 +754,7 @@ repo_add_patchxml(Repo *repo, FILE *fp, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_patchxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_patchxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_products.c b/tools/repo_products.c index 726dce7..def05bd 100644 --- a/tools/repo_products.c +++ b/tools/repo_products.c @@ -438,8 +438,9 @@ repo_add_product(struct parsedata *pd, FILE *fp, int code11) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "%s: %s at line %u:%u\n", pd->filename, XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); - fprintf(stderr, "Skipping this product\n"); + pool_debug(pd->pool, SAT_ERROR, "%s: %s at line %u:%u\n", pd->filename, XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pd->pool, SAT_ERROR, "Skipping this product\n"); + XML_ParserFree(parser); return; } if (l == 0) @@ -525,7 +526,6 @@ repo_add_product(struct parsedata *pd, FILE *fp, int code11) s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pd->pool, s->name, s->evr, REL_EQ, 1), 0); } } - return; } diff --git a/tools/repo_repomdxml.c b/tools/repo_repomdxml.c index 2bb4fb0..3636364 100644 --- a/tools/repo_repomdxml.c +++ b/tools/repo_repomdxml.c @@ -403,7 +403,7 @@ repo_add_repomdxml(Repo *repo, FILE *fp, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_repomdxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_repomdxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 49f873d..c3433f5 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -1135,7 +1135,7 @@ repo_add_rpmmd(Repo *repo, FILE *fp, const char *language, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_rpmmd: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_rpmmd: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_updateinfoxml.c b/tools/repo_updateinfoxml.c index 81d9cff..5e4b1f8 100644 --- a/tools/repo_updateinfoxml.c +++ b/tools/repo_updateinfoxml.c @@ -599,7 +599,7 @@ repo_add_updateinfoxml(Repo *repo, FILE *fp, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_updateinfoxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_updateinfoxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_zyppdb.c b/tools/repo_zyppdb.c index 0fa0c1d..dc94281 100644 --- a/tools/repo_zyppdb.c +++ b/tools/repo_zyppdb.c @@ -317,14 +317,13 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_zyppdb: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pd->pool, SAT_ERROR, "repo_zyppdb: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); return; } if (l == 0) break; } XML_ParserFree(parser); - return; } -- 2.7.4