Blame SOURCES/0052-sysfs-parsing-add-some-more-debugging-output.patch

b15ea1
From 097ff1033c6ee258b47720d079e27350f7189bbd Mon Sep 17 00:00:00 2001
b15ea1
From: Peter Jones <pjones@redhat.com>
b15ea1
Date: Wed, 2 Oct 2019 16:59:14 -0400
b15ea1
Subject: [PATCH 52/86] sysfs parsing: add some more debugging output
b15ea1
b15ea1
This adds highlights under the things we've found when searching, like:
b15ea1
b15ea1
linux-pci.c:66 parse_pci(): searching for 0000:00:00.0/
b15ea1
linux-pci.c:69 parse_pci(): current:'0000:00:1d.4/0000:6e:00.0/nvme/nvme0/nvme0n1' rc:4 pos0:0 pos1:13
b15ea1
linux-pci.c:70 parse_pci():          ^^^^^^^^^^^^^
b15ea1
b15ea1
Signed-off-by: Peter Jones <pjones@redhat.com>
b15ea1
---
b15ea1
 src/linux-acpi-root.c |  5 ++++-
b15ea1
 src/linux-emmc.c      |  3 ++-
b15ea1
 src/linux-md.c        |  3 ++-
b15ea1
 src/linux-nvme.c      |  3 ++-
b15ea1
 src/linux-pci-root.c  |  4 +++-
b15ea1
 src/linux-pci.c       |  3 ++-
b15ea1
 src/linux-pmem.c      |  4 +++-
b15ea1
 src/linux-sata.c      |  6 +++++-
b15ea1
 src/linux-scsi.c      | 10 +++++++++-
b15ea1
 src/linux-soc-root.c  |  4 +++-
b15ea1
 src/linux-virtblk.c   |  3 ++-
b15ea1
 src/util.h            | 35 +++++++++++++++++++++++++++++++++++
b15ea1
 12 files changed, 72 insertions(+), 11 deletions(-)
b15ea1
b15ea1
diff --git a/src/linux-acpi-root.c b/src/linux-acpi-root.c
b15ea1
index f48d4be9ac6..8aa5c96cdb9 100644
b15ea1
--- a/src/linux-acpi-root.c
b15ea1
+++ b/src/linux-acpi-root.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -63,6 +63,7 @@ parse_acpi_root(struct device *dev, const char *current, const char *root UNUSED
b15ea1
 	 */
b15ea1
 	rc = sscanf(devpart, "../../devices/platform/%n", &pos;;
b15ea1
 	debug("devpart:\"%s\" rc:%d pos:%d", devpart, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	if (rc != 0 || pos < 1)
b15ea1
 		return 0;
b15ea1
 	devpart += pos;
b15ea1
@@ -97,6 +98,7 @@ parse_acpi_root(struct device *dev, const char *current, const char *root UNUSED
b15ea1
 
b15ea1
 	pos -= 4;
b15ea1
 	debug("devpart:\"%s\" rc:%d pos:%d", devpart, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	acpi_header = strndupa(devpart, pos);
b15ea1
 	if (!acpi_header)
b15ea1
 		return 0;
b15ea1
@@ -114,6 +116,7 @@ parse_acpi_root(struct device *dev, const char *current, const char *root UNUSED
b15ea1
 	}
b15ea1
 	debug("devpart:\"%s\" parsed:%04hx:%02hhx pos:%d rc:%d",
b15ea1
 	      devpart, pad0, pad1, pos, rc);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 
b15ea1
 	devpart += pos;
b15ea1
 
b15ea1
diff --git a/src/linux-emmc.c b/src/linux-emmc.c
b15ea1
index 8af316a1723..bcd061cb0b2 100644
b15ea1
--- a/src/linux-emmc.c
b15ea1
+++ b/src/linux-emmc.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -58,6 +58,7 @@ parse_emmc(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	            &tosser0, &tosser1, &tosser2, &slot_id,
b15ea1
 	            &pos0, &tosser3, &partition, &pos1);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d pos1:%d\n", current, rc, pos0, pos1);
b15ea1
+	dbgmk("         ", pos0, pos1);
b15ea1
 	/*
b15ea1
 	 * If it isn't of that form, it's not one of our emmc devices.
b15ea1
 	 */
b15ea1
diff --git a/src/linux-md.c b/src/linux-md.c
b15ea1
index 3d5975d8195..b0809f8295a 100644
b15ea1
--- a/src/linux-md.c
b15ea1
+++ b/src/linux-md.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -51,6 +51,7 @@ parse_md(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	rc = sscanf(current, "md%d/%nmd%dp%d%n",
b15ea1
 	            &md, &pos0, &tosser0, &part, &pos1);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d pos1:%d\n", current, rc, pos0, pos1);
b15ea1
+	dbgmk("         ", pos0, pos1);
b15ea1
 	/*
b15ea1
 	 * If it isn't of that form, it's not one of our partitioned md devices.
b15ea1
 	 */
b15ea1
diff --git a/src/linux-nvme.c b/src/linux-nvme.c
b15ea1
index e6e42c7a3fc..530259c38e6 100644
b15ea1
--- a/src/linux-nvme.c
b15ea1
+++ b/src/linux-nvme.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -62,6 +62,7 @@ parse_nvme(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	            &tosser0, &ctrl_id, &ns_id, &pos0,
b15ea1
 	            &tosser1, &tosser2, &partition, &pos1);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d pos1:%d\n", current, rc, pos0, pos1);
b15ea1
+	dbgmk("         ", pos0, pos1);
b15ea1
 	/*
b15ea1
 	 * If it isn't of that form, it's not one of our nvme devices.
b15ea1
 	 */
b15ea1
diff --git a/src/linux-pci-root.c b/src/linux-pci-root.c
b15ea1
index ede9321395c..def8fdaa526 100644
b15ea1
--- a/src/linux-pci-root.c
b15ea1
+++ b/src/linux-pci-root.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -57,6 +57,8 @@ parse_pci_root(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	 *    ^d   ^p
b15ea1
 	 */
b15ea1
 	rc = sscanf(devpart, "../../devices/pci%hx:%hhx/%n", &root_domain, &root_bus, &pos;;
b15ea1
+	debug("current:\"%s\" rc:%d pos:%d", devpart, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	/*
b15ea1
 	 * If we can't find that, it's not a PCI device.
b15ea1
 	 */
b15ea1
diff --git a/src/linux-pci.c b/src/linux-pci.c
b15ea1
index 4c715df3d6e..4e7e636c463 100644
b15ea1
--- a/src/linux-pci.c
b15ea1
+++ b/src/linux-pci.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -68,6 +68,7 @@ parse_pci(struct device *dev, const char *current, const char *root)
b15ea1
 	        rc = sscanf(devpart, "%hx:%hhx:%hhx.%hhx/%n",
b15ea1
 	                    &domain, &bus, &device, &function, &pos;;
b15ea1
 	        debug("current:\"%s\" rc:%d pos:%d", devpart, rc, pos);
b15ea1
+		dbgmk("         ", pos);
b15ea1
 	        if (rc != 4)
b15ea1
 	                break;
b15ea1
 	        devpart += pos;
b15ea1
diff --git a/src/linux-pmem.c b/src/linux-pmem.c
b15ea1
index 099ac8aef8c..a11e1644094 100644
b15ea1
--- a/src/linux-pmem.c
b15ea1
+++ b/src/linux-pmem.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -105,6 +105,8 @@ parse_pmem(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	            "../../devices/LNXSYSTM:%hhx/LNXSYBUS:%hhx/ACPI%hx:%hhx/ndbus%d/region%d/btt%d.%d/%n",
b15ea1
 	            &system, &sysbus, &pnp_id, &acpi_id, &ndbus, &region,
b15ea1
 	            &btt_region_id, &btt_id, &pos;;
b15ea1
+	debug("current:\"%s\" rc:%d pos:%d", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	if (rc < 8)
b15ea1
 	        return 0;
b15ea1
 
b15ea1
diff --git a/src/linux-sata.c b/src/linux-sata.c
b15ea1
index ee285d84a76..f3a921c2f79 100644
b15ea1
--- a/src/linux-sata.c
b15ea1
+++ b/src/linux-sata.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -162,6 +162,7 @@ parse_sata(struct device *dev, const char *devlink, const char *root UNUSED)
b15ea1
 	debug("searching for ata1/");
b15ea1
 	rc = sscanf(current, "ata%"PRIu32"/%n", &print_id, &pos;;
b15ea1
 	debug("current:\"%s\" rc:%d pos:%d\n", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	/*
b15ea1
 	 * If we don't find this one, it isn't an ata device, so return 0 not
b15ea1
 	 * error.  Later errors mean it is an ata device, but we can't parse
b15ea1
@@ -175,6 +176,7 @@ parse_sata(struct device *dev, const char *devlink, const char *root UNUSED)
b15ea1
 	debug("searching for host0/");
b15ea1
 	rc = sscanf(current, "host%"PRIu32"/%n", &scsi_bus, &pos;;
b15ea1
 	debug("current:\"%s\" rc:%d pos:%d\n", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	if (rc != 1)
b15ea1
 	        return -1;
b15ea1
 	current += pos;
b15ea1
@@ -184,6 +186,7 @@ parse_sata(struct device *dev, const char *devlink, const char *root UNUSED)
b15ea1
 	rc = sscanf(current, "target%"PRIu32":%"PRIu32":%"PRIu64"/%n",
b15ea1
 	            &scsi_device, &scsi_target, &scsi_lun, &pos;;
b15ea1
 	debug("current:\"%s\" rc:%d pos:%d\n", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	if (rc != 3)
b15ea1
 	        return -1;
b15ea1
 	current += pos;
b15ea1
@@ -193,6 +196,7 @@ parse_sata(struct device *dev, const char *devlink, const char *root UNUSED)
b15ea1
 	rc = sscanf(current, "%"PRIu32":%"PRIu32":%"PRIu32":%"PRIu64"/%n",
b15ea1
 	            &tosser0, &tosser1, &tosser2, &tosser3, &pos;;
b15ea1
 	debug("current:\"%s\" rc:%d pos:%d\n", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	if (rc != 4)
b15ea1
 	        return -1;
b15ea1
 	current += pos;
b15ea1
diff --git a/src/linux-scsi.c b/src/linux-scsi.c
b15ea1
index 90a85836b1c..21fa0b7420c 100644
b15ea1
--- a/src/linux-scsi.c
b15ea1
+++ b/src/linux-scsi.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -101,6 +101,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	debug("searching for host4/");
b15ea1
 	rc = sscanf(current, "host%d/%n", scsi_host, &pos0);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d\n", current+sz, rc, pos0);
b15ea1
+	dbgmk("         ", pos0);
b15ea1
 	if (rc != 1)
b15ea1
 	        return -1;
b15ea1
 	sz += pos0;
b15ea1
@@ -118,6 +119,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	rc = sscanf(current+sz, "port-%d:%d%n:%d%n", &tosser0,
b15ea1
 	            &tosser1, &pos0, &tosser2, &pos1);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d pos1:%d\n", current+sz, rc, pos0, pos1);
b15ea1
+	dbgmk("         ", pos0, pos1);
b15ea1
 	if (rc == 2 || rc == 3) {
b15ea1
 	        sz += pos0;
b15ea1
 	        pos0 = 0;
b15ea1
@@ -143,6 +145,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	        debug("searching for expander-4:0/");
b15ea1
 	        rc = sscanf(current+sz, "expander-%d:%d/%n", &tosser0, &tosser1, &pos0);
b15ea1
 	        debug("current:\"%s\" rc:%d pos0:%d\n", current+sz, rc, pos0);
b15ea1
+		dbgmk("         ", pos0);
b15ea1
 	        if (rc == 2) {
b15ea1
 	                if (!remote_target_id) {
b15ea1
 	                        efi_error("Device is PHY is a remote target, but remote_target_id is NULL");
b15ea1
@@ -158,6 +161,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	                debug("searching for port-2:0:2/");
b15ea1
 	                rc = sscanf(current+sz, "port-%d:%d:%d/%n", &tosser0, &tosser1, &tosser2, &pos0);
b15ea1
 	                debug("current:\"%s\" rc:%d pos0:%d\n", current+sz, rc, pos0);
b15ea1
+			dbgmk("         ", pos0);
b15ea1
 	                if (rc != 3) {
b15ea1
 	                        efi_error("Couldn't parse port expander port string");
b15ea1
 	                        return -1;
b15ea1
@@ -182,6 +186,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	        rc = sscanf(current + sz + pos0, ":%d%n", &tosser2, &pos1);
b15ea1
 	        if (rc != 0 && rc != 1)
b15ea1
 	                return -1;
b15ea1
+		dbgmk("         ", pos0, pos0+pos1);
b15ea1
 	        if (remote_port_id && rc == 1)
b15ea1
 	                *remote_port_id = tosser2;
b15ea1
 	        if (local_port_id && rc == 0)
b15ea1
@@ -203,6 +208,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	rc = sscanf(current + sz, "target%d:%d:%"PRIu64"/%n", &tosser0, &tosser1,
b15ea1
 	            &tosser3, &pos0);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d\n", current+sz, rc, pos0);
b15ea1
+	dbgmk("         ", pos0);
b15ea1
 	if (rc != 3)
b15ea1
 	        return -1;
b15ea1
 	sz += pos0;
b15ea1
@@ -215,6 +221,7 @@ parse_scsi_link(const char *current, uint32_t *scsi_host,
b15ea1
 	rc = sscanf(current + sz, "%d:%d:%d:%"PRIu64"/%n",
b15ea1
 	            scsi_bus, scsi_device, scsi_target, scsi_lun, &pos0);
b15ea1
 	debug("current:\"%s\" rc:%d pos0:%d\n", current+sz, rc, pos0);
b15ea1
+	dbgmk("         ", pos0);
b15ea1
 	if (rc != 4)
b15ea1
 	        return -1;
b15ea1
 	sz += pos0;
b15ea1
@@ -242,6 +249,7 @@ parse_scsi(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	            &dev->scsi_info.scsi_lun,
b15ea1
 	            &pos;;
b15ea1
 	debug("current:\"%s\" rc:%d pos:%d\n", dev->device, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	if (rc != 4)
b15ea1
 	        return 0;
b15ea1
 
b15ea1
diff --git a/src/linux-soc-root.c b/src/linux-soc-root.c
b15ea1
index 27633d69c97..f4191dbd323 100644
b15ea1
--- a/src/linux-soc-root.c
b15ea1
+++ b/src/linux-soc-root.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -49,6 +49,8 @@ parse_soc_root(struct device *dev UNUSED, const char *current, const char *root
b15ea1
 	rc = sscanf(devpart, "../../devices/platform/soc/%*[^/]/%n", &pos;;
b15ea1
 	if (rc != 0)
b15ea1
 	        return 0;
b15ea1
+	debug("current:\"%s\" rc:%d pos:%d", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	devpart += pos;
b15ea1
 	debug("new position is \"%s\"", devpart);
b15ea1
 
b15ea1
diff --git a/src/linux-virtblk.c b/src/linux-virtblk.c
b15ea1
index 891c262fe05..e376e0480e6 100644
b15ea1
--- a/src/linux-virtblk.c
b15ea1
+++ b/src/linux-virtblk.c
b15ea1
@@ -1,6 +1,6 @@
b15ea1
 /*
b15ea1
  * libefiboot - library for the manipulation of EFI boot variables
b15ea1
- * Copyright 2012-2018 Red Hat, Inc.
b15ea1
+ * Copyright 2012-2019 Red Hat, Inc.
b15ea1
  *
b15ea1
  * This library is free software; you can redistribute it and/or
b15ea1
  * modify it under the terms of the GNU Lesser General Public License as
b15ea1
@@ -56,6 +56,7 @@ parse_virtblk(struct device *dev, const char *current, const char *root UNUSED)
b15ea1
 	debug("searching for virtio0/");
b15ea1
 	rc = sscanf(current, "virtio%x/%n", &tosser, &pos;;
b15ea1
 	debug("current:\"%s\" rc:%d pos:%d\n", current, rc, pos);
b15ea1
+	dbgmk("         ", pos);
b15ea1
 	/*
b15ea1
 	 * If we couldn't find virtioX/ then it isn't a virtio device.
b15ea1
 	 */
b15ea1
diff --git a/src/util.h b/src/util.h
b15ea1
index 3f68d812700..845989bbfe9 100644
b15ea1
--- a/src/util.h
b15ea1
+++ b/src/util.h
b15ea1
@@ -284,6 +284,40 @@ swizzle_guid_to_uuid(efi_guid_t *guid)
b15ea1
 	u16[1] = __builtin_bswap16(u16[1]);
b15ea1
 }
b15ea1
 
b15ea1
+static inline void UNUSED
b15ea1
+debug_markers_(const char * const file, int line,
b15ea1
+	       const char * const func, int level,
b15ea1
+	       const char * const prefix, ...)
b15ea1
+{
b15ea1
+	FILE *logfile;
b15ea1
+	va_list ap;
b15ea1
+	int pos;
b15ea1
+	int n = 0;
b15ea1
+	bool on = false;
b15ea1
+
b15ea1
+	va_start(ap, prefix);
b15ea1
+	for (n = 0, pos = va_arg(ap, int); pos >= 0; pos = va_arg(ap, int), n++)
b15ea1
+		;
b15ea1
+	va_end(ap);
b15ea1
+	if (n < 2)
b15ea1
+		return;
b15ea1
+	n = 0;
b15ea1
+
b15ea1
+	efi_set_loglevel(level);
b15ea1
+	logfile = efi_get_logfile();
b15ea1
+	fprintf(logfile, "%s:%d %s(): %s", file, line, func, prefix ? prefix : "");
b15ea1
+	va_start(ap, prefix);
b15ea1
+	while ((pos = va_arg(ap, int)) >= 0) {
b15ea1
+		for (; n <= pos; n++) {
b15ea1
+			if (n == pos)
b15ea1
+				on = !on;
b15ea1
+			fprintf(logfile, "%c", on ? '^' : ' ');
b15ea1
+		}
b15ea1
+	}
b15ea1
+	fprintf(logfile, "\n");
b15ea1
+	va_end(ap);
b15ea1
+}
b15ea1
+
b15ea1
 #define log_(file, line, func, level, fmt, args...)			\
b15ea1
 	({								\
b15ea1
 		efi_set_loglevel(level);				\
b15ea1
@@ -312,6 +346,7 @@ swizzle_guid_to_uuid(efi_guid_t *guid)
b15ea1
 	})
b15ea1
 #define log_hex(level, buf, size) log_hex_(__FILE__, __LINE__, __func__, level, buf, size)
b15ea1
 #define debug_hex(buf, size) log_hex(LOG_DEBUG, buf, size)
b15ea1
+#define dbgmk(prefix, args...) debug_markers_(__FILE__, __LINE__, __func__, LOG_DEBUG, prefix, ## args, -1)
b15ea1
 
b15ea1
 #endif /* EFIVAR_UTIL_H */
b15ea1
 
b15ea1
-- 
b15ea1
2.24.1
b15ea1