Blame SOURCES/0038-libsepol-cil-Use-CIL_ERR-for-error-messages-in-cil_c.patch

71cd55
From 8314076cd9cd71ee7ee3c5e668c1f0472ea8b815 Mon Sep 17 00:00:00 2001
71cd55
From: James Carter <jwcart2@gmail.com>
71cd55
Date: Tue, 30 Mar 2021 13:40:02 -0400
71cd55
Subject: [PATCH] libsepol/cil: Use CIL_ERR for error messages in cil_compile()
71cd55
71cd55
In cil_compile(), CIL_INFO is being used as the priority for
71cd55
error messages. This can make it difficult to tell when the error
71cd55
occurred.
71cd55
71cd55
Instead, use CIL_ERR as the priority for the error messages in
71cd55
cil_compile().
71cd55
71cd55
Signed-off-by: James Carter <jwcart2@gmail.com>
71cd55
---
71cd55
 libsepol/cil/src/cil.c | 8 ++++----
71cd55
 1 file changed, 4 insertions(+), 4 deletions(-)
71cd55
71cd55
diff --git a/libsepol/cil/src/cil.c b/libsepol/cil/src/cil.c
71cd55
index 99c8e288912c..b971922c70b5 100644
71cd55
--- a/libsepol/cil/src/cil.c
71cd55
+++ b/libsepol/cil/src/cil.c
71cd55
@@ -539,7 +539,7 @@ int cil_compile(struct cil_db *db)
71cd55
 	cil_log(CIL_INFO, "Building AST from Parse Tree\n");
71cd55
 	rc = cil_build_ast(db, db->parse->root, db->ast->root);
71cd55
 	if (rc != SEPOL_OK) {
71cd55
-		cil_log(CIL_INFO, "Failed to build ast\n");
71cd55
+		cil_log(CIL_ERR, "Failed to build AST\n");
71cd55
 		goto exit;
71cd55
 	}
71cd55
 
71cd55
@@ -549,21 +549,21 @@ int cil_compile(struct cil_db *db)
71cd55
 	cil_log(CIL_INFO, "Resolving AST\n");
71cd55
 	rc = cil_resolve_ast(db, db->ast->root);
71cd55
 	if (rc != SEPOL_OK) {
71cd55
-		cil_log(CIL_INFO, "Failed to resolve ast\n");
71cd55
+		cil_log(CIL_ERR, "Failed to resolve AST\n");
71cd55
 		goto exit;
71cd55
 	}
71cd55
 
71cd55
 	cil_log(CIL_INFO, "Qualifying Names\n");
71cd55
 	rc = cil_fqn_qualify(db->ast->root);
71cd55
 	if (rc != SEPOL_OK) {
71cd55
-		cil_log(CIL_INFO, "Failed to qualify names\n");
71cd55
+		cil_log(CIL_ERR, "Failed to qualify names\n");
71cd55
 		goto exit;
71cd55
 	}
71cd55
 
71cd55
 	cil_log(CIL_INFO, "Compile post process\n");
71cd55
 	rc = cil_post_process(db);
71cd55
 	if (rc != SEPOL_OK ) {
71cd55
-		cil_log(CIL_INFO, "Post process failed\n");
71cd55
+		cil_log(CIL_ERR, "Post process failed\n");
71cd55
 		goto exit;
71cd55
 	}
71cd55
 
71cd55
-- 
71cd55
2.32.0
71cd55