Blame SOURCES/0024-efi_stash_loglevel_-efi_set_loglevel.patch

b15ea1
From e0ded4593e57657837dfcf110985eabaa37bc492 Mon Sep 17 00:00:00 2001
b15ea1
From: Peter Jones <pjones@redhat.com>
b15ea1
Date: Wed, 29 May 2019 10:28:41 -0400
b15ea1
Subject: [PATCH 24/86] efi_stash_loglevel_() -> efi_set_loglevel()
b15ea1
b15ea1
Signed-off-by: Peter Jones <pjones@redhat.com>
b15ea1
---
b15ea1
 src/error.c                 | 8 ++++----
b15ea1
 src/include/efivar/efivar.h | 4 ++--
b15ea1
 src/libefivar.map.in        | 2 +-
b15ea1
 src/util.h                  | 4 ++--
b15ea1
 4 files changed, 9 insertions(+), 9 deletions(-)
b15ea1
b15ea1
diff --git a/src/error.c b/src/error.c
b15ea1
index a77b0df1feb..083de15e984 100644
b15ea1
--- a/src/error.c
b15ea1
+++ b/src/error.c
b15ea1
@@ -166,13 +166,13 @@ efi_error_pop(void)
b15ea1
 static int efi_verbose;
b15ea1
 static FILE *efi_errlog, *efi_dbglog;
b15ea1
 static int efi_dbglog_fd = -1;
b15ea1
-static int stashed_log_level;
b15ea1
+static int log_level;
b15ea1
 static char efi_dbglog_buf[4096];
b15ea1
 
b15ea1
 void PUBLIC
b15ea1
-efi_stash_loglevel_(int level)
b15ea1
+efi_set_loglevel(int level)
b15ea1
 {
b15ea1
-	stashed_log_level = level;
b15ea1
+	log_level = level;
b15ea1
 }
b15ea1
 
b15ea1
 static ssize_t
b15ea1
@@ -181,7 +181,7 @@ dbglog_write(void *cookie UNUSED, const char *buf, size_t size)
b15ea1
 	FILE *log = efi_errlog ? efi_errlog : stderr;
b15ea1
 	ssize_t ret = size;
b15ea1
 
b15ea1
-	if (efi_get_verbose() >= stashed_log_level) {
b15ea1
+	if (efi_get_verbose() >= log_level) {
b15ea1
 		ret = fwrite(buf, 1, size, log);
b15ea1
 	} else if (efi_dbglog_fd >= 0) {
b15ea1
 		lseek(efi_dbglog_fd, 0, SEEK_SET);
b15ea1
diff --git a/src/include/efivar/efivar.h b/src/include/efivar/efivar.h
b15ea1
index 11d9a9d7b78..2fdf5b93b29 100644
b15ea1
--- a/src/include/efivar/efivar.h
b15ea1
+++ b/src/include/efivar/efivar.h
b15ea1
@@ -188,7 +188,7 @@ extern int efi_error_set(const char *filename,
b15ea1
 			__attribute__((__format__ (printf, 5, 6)));
b15ea1
 extern void efi_error_clear(void);
b15ea1
 extern void efi_error_pop(void);
b15ea1
-extern void efi_stash_loglevel_(int level);
b15ea1
+extern void efi_set_loglevel(int level);
b15ea1
 #else
b15ea1
 static inline int
b15ea1
 __attribute__((__nonnull__ (2, 3, 4, 5, 6)))
b15ea1
@@ -228,7 +228,7 @@ efi_error_pop(void)
b15ea1
 }
b15ea1
 
b15ea1
 static inline void
b15ea1
-efi_stash_loglevel_(int level __attribute__((__unused__)))
b15ea1
+efi_set_loglevel(int level __attribute__((__unused__)))
b15ea1
 {
b15ea1
 	return;
b15ea1
 }
b15ea1
diff --git a/src/libefivar.map.in b/src/libefivar.map.in
b15ea1
index 33196fefc64..682e622c302 100644
b15ea1
--- a/src/libefivar.map.in
b15ea1
+++ b/src/libefivar.map.in
b15ea1
@@ -133,6 +133,6 @@ LIBEFIVAR_1.37 {
b15ea1
 
b15ea1
 LIBEFIVAR_1.38 {
b15ea1
 	global: efi_error_pop;
b15ea1
-		efi_stash_loglevel_;
b15ea1
+		efi_set_loglevel;
b15ea1
 		efi_get_libefivar_version;
b15ea1
 } LIBEFIVAR_1.37;
b15ea1
diff --git a/src/util.h b/src/util.h
b15ea1
index 337762c9902..ec1c5f1a69a 100644
b15ea1
--- a/src/util.h
b15ea1
+++ b/src/util.h
b15ea1
@@ -382,7 +382,7 @@ swizzle_guid_to_uuid(efi_guid_t *guid)
b15ea1
 
b15ea1
 #define log_(file, line, func, level, fmt, args...)                     \
b15ea1
         ({                                                              \
b15ea1
-                efi_stash_loglevel_(level);                             \
b15ea1
+                efi_set_loglevel(level);                                \
b15ea1
                 FILE *logfile_ = efi_get_logfile();                     \
b15ea1
                 int len_ = strlen(fmt);                                 \
b15ea1
                 fprintf(logfile_, "%s:%d %s(): ",                       \
b15ea1
@@ -401,7 +401,7 @@ swizzle_guid_to_uuid(efi_guid_t *guid)
b15ea1
 #define debug(fmt, args...) log(LOG_DEBUG, fmt, ## args)
b15ea1
 #define log_hex_(file, line, func, level, buf, size)                    \
b15ea1
         ({                                                              \
b15ea1
-                efi_stash_loglevel_(level);                             \
b15ea1
+                efi_set_loglevel(level);                                \
b15ea1
                 fhexdumpf(efi_get_logfile(), "%s:%d %s(): ",            \
b15ea1
                           (uint8_t *)buf, size,                         \
b15ea1
                           file, line, func);                            \
b15ea1
-- 
b15ea1
2.24.1
b15ea1