summaryrefslogtreecommitdiff
path: root/include/hexdump.h
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2021-03-23 23:49:46 +0000
committerSteve McIntyre <steve@einval.com>2021-03-23 23:49:46 +0000
commit1251a7ba86fc40a6aad8b4fecdbca2b61808d9fa (patch)
tree2125fda549aaca55cb49a48d54be77dec7fbf3df /include/hexdump.h
parent85b409232ce89b34626df9d72abedf5d4f5ccef6 (diff)
parent031e5cce385d3f96b1caa1d53495332a7eb03749 (diff)
downloadefi-boot-shim-debian/15.3-1.tar.gz
efi-boot-shim-debian/15.3-1.zip
Update upstream source from tag 'upstream/15.3'debian/15.3-1
Update to upstream version '15.3' with Debian dir 1b484f1c1ac270604a5a1451b34de4b0865c6211
Diffstat (limited to 'include/hexdump.h')
-rw-r--r--include/hexdump.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/hexdump.h b/include/hexdump.h
index 8b8b4557..381e1a68 100644
--- a/include/hexdump.h
+++ b/include/hexdump.h
@@ -3,7 +3,8 @@
#ifndef STATIC_HEXDUMP_H
#define STATIC_HEXDUMP_H
-#include <stdint.h>
+#include "shim.h"
+#include "include/console.h"
static inline unsigned long UNUSED
prepare_hex(const void *data, size_t size, char *buf, unsigned int position)
@@ -47,8 +48,6 @@ prepare_hex(const void *data, size_t size, char *buf, unsigned int position)
return ret;
}
-#define isprint(c) ((c) >= 0x20 && (c) <= 0x7e)
-
static inline void UNUSED
prepare_text(const void *data, size_t size, char *buf, unsigned int position)
{
@@ -80,8 +79,9 @@ prepare_text(const void *data, size_t size, char *buf, unsigned int position)
* variadic hexdump formatted
* think of it as: printf("%s%s\n", vformat(fmt, ap), hexdump(data,size));
*/
-static inline void UNUSED
-vhexdumpf(const char *file, int line, const char *func, const CHAR16 * const fmt, const void *data, unsigned long size, size_t at, va_list ap)
+static inline void UNUSED EFIAPI
+vhexdumpf(const char *file, int line, const char *func, const CHAR16 *const fmt,
+ const void *data, unsigned long size, size_t at, ms_va_list ap)
{
unsigned long display_offset = at;
unsigned long offset = 0;
@@ -114,14 +114,15 @@ vhexdumpf(const char *file, int line, const char *func, const CHAR16 * const fmt
* hexdump formatted
* think of it as: printf("%s%s", format(fmt, ...), hexdump(data,size)[lineN]);
*/
-static inline void UNUSED
-hexdumpf(const char *file, int line, const char *func, const CHAR16 * const fmt, const void *data, unsigned long size, size_t at, ...)
+static inline void UNUSED EFIAPI
+hexdumpf(const char *file, int line, const char *func, const CHAR16 *const fmt,
+ const void *data, unsigned long size, size_t at, ...)
{
- va_list ap;
+ ms_va_list ap;
- va_start(ap, at);
+ ms_va_start(ap, at);
vhexdumpf(file, line, func, fmt, data, size, at, ap);
- va_end(ap);
+ ms_va_end(ap);
}
static inline void UNUSED