summaryrefslogtreecommitdiff
path: root/util/nvmutil/lib/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/lib/state.c')
-rw-r--r--util/nvmutil/lib/state.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/util/nvmutil/lib/state.c b/util/nvmutil/lib/state.c
index 946b8919..02a3e51c 100644
--- a/util/nvmutil/lib/state.c
+++ b/util/nvmutil/lib/state.c
@@ -1,9 +1,7 @@
/* SPDX-License-Identifier: MIT
* Copyright (c) 2022-2026 Leah Rowe <leah@libreboot.org>
*
- * This tool lets you modify Intel GbE NVM (Gigabit Ethernet
- * Non-Volatile Memory) images, e.g. change the MAC address.
- * These images configure your Intel Gigabit Ethernet adapter.
+ * State machine (singleton) for nvmutil data.
*/
#ifdef __OpenBSD__
@@ -24,12 +22,6 @@
#include "../include/common.h"
-/*
- * Initialise program state,
- * load GbE file and verify
- * data, ready for operation
- * (singleton design)
- */
struct xstate *
xstatus(int argc, char *argv[])
{
@@ -147,8 +139,8 @@ xstatus(int argc, char *argv[])
#if defined(__OpenBSD__) && defined(OpenBSD) && \
OpenBSD >= 604
- if (unveil(f->tname, "rwc") == -1)
- err(errno, "unveil rwc: %s", f->tname);
+ if (unveil(us.f.tname, "rwc") == -1)
+ err(errno, "unveil rwc: %s", us.f.tname);
#endif
if (fstat(us.f.tmp_fd, &us.f.tmp_st) < 0)
err(errno, "%s: stat", us.f.tname);
@@ -166,7 +158,7 @@ xstatus(int argc, char *argv[])
err(errno, "%s: unveil r", us.f.fname);
} else {
if (unveil(us.f.fname, "rwc") == -1)
- err(errno, "%s: unveil rw", us.f.tname);
+ err(errno, "%s: unveil rw", us.f.fname);
}
if (unveil(us.f.tname, "rwc") == -1)